X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=vtk%2FvtkGdcmReader.cxx;h=a704502332df4a54f91b6cb52f02bdf635969a10;hb=2b3445eb897dead75de24df82eaea22364fa4c6c;hp=64a369f1d83b7e96f0ca16f900c5852e034d80b1;hpb=3afc179392ebebe610f7685bc8895b690c2a66aa;p=gdcm.git diff --git a/vtk/vtkGdcmReader.cxx b/vtk/vtkGdcmReader.cxx index 64a369f1..a7045023 100644 --- a/vtk/vtkGdcmReader.cxx +++ b/vtk/vtkGdcmReader.cxx @@ -49,7 +49,7 @@ // ////////////////////////////////////////////////////////////// #include "gdcmFile.h" -#include "gdcmHeaderHelper.h" +#include "gdcmHeader.h" #include "vtkGdcmReader.h" //#include @@ -58,7 +58,7 @@ #include #include -vtkCxxRevisionMacro(vtkGdcmReader, "$Revision: 1.53 $"); +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::iterator filename = InternalFileNameList.begin(); filename != InternalFileNameList.end(); ++filename) @@ -631,7 +631,7 @@ size_t vtkGdcmReader::LoadImageInMemory( if( file.GetHeader()->HasLUT() && AllowLookupTable ) { - size = file.GetImageDataSizeRaw(); + size = file.GetImageDataSize(); source = (unsigned char*) file.GetImageDataRaw(); unsigned char *lut = (unsigned char*) file.GetLutRGBA(); @@ -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,12 +688,6 @@ size_t vtkGdcmReader::LoadImageInMemory( // fwrite(Dest,size,1,f2); // fclose(f2); - //GetImageData allocate a (void*)malloc, remove it: - - // CLEANME - // Now, the delete on values keep from GetImageData is useless (made in - // the PixelConvert class) - //delete[] pSource; return size; }