+/**
+ * \brief Sets a vector of gdcm::File *
+ * @param vectGdcmFileName vector of gdcm::File *
+ */
+
+ bool vtkGdcm4DSplitter::setVectGdcmFile(GDCM_NAME_SPACE::FileList *vectGdcmFile)
+ {
+ if ( vectGdcmFile->size() == 0)
+ {
+ std::cout << "[ vectGdcmFile ] : empty list" << std::endl;
+ return false;
+ }
+ TypeDir=4;
+ VectGdcmFile = vectGdcmFile;
+ }
+
+
+ // Split
+ // =====
+
+/**
+ * \brief asks for splitting Filesets according to the Position
+ */
+
+ void vtkGdcm4DSplitter::setSplitOnPosition()
+ {
+ SplitOnPosition=true;
+ SplitOnOrientation=false;
+ SplitOnTag=false;
+ }
+/**
+ * \brief asks for splitting Filesets according to the Orientation
+ */
+ void vtkGdcm4DSplitter::setSplitOnOrientation()
+ {
+ SplitOnPosition=false;
+ SplitOnOrientation=true;
+ SplitOnTag=false;
+ }
+/**
+ * \brief asks for splitting Filesets according to the value of a given Tag
+ * @param group group number of the target Element
+ * @param element element number of the target Element
+ */
+ void vtkGdcm4DSplitter::setSplitOnTag(unsigned short int splitGroup, unsigned short int splitElem)
+ {
+ SplitOnPosition=false;
+ SplitOnOrientation=false;
+ SplitOnTag=true;
+ SplitGroup=splitGroup;
+ SplitElem=splitElem;
+ }
+/**
+ * \brief asks for converting to 'float' the tag values used as a splitting criteria (lexicographic order may not be suitable)
+ */
+ void vtkGdcm4DSplitter::setSplitConvertToFloat(bool conv) {SplitConvertToFloat=conv;}
+
+/**
+ * \brief asks for splitting Filesets according to what was asked for (no sorting, no reading data)
+ */
+ void vtkGdcm4DSplitter::setSplitOnly(bool s)
+ {
+ SplitOnly = s;
+ }
+ // Sort
+ // ====
+
+ void vtkGdcm4DSplitter::setSortOnPosition()
+ {
+ SortOnPosition=true;
+ SortOnOrientation=false;
+ SortOnTag=false;
+ SortOnFileName=false;
+ SortOnUserFunction=false;
+ SortOnPosition=true;
+ }
+
+ // use setSortOnUserFunction, instead!
+ // void setSortOnTag(unsigned short int sortGroup, unsigned short int sortElem)
+ // {
+ // SortOnPosition=false;
+ // SortOnOrientation=false;
+ // SortOnTag=true;
+ // SortOnFileName=false;
+ // SortOnUserFunction=false;
+ // SortGroup=sortGroup; SortElem=sortElem;
+ // }
+
+
+/**
+ * \brief sets a user supplied function (comparison)
+ * @param f comparison function
+ */
+ void vtkGdcm4DSplitter::setSortOnUserFunction (FoncComp f)
+ {
+ UserCompareFunction=f;
+ SortOnPosition=false;
+ SortOnOrientation=false;
+ SortOnTag=false;
+ SortOnFileName=false;
+ SortOnUserFunction=true;
+ }
+
+
+ // void setSortConvertToFloat(bool conv)
+ // {
+ // SortConvertToFloat=conv;
+ // }
+
+/**
+ * \brief asks for sorting the images, according to their File Name
+ */
+ void vtkGdcm4DSplitter::setSortOnFileName()
+ {
+ SortOnPosition=false;
+ SortOnOrientation=false;
+ SortOnTag=false;
+ SortOnFileName=true;
+ SortOnUserFunction=false;
+ }
+
+
+ std::vector<vtkImageData*> * vtkGdcm4DSplitter::GetImageDataVector()
+ {
+ if (SplitOnly)
+ return NULL;
+
+ return ImageDataVector;
+ }
+
+ std::vector<GDCM_NAME_SPACE::FileList *> *vtkGdcm4DSplitter::GetVectGdcmFileLists()
+ {
+ if (SplitOnly)
+ return NULL;
+
+ GDCM_NAME_SPACE::XCoherentFileSetmap::iterator it;
+ for ( it = xcm.begin();
+ it != xcm.end();
+ ++it)
+ {
+ VectGdcmFileLists.push_back((*it).second);
+ }
+ return &VectGdcmFileLists;
+ }
+
+
+ vtkImageData *vtkGdcm4DSplitter::GetImageData()
+ {
+ if (SplitOnly)
+ return NULL;
+ return (*ImageDataVector)[0];
+ }
+
+