]> Creatis software - gdcm.git/blobdiff - vtk/vtkGdcmReader.cxx
ENH: do not run dash on that
[gdcm.git] / vtk / vtkGdcmReader.cxx
index edfdcb367500ee8d6b56e83d09cb4228278a47e2..a387d6119ece21a049cfce3d75a9f2bb314e2ad3 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: vtkGdcmReader.cxx,v $
   Language:  C++
-  Date:      $Date: 2007/06/21 14:47:16 $
-  Version:   $Revision: 1.91 $
+  Date:      $Date: 2007/12/13 16:18:13 $
+  Version:   $Revision: 1.94 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -92,7 +92,7 @@
 #include <vtkPointData.h>
 #include <vtkLookupTable.h>
 
-vtkCxxRevisionMacro(vtkGdcmReader, "$Revision: 1.91 $")
+vtkCxxRevisionMacro(vtkGdcmReader, "$Revision: 1.94 $")
 vtkStandardNewMacro(vtkGdcmReader)
 
 //-----------------------------------------------------------------------------
@@ -111,6 +111,8 @@ vtkGdcmReader::vtkGdcmReader()
 
    this->OwnFile=true;
    // this->Execution=false; // For VTK5.0
+   
+   this->KeepOverlays = false;
 }
 
 vtkGdcmReader::~vtkGdcmReader()
@@ -333,14 +335,14 @@ void vtkGdcmReader::ExecuteData(vtkDataObject *output)
 //}                           // end For VTK5.0
 
    data->AllocateScalars();  // For VTK5.0
+   
+#if (VTK_MAJOR_VERSION >= 5) || ( VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 2 )
+//#if (VTK_MAJOR_VERSION >= 5)
    if (this->UpdateExtentIsEmpty(output))
    {
       return;
    }
-   
-//void vtkGdcmReader::BuildData(vtkDataObject *output)  // For VTK5.0
-//{
-//   vtkImageData *data = this->AllocateOutputData(output);  // end For VTK5.0
+#endif
 
    data->GetPointData()->GetScalars()->SetName("DicomImage-Volume");
 
@@ -795,7 +797,9 @@ void vtkGdcmReader::LoadImageInMemory(
 
    GDCM_NAME_SPACE::FileHelper *fileH = GDCM_NAME_SPACE::FileHelper::New( f );
    fileH->SetUserFunction( UserFunction );
-
+   
+   fileH->SetKeepOverlays ( this->KeepOverlays);
+   
    int numColumns = f->GetXSize();
    int numLines   = f->GetYSize();
    int numPlanes  = f->GetZSize();
@@ -845,7 +849,7 @@ void vtkGdcmReader::LoadImageInMemory(
       this->LookupTable->SetRange(0,255);
       vtkDataSetAttributes *a = this->GetOutput()->GetPointData();
       a->GetScalars()->SetLookupTable(this->LookupTable);
-      free(lut);
+      delete[] lut;
    }
    else
    {