]> Creatis software - gdcm.git/commitdiff
add SetFlipY()
authorjpr <jpr>
Fri, 15 Apr 2011 15:14:40 +0000 (15:14 +0000)
committerjpr <jpr>
Fri, 15 Apr 2011 15:14:40 +0000 (15:14 +0000)
vtk/vtkGdcm4DSplitter.cxx
vtk/vtkGdcm4DSplitter.h

index 974242e3f608a329996c82846ec8d23d7deebef0..69079de8e72469feb9abe55a08c31368428eed51 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: vtkGdcm4DSplitter.cxx,v $
   Language:  C++
-  Date:      $Date: 2011/04/13 13:30:58 $
-  Version:   $Revision: 1.10 $
+  Date:      $Date: 2011/04/15 15:14:40 $
+  Version:   $Revision: 1.11 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -109,7 +109,14 @@ Aware user will have to specify some points :
         void setSortOnUserFunction (FoncComp f);
  - File name
         void setSortOnFileName()
-  
+
+- Choose 'flip' option
+----------------------
+VTK reader 'flop upside down' the images to display them correctly ?!?
+When a 'math guy' gets the image, the first thing he does is flipping it again.
+Avoid loosing CPU time using :
+      bool SetFlipY(bool); // Wrong = no flip
+
 . Execute :
 -----------
         bool Go();
@@ -547,7 +554,10 @@ void  vtkGdcm4DSplitter::setRecursive(bool recursive)
                                                 ++i)
    {
       vtkGdcmReader *reader = vtkGdcmReader::New(); /// \TODO FIXME : unable to delete!
-       
+      
+      reader->SetFlipY(FlipY);
+      // better user SetFileLowerLeft()
+      /// \TODO : modify vtkGdcmReader ! 
       if (verbose)
                std::cout << " --- xCoherentName = [" << (*i).first << "]" << std::endl;
 
index 3cc3528bd35b48f8d0a2c0f7991b51c83dbbd6d0..c643a95af3e1eb8d2c9116a4aba38e6d5091760a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: vtkGdcm4DSplitter.h,v $
   Language:  C++
-  Date:      $Date: 2011/04/13 13:30:58 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2011/04/15 15:14:40 $
+  Version:   $Revision: 1.10 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -54,6 +54,8 @@ typedef  bool (*FoncComp)(GDCM_NAME_SPACE::File *file1, GDCM_NAME_SPACE::File *f
        bool setVectFileName(std::vector<std::string> &vectFileName);
        
        bool setVectGdcmFile(std::vector<GDCM_NAME_SPACE::File *> *vectGdcmFile);
+       
+       bool SetFlipY(bool f) { FlipY = f;}
 
        // Split
        // =====
@@ -137,6 +139,7 @@ typedef  bool (*FoncComp)(GDCM_NAME_SPACE::File *file1, GDCM_NAME_SPACE::File *f
        GDCM_NAME_SPACE::XCoherentFileSetmap xcm;
        //std::vector<std::vector<GDCM_NAME_SPACE::File *> > VectGdcmFileLists;
        std::vector<GDCM_NAME_SPACE::FileList *> VectGdcmFileLists;
+       bool FlipY;
   };
 
 //} // end namespace gdcm