]> Creatis software - gdcm.git/blobdiff - Testing/VTKTestReadSeq.cxx
Fix mistypings
[gdcm.git] / Testing / VTKTestReadSeq.cxx
index 1bc77c1d62b9737aae1acc36922f3e6ce7f907db..3a7d262615f8ddae7246cdf41f407609b777b53b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: VTKTestReadSeq.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/25 15:45:49 $
-  Version:   $Revision: 1.7 $
+  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 <iostream>
+#include <sstream>
 
 //Generated file:
 #include "gdcmDataSeqImages.h"
 #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();
@@ -85,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;j<fileCount;j++)
    {
@@ -167,7 +167,6 @@ int VTKReadSeqTest(vtkTesting *t,vtkImageViewer *viewer,
       {
          std::cerr << str.str();
       }
-      str.rdbuf()->freeze(1);
 
       if( retVal == vtkTesting::PASSED )
       {
@@ -198,7 +197,7 @@ int VTKTestReadSeq(int argc, char *argv[])
    }
 
    int ret = 0;
-   vtkTestingt = vtkTesting::New();
+   vtkTesting *t = vtkTesting::New();
    vtkImageViewer *viewer;
    if( show )
       viewer = vtkImageViewer::New();