X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Testing%2FVTKTestReadSeq.cxx;h=3a7d262615f8ddae7246cdf41f407609b777b53b;hb=4552d4ee18f3234af4e037e77abf0622c2702004;hp=ea92d8900e129b41aebab0022a31deb652b3cf96;hpb=587eff0d2fdea1b61c4cc9aa21f06f2ba8b42c10;p=gdcm.git diff --git a/Testing/VTKTestReadSeq.cxx b/Testing/VTKTestReadSeq.cxx index ea92d890..3a7d2626 100644 --- a/Testing/VTKTestReadSeq.cxx +++ b/Testing/VTKTestReadSeq.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: VTKTestReadSeq.cxx,v $ Language: C++ - Date: $Date: 2005/01/25 11:25:32 $ - Version: $Revision: 1.6 $ + Date: $Date: 2007/09/18 07:58:38 $ + Version: $Revision: 1.12 $ 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 "vtkImageViewer.h" #include "vtkImageData.h" @@ -26,6 +25,7 @@ #include "vtkImageShiftScale.h" #include +#include //Generated file: #include "gdcmDataSeqImages.h" @@ -34,11 +34,11 @@ #define vtkFloatingPointType float #endif -int VTKReadSeqTest(vtkTesting *t,vtkImageViewer *viewer, - std::string const & filename, - std::string const & referenceFileName) +int VTKReadSeqTest(vtkTesting *t, vtkImageViewer *viewer, + std::string const &filename, + std::string const &referenceFileName) { - int retVal = 0; //by default this is an error + int retVal; // = 0; (to avoid bcc 5.5 warnings) // Set the reader vtkGdcmReader *reader = vtkGdcmReader::New(); @@ -63,7 +63,8 @@ int VTKReadSeqTest(vtkTesting *t,vtkImageViewer *viewer, delete[] newFileDcm; reader->Update(); - double *range = reader->GetOutput()->GetScalarRange(); + double range[2]; + reader->GetOutput()->GetScalarRange(range); // Show if( viewer ) @@ -84,7 +85,7 @@ int VTKReadSeqTest(vtkTesting *t,vtkImageViewer *viewer, // make test int ret = 0; - ostrstream str; + std::ostringstream str; char *newFilePng = new char[referenceFileName.size()+1]; for(int j=0;jfreeze(1); if( retVal == vtkTesting::PASSED ) { @@ -197,7 +197,7 @@ int VTKTestReadSeq(int argc, char *argv[]) } int ret = 0; - vtkTesting* t = vtkTesting::New(); + vtkTesting *t = vtkTesting::New(); vtkImageViewer *viewer; if( show ) viewer = vtkImageViewer::New();