]> Creatis software - gdcm.git/blobdiff - vtk/vtkGdcmReader.cxx
* gdcmPython/gdcm.i : change gdcmHeaderHelper to gdcmSerieHeader. Now,
[gdcm.git] / vtk / vtkGdcmReader.cxx
index dc8662708c825f645b121456b40ceed821f1ccc1..a704502332df4a54f91b6cb52f02bdf635969a10 100644 (file)
@@ -49,7 +49,7 @@
 // //////////////////////////////////////////////////////////////
 
 #include "gdcmFile.h"
-#include "gdcmHeaderHelper.h"
+#include "gdcmHeader.h"
 #include "vtkGdcmReader.h"
 
 //#include <stdio.h>
@@ -58,7 +58,7 @@
 #include <vtkPointData.h>
 #include <vtkLookupTable.h>
 
-vtkCxxRevisionMacro(vtkGdcmReader, "$Revision: 1.51 $");
+vtkCxxRevisionMacro(vtkGdcmReader, "$Revision: 1.57 $");
 vtkStandardNewMacro(vtkGdcmReader);
 
 //-----------------------------------------------------------------------------
@@ -278,7 +278,7 @@ void vtkGdcmReader::ExecuteData(vtkDataObject *output)
       unsigned long UpdateProgressCount = 0;
 
       // Feeling the allocated memory space with each image/volume:
-      unsigned char *Dest = (unsigned char *)data->GetPointData()->GetScalars()->GetVoidPointer(0);
+      unsigned char *Dest = (unsigned char *)data->GetScalarPointer();
       for (std::list<std::string>::iterator filename  = InternalFileNameList.begin();
            filename != InternalFileNameList.end();
            ++filename)
@@ -631,9 +631,9 @@ size_t vtkGdcmReader::LoadImageInMemory(
    
    if( file.GetHeader()->HasLUT() && AllowLookupTable )
    {
-      size               = file.GetImageDataSizeRaw();
+      size               = file.GetImageDataSize();
       source             = (unsigned char*) file.GetImageDataRaw();
-      unsigned char *lut =                  file.GetHeader()->GetLUTRGBA();
+      unsigned char *lut = (unsigned char*) file.GetLutRGBA();
 
       if(!this->LookupTable)
       {
@@ -660,7 +660,6 @@ size_t vtkGdcmReader::LoadImageInMemory(
       source      = (unsigned char*)file.GetImageData();
    } 
    
-   unsigned char * pSource     = source; //pointer for later deletion
    unsigned char * destination = dest + size - lineSize;
 
    for (int plane = 0; plane < numPlanes; plane++)
@@ -689,8 +688,6 @@ size_t vtkGdcmReader::LoadImageInMemory(
 //   fwrite(Dest,size,1,f2);
 //   fclose(f2); 
    
-   //GetImageData allocate a (void*)malloc, remove it:
-   delete[] pSource;
    return size;
 }