X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Testing%2FVTKTestWrite.cxx;h=c95912c244896fecc307f743904d3319be875496;hb=951d1f96c7bff6329f19fa28444fae5c941c352d;hp=ea204cf11e078f6978712527dd3de0030ef22981;hpb=3e82e8b67eddf5d4b95b6aa2a2e2615aced4c452;p=gdcm.git diff --git a/Testing/VTKTestWrite.cxx b/Testing/VTKTestWrite.cxx index ea204cf1..c95912c2 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/02 10:05:26 $ - Version: $Revision: 1.8 $ + Date: $Date: 2005/08/30 08:27:04 $ + 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 @@ -15,7 +15,6 @@ PURPOSE. See the above copyright notices for more information. =========================================================================*/ -#include "gdcmFileHelper.h" #include "vtkGdcmReader.h" #include "vtkGdcmWriter.h" #include "vtkImageViewer.h" @@ -31,6 +30,8 @@ //Generated file: #include "gdcmDataImages.h" +#include "gdcmDebug.h" + #ifndef vtkFloatingPointType #define vtkFloatingPointType float #endif @@ -53,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(); @@ -68,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]; @@ -84,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 @@ -97,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 @@ -196,6 +203,8 @@ int VTKTestWrite(int argc, char *argv[]) } } +// gdcm::Debug::DebugOn(); + int ret = 0; vtkTesting *t = vtkTesting::New(); vtkImageViewer *viewer;