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
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<std::string> &vectDirName);
- bool setVectFileName(std::vector<std::string> &vectFileName);
-
+ bool setVectFileName(std::vector<std::string> &vectFileName);
+
// Split
// =====
inline void setSplitOnPosition() {SplitOnPosition=true; SplitOnOrientation=false; SplitOnTag=false;}
{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<vtkImageData*> *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<std::string> VectDirName;
std::vector<std::string> 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<vtkImageData*> *ImageDataVector;
- vtkImageData *ImageData;
+ vtkImageData *ImageData
};
-
+
//} // end namespace gdcm
//-----------------------------------------------------------------------------
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
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
//BTX
void SetCoherentFileList( std::vector<GDCM_NAME_SPACE::File* > *cfl) {
- CoherentFileList = cfl; }
+ CoherentFileList = cfl; }
//ETX
//vtkSetMacro(AllowLightChecking, bool);
//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
* 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);
/*
* \ 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();
std::list<std::string> InternalFileNameList;
gdcmFileList InternalFileList;
//bool Execution; // For VTK5.0
-
+
//ETX
/// \brief Bit string integer (each one considered as a boolean)
//-----------------------------------------------------------------------------
#endif
-