X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vtk%2FvtkGdcmReader.cxx;h=a503fcb1f4282c44ec896facc12b72658a8ab0d7;hb=9dbffd306a2b7981cf033ab8402c774f8f970475;hp=bfad7be68b727295e8e94089e15ea8767027511e;hpb=f3cc252fad08c3e8dbc395f2ca7cabf47bf95302;p=gdcm.git diff --git a/vtk/vtkGdcmReader.cxx b/vtk/vtkGdcmReader.cxx index bfad7be6..a503fcb1 100644 --- a/vtk/vtkGdcmReader.cxx +++ b/vtk/vtkGdcmReader.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: vtkGdcmReader.cxx,v $ Language: C++ - Date: $Date: 2005/08/30 15:13:10 $ - Version: $Revision: 1.78 $ + Date: $Date: 2005/09/20 08:50:57 $ + Version: $Revision: 1.84 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -69,7 +69,7 @@ #include #include -vtkCxxRevisionMacro(vtkGdcmReader, "$Revision: 1.78 $") +vtkCxxRevisionMacro(vtkGdcmReader, "$Revision: 1.84 $") vtkStandardNewMacro(vtkGdcmReader) //----------------------------------------------------------------------------- @@ -540,7 +540,11 @@ void vtkGdcmReader::GetFileInformation(gdcm::File *file) this->NumColumns = file->GetXSize(); this->NumLines = file->GetYSize(); this->NumPlanes = file->GetZSize(); - this->TotalNumberOfPlanes = this->NumPlanes*InternalFileNameList.size(); + + if (CoherentFileList == 0) + this->TotalNumberOfPlanes = this->NumPlanes*InternalFileNameList.size(); + else + this->TotalNumberOfPlanes = this->NumPlanes*CoherentFileList->size(); this->ImageType = file->GetPixelType(); this->PixelSize = file->GetPixelSize(); @@ -593,8 +597,8 @@ bool vtkGdcmReader::TestFileInformation(gdcm::File *file) int numColumns = file->GetXSize(); int numLines = file->GetYSize(); int numPlanes = file->GetZSize(); - int pixelSize = file->GetPixelSize(); int numComponents; + unsigned int pixelSize = file->GetPixelSize(); if( file->HasLUT() && this->AllowLookupTable ) numComponents = file->GetNumberOfScalarComponentsRaw(); @@ -611,7 +615,7 @@ bool vtkGdcmReader::TestFileInformation(gdcm::File *file) } if( numLines != this->NumLines ) { - vtkErrorMacro(<< "File y value doesn't match with the previous ones: " + vtkErrorMacro(<< "File Y value doesn't match with the previous ones: " << file->GetFileName().c_str() << ". Found " << numLines << ", must be " << this->NumLines); @@ -619,7 +623,7 @@ bool vtkGdcmReader::TestFileInformation(gdcm::File *file) } if( numPlanes != this->NumPlanes ) { - vtkErrorMacro(<< "File z value doesn't match with the previous ones: " + vtkErrorMacro(<< "File Z value doesn't match with the previous ones: " << file->GetFileName().c_str() << ". Found " << numPlanes << ", must be " << this->NumPlanes); @@ -749,9 +753,9 @@ void vtkGdcmReader::LoadImageInMemory( numComponents = f->GetNumberOfScalarComponentsRaw(); else numComponents = f->GetNumberOfScalarComponents(); //rgb or mono - + vtkDebugMacro(<< "numComponents:" << numComponents); vtkDebugMacro(<< "Copying to memory image [" << f->GetFileName().c_str() << "]"); - size_t size; + //size_t size; // If the data structure of vtk for image/volume representation // were straigthforwards the following would be enough: @@ -767,7 +771,8 @@ void vtkGdcmReader::LoadImageInMemory( if( fileH->GetFile()->HasLUT() && AllowLookupTable ) { - size = fileH->GetImageDataSize(); + // to avoid bcc 5.5 w + /*size = */ fileH->GetImageDataSize(); src = (unsigned char*) fileH->GetImageDataRaw(); unsigned char *lut = (unsigned char*) fileH->GetLutRGBA(); @@ -792,8 +797,9 @@ void vtkGdcmReader::LoadImageInMemory( } else { - size = fileH->GetImageDataSize(); - src = (unsigned char*)fileH->GetImageData(); + //size = fileH->GetImageDataSize(); + // useless - just an accessor; 'size' unused + src = (unsigned char*)fileH->GetImageData(); } unsigned char *dst = dest + planeSize - lineSize;