X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vtk%2FvtkGdcm4DSplitter.cxx;h=352b14705392ae82c338ba66a55d1cdbcc332926;hb=68fe377d4e6396c109849870190bb73e27f4043d;hp=a46441f7212af8b75c1ebfa99221b859797fddba;hpb=bf4cd1c4c99073188c6c4838b9e89c00cef7b30f;p=gdcm.git diff --git a/vtk/vtkGdcm4DSplitter.cxx b/vtk/vtkGdcm4DSplitter.cxx index a46441f7..352b1470 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/05 13:56:31 $ - Version: $Revision: 1.7 $ + Date: $Date: 2011/04/08 00:11:36 $ + Version: $Revision: 1.8 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -102,8 +102,8 @@ User will have to specify some points . Get the result ---------------- - -a single vtkImageData: - vtkImageData *GetImageData(); +// -a single vtkImageData: +// vtkImageData *GetImageData(); - a vector of vtkImageData std::vector *GetImageDataVector(); @@ -131,8 +131,9 @@ User will have to specify some points } std::vector * vtkGdcm4DSplitter::GetImageDataVector() - { - if (verbose) std::cout << "TypeDir " << TypeDir << std::endl; + { +/* + if (verbose) std::cout << "GetImageDataVector : TypeResult " << TypeResult << std::endl; if (TypeResult == 2) return ImageDataVector; else @@ -144,19 +145,25 @@ User will have to specify some points } else return (std::vector*) NULL; +*/ + return ImageDataVector; } vtkImageData *vtkGdcm4DSplitter::GetImageData() { + /* + if (verbose) std::cout << "GetImageData : TypeResult " << TypeResult << std::endl; if (TypeResult == 1) return ImageData; else - if (TypeResult == 1) + if (TypeResult == 2) { return (*ImageDataVector)[0]; } else return (vtkImageData*) NULL; +*/ + return (*ImageDataVector)[0]; } bool vtkGdcm4DSplitter::setDirName(std::string &dirName) @@ -419,10 +426,19 @@ User will have to specify some points reader->Update(); /// \TODO : remove the following - //if (verbose) reader->GetOutput()->PrintSelf(std::cout, vtkIndent(2)); + if (verbose) { + std::cout << "reader->GetOutput() :" << std::endl; + reader->GetOutput()->PrintSelf(std::cout, vtkIndent(2)); + } ImageDataVector->push_back(reader->GetOutput() ); - + + std::vector::iterator it; + if (verbose) + for(it=ImageDataVector->begin(); it!=ImageDataVector->end(); ++it) { + std::cout << "-in vtkGdcm4DSplitter--------------------------" << std::endl; + (*it)->PrintSelf(std::cout, vtkIndent(2)); + } std::cout << std::endl; }