From a13370a2d5abfe74b91cedf9512bd644c80737e1 Mon Sep 17 00:00:00 2001 From: jpr Date: Fri, 15 Apr 2011 15:14:40 +0000 Subject: [PATCH] add SetFlipY() --- vtk/vtkGdcm4DSplitter.cxx | 18 ++++++++++++++---- vtk/vtkGdcm4DSplitter.h | 7 +++++-- 2 files changed, 19 insertions(+), 6 deletions(-) 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 -- 2.45.0