From d7846d773e4be66bcba51f09a640e6c78dbbc8e8 Mon Sep 17 00:00:00 2001 From: jpr Date: Thu, 31 Mar 2011 12:37:54 +0000 Subject: [PATCH] comments --- vtk/vtkGdcm4DSplitter.h | 52 ++++++++++++++++++++--------------------- vtk/vtkGdcmReader.h | 26 ++++++++++----------- 2 files changed, 38 insertions(+), 40 deletions(-) diff --git a/vtk/vtkGdcm4DSplitter.h b/vtk/vtkGdcm4DSplitter.h index 7cd99916..85f2046f 100644 --- a/vtk/vtkGdcm4DSplitter.h +++ b/vtk/vtkGdcm4DSplitter.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: vtkGdcm4DSplitter.h,v $ Language: C++ - Date: $Date: 2011/03/30 14:49:04 $ - Version: $Revision: 1.2 $ + Date: $Date: 2011/03/31 12:37:54 $ + Version: $Revision: 1.3 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -25,19 +25,19 @@ typedef bool (*FoncComp) (GDCM_NAME_SPACE::File *file1, GDCM_NAME_SPACE::File *file2); //typedef bool (vtkGdcm4DSplitter::*MembFoncComp)(GDCM_NAME_SPACE::File *file1, GDCM_NAME_SPACE::File *file2); -#define CALL_MEMBER_FONC(object, ptrToFoncMember) ((object).*(ptrToFoncMember)) +#define CALL_MEMBER_FONC(object, ptrToFoncMember) ((object).*(ptrToFoncMember)) -//namespace GDCM_NAME_SPACE +//namespace GDCM_NAME_SPACE //{ class vtkGdcm4DSplitter { public: vtkGdcm4DSplitter(); - ~vtkGdcm4DSplitter(){}; + ~vtkGdcm4DSplitter(){}; bool setDirName(std::string &dirName); bool setVectDirName(std::vector &vectDirName); - bool setVectFileName(std::vector &vectFileName); - + bool setVectFileName(std::vector &vectFileName); + // Split // ===== inline void setSplitOnPosition() {SplitOnPosition=true; SplitOnOrientation=false; SplitOnTag=false;} @@ -46,76 +46,76 @@ typedef bool (*FoncComp) (GDCM_NAME_SPACE::File *file1, G {SplitOnPosition=false; SplitOnOrientation=false; SplitOnTag=true; SplitGroup=splitGroup; SplitElem=splitElem;} inline void setSplitConvertToFloat(bool conv) {SplitConvertToFloat=conv;} - + // Sort // ==== inline void setSortOnPosition() {SortOnPosition=true; SortOnOrientation=false; SortOnTag=false; SortOnFileName=false; SortOnUserFunction=false; SortOnPosition=true;} - + inline void setSortOnTag(unsigned short int sortGroup, unsigned short int sortElem) {SortOnPosition=false; SortOnOrientation=false; SortOnTag=true; SortOnFileName=false; SortOnUserFunction=false; SortGroup=sortGroup; SortElem=sortElem;} - - inline void setSortOnUserFunction (FoncComp f) + + inline void setSortOnUserFunction (FoncComp f) { UserCompareFunction=f; SortOnPosition=false; SortOnOrientation=false; SortOnTag=false; SortOnFileName=false; SortOnUserFunction=true;} inline void setSortConvertToFloat(bool conv) {SortConvertToFloat=conv;} - + inline void setSortOnFileName() {SortOnPosition=false; SortOnOrientation=false; SortOnTag=false; SortOnFileName=true; SortOnUserFunction=false;} - + inline void setRecursive(bool recursive) { Recursive=recursive;} // SortOnOrientation : not yet made //inline void setSortOnOrientation(){SortOnPosition=false; SortOnOrientation=true; SortOnTag=false; SortOnFileName=false; SortOnUserFunction=false;} - + std::vector *GetImageDataVector(); vtkImageData *GetImageData(); - bool Go(); - + bool Go(); + protected: private: bool CompareOnSortTag (GDCM_NAME_SPACE::File *file1, GDCM_NAME_SPACE::File *file2); bool CompareOnSortTagConvertToFloat(GDCM_NAME_SPACE::File *file1, GDCM_NAME_SPACE::File *file2); - + // Data // ---- - public: + public: protected: private: std::string DirName; std::vector VectDirName; std::vector VectFileName; - + bool SplitOnPosition; bool SplitOnOrientation; bool SplitOnTag; - + unsigned short int SplitGroup; unsigned short int SplitElem; bool SplitConvertToFloat; - + bool SortOnPosition; bool SortOnOrientation; bool SortOnTag; bool SortOnFileName; bool SortOnUserFunction; - + FoncComp UserCompareFunction; - + unsigned short int SortGroup; unsigned short int SortElem; bool SortConvertToFloat; - + bool Recursive; int TypeDir; int TypeResult; bool verbose; std::vector *ImageDataVector; - vtkImageData *ImageData; + vtkImageData *ImageData }; - + //} // end namespace gdcm //----------------------------------------------------------------------------- diff --git a/vtk/vtkGdcmReader.h b/vtk/vtkGdcmReader.h index dc29361f..e9846b54 100644 --- a/vtk/vtkGdcmReader.h +++ b/vtk/vtkGdcmReader.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: vtkGdcmReader.h,v $ Language: C++ - Date: $Date: 2011/03/29 07:36:02 $ - Version: $Revision: 1.39 $ + Date: $Date: 2011/03/31 12:37:54 $ + Version: $Revision: 1.40 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -14,8 +14,7 @@ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. -=========================================================================*/ - +==========================================================================*/ #ifndef __vtkGdcmReader_h #define __vtkGdcmReader_h @@ -46,7 +45,7 @@ public: //BTX void SetCoherentFileList( std::vector *cfl) { - CoherentFileList = cfl; } + CoherentFileList = cfl; } //ETX //vtkSetMacro(AllowLightChecking, bool); @@ -54,13 +53,13 @@ public: //vtkBooleanMacro(AllowLightChecking, bool); //BTX - + /// \todo fix possible problems around VTK pipelining - + void SetUserFunction (VOID_FUNCTION_PUINT8_PFILE_POINTER userFunc ) { UserFunction = userFunc; } //ETX - + // Description: // If this flag is set and the DICOM reader encounters a dicom file with // lookup table the data will be kept as unsigned chars and a lookuptable @@ -94,7 +93,7 @@ public: * WARNING : before using NO_SHADOW, be sure *all* your files * contain accurate values in the 0x0000 element (if any) * of *each* Shadow Group. The parser will fail if the size is wrong ! - * @param mode Load mode to be used + * @param mode Load mode to be used */ vtkSetMacro(LoadMode, int); vtkGetMacro(LoadMode, int); @@ -103,11 +102,11 @@ public: /* * \ brief drop images with duplicate position * and therefore calculate ZSpacing for the whole file set - * @param mode user wants to drop images with duplicate position - */ + * @param mode user wants to drop images with duplicate position + */ vtkSetMacro(DropDuplicatePositions, bool); vtkGetMacro(DropDuplicatePositions, bool); - vtkBooleanMacro(DropDuplicatePositions, bool); + vtkBooleanMacro(DropDuplicatePositions, bool); protected: vtkGdcmReader(); @@ -183,7 +182,7 @@ private: std::list InternalFileNameList; gdcmFileList InternalFileList; //bool Execution; // For VTK5.0 - + //ETX /// \brief Bit string integer (each one considered as a boolean) @@ -207,4 +206,3 @@ private: //----------------------------------------------------------------------------- #endif - -- 2.45.0