X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Testing%2FVTKTestWrite.cxx;h=34bfd060fe0a0d98f7687cab18bda8c2c971c4d9;hb=dd3805817a765e562b1b15590102e65bead50cef;hp=c3d989ee6fd3db966ca604727f9b9d5b7131d275;hpb=efd3ea11eb9d6da5f3034f5e46649d250b90c75a;p=gdcm.git diff --git a/Testing/VTKTestWrite.cxx b/Testing/VTKTestWrite.cxx index c3d989ee..34bfd060 100644 --- a/Testing/VTKTestWrite.cxx +++ b/Testing/VTKTestWrite.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: VTKTestWrite.cxx,v $ Language: C++ - Date: $Date: 2005/02/09 15:31:15 $ - Version: $Revision: 1.9 $ + Date: $Date: 2005/09/08 14:40:15 $ + 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 @@ -30,6 +30,8 @@ //Generated file: #include "gdcmDataImages.h" +#include "gdcmDebug.h" + #ifndef vtkFloatingPointType #define vtkFloatingPointType float #endif @@ -38,7 +40,7 @@ int VTKWriteTest(vtkTesting *t,vtkImageViewer *viewer, std::string const &filename, std::string const &referenceFileName) { - int retVal = 0; //by default this is an error + int retVal; t->CleanArguments(); t->AddArgument("-D"); @@ -52,13 +54,17 @@ int VTKWriteTest(vtkTesting *t,vtkImageViewer *viewer, vtkGdcmReader *origin = vtkGdcmReader::New(); origin->SetFileName( filename.c_str() ); origin->Update(); - + + std::cout << "1 ..."; + // Write the image vtkGdcmWriter *writer = vtkGdcmWriter::New(); writer->SetFileName( "TestWrite.dcm" ); writer->SetInput(origin->GetOutput()); + std::cout << "2' ...", writer->Write(); + std::cout << "2'' ..."; origin->Delete(); writer->Delete(); @@ -67,6 +73,7 @@ int VTKWriteTest(vtkTesting *t,vtkImageViewer *viewer, reader->SetFileName( "TestWrite.dcm" ); reader->Update(); + std::cout << "3 ..."; double range[2]; reader->GetOutput()->GetScalarRange(range); int dim[3]; @@ -83,7 +90,7 @@ int VTKWriteTest(vtkTesting *t,vtkImageViewer *viewer, viewer->SetSize(dim[0], dim[1]); if(dim[2] != 1) { - //For multifame dicom, take a snapshot of the center slice (+/- 1) + //For multiframe dicom, take a snapshot of the center slice (+/- 1) viewer->SetZSlice( dim[2] / 2 ); } else @@ -96,6 +103,7 @@ int VTKWriteTest(vtkTesting *t,vtkImageViewer *viewer, viewer->SetInput(NULL); } + std::cout << std::endl; //---------------------------------------------------------------------- // Transform the image to be RGB unsigned char, due to the requests in // vtkTesting processing @@ -195,6 +203,8 @@ int VTKTestWrite(int argc, char *argv[]) } } +// gdcm::Debug::DebugOn(); + int ret = 0; vtkTesting *t = vtkTesting::New(); vtkImageViewer *viewer;