]> Creatis software - gdcm.git/blobdiff - Testing/VTKTestRead.cxx
ENH: More testing using D Clunie tools
[gdcm.git] / Testing / VTKTestRead.cxx
index 3ac95d26baa75af4500a29efed29d679cfb5625f..f17b7512e71605fa86e655b58349d3f10b3085fa 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: VTKTestRead.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/25 15:45:49 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2005/02/09 15:31: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
@@ -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"
@@ -37,8 +36,8 @@
 #endif
 
 int VTKReadTest(vtkTesting *t,vtkImageViewer *viewer,
-                std::string const & filename, 
-                std::string const & referenceFileName)
+                std::string const &filename, 
+                std::string const &referenceFileName)
 {
    int retVal = 0;  //by default this is an error
 
@@ -50,19 +49,8 @@ int VTKReadTest(vtkTesting *t,vtkImageViewer *viewer,
    t->AddArgument("-T");
    t->AddArgument( "." );
    
-   // Instead of directly reading the dicom let's write it down to another file
-   // do a scope to be sure everything gets cleanup
-   {
-      gdcm::FileHelper file( filename );
-      file.GetImageData();
-      file.SetWriteModeToRaw();
-      file.WriteDcmExplVR( "TestWrite.dcm" );
-   }
-   // Ok for now still use the original image, 
    vtkGdcmReader *reader = vtkGdcmReader::New();
-   //reader->SetFileName( filename.c_str() );
-   reader->SetFileName( "TestWrite.dcm" );
+   reader->SetFileName( filename.c_str() );
    reader->Update();
 
    double range[2];
@@ -194,7 +182,7 @@ int VTKTestRead(int argc, char *argv[])
    }
 
    int ret = 0;
-   vtkTestingt = vtkTesting::New();
+   vtkTesting *t = vtkTesting::New();
    vtkImageViewer *viewer;
    if( show )
       viewer = vtkImageViewer::New();