Program: gdcm
Module: $RCSfile: vtkGdcmReader.cxx,v $
Language: C++
- Date: $Date: 2005/09/07 08:45:52 $
- Version: $Revision: 1.81 $
+ Date: $Date: 2005/10/25 14:52:37 $
+ Version: $Revision: 1.85 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include <vtkPointData.h>
#include <vtkLookupTable.h>
-vtkCxxRevisionMacro(vtkGdcmReader, "$Revision: 1.81 $")
+vtkCxxRevisionMacro(vtkGdcmReader, "$Revision: 1.85 $")
vtkStandardNewMacro(vtkGdcmReader)
//-----------------------------------------------------------------------------
fclose(fp);
// Read the file
- file=new gdcm::File();
+ file=gdcm::File::New();
file->SetLoadMode( LoadMode );
file->SetFileName(filename->c_str() );
file->Load();
vtkErrorMacro(<< "Gdcm cannot parse file " << filename->c_str());
vtkErrorMacro(<< "Removing this file from read files: "
<< filename->c_str());
- delete file;
+ file->Delete();
file=NULL;
InternalFileList.push_back(file);
continue;
<< " File type found : " << type.c_str()
<< " (might be 8U, 8S, 16U, 16S, 32U, 32S) \n"
<< " Removing this file from read files");
- delete file;
+ file->Delete();
file=NULL;
InternalFileList.push_back(file);
continue;
}
else if(!TestFileInformation(file))
{
- delete file;
+ file->Delete();
file=NULL;
}
it!=InternalFileList.end();
++it)
{
- delete (*it);
+ (*it)->Delete();
}
}
this->InternalFileList.clear();
if(!f)
return;
- gdcm::FileHelper *fileH = new gdcm::FileHelper( f );
+ gdcm::FileHelper *fileH = gdcm::FileHelper::New( f );
fileH->SetUserFunction( UserFunction );
int numColumns = f->GetXSize();
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:
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();
}
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;
dst += 2 * planeSize;
}
- delete fileH;
+ fileH->Delete();
}
//-----------------------------------------------------------------------------