From: jpr Date: Fri, 15 Apr 2011 15:14:40 +0000 (+0000) Subject: add SetFlipY() X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?p=gdcm.git;a=commitdiff_plain;h=a13370a2d5abfe74b91cedf9512bd644c80737e1 add SetFlipY() --- diff --git a/vtk/vtkGdcm4DSplitter.cxx b/vtk/vtkGdcm4DSplitter.cxx index 974242e3..69079de8 100644 --- a/vtk/vtkGdcm4DSplitter.cxx +++ b/vtk/vtkGdcm4DSplitter.cxx @@ -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; diff --git a/vtk/vtkGdcm4DSplitter.h b/vtk/vtkGdcm4DSplitter.h index 3cc3528b..c643a95a 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/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 &vectFileName); bool setVectGdcmFile(std::vector *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 > VectGdcmFileLists; std::vector VectGdcmFileLists; + bool FlipY; }; //} // end namespace gdcm