-// $Header: /cvs/public/gdcm/vtk/vtkGdcmReader.cxx,v 1.10 2003/06/11 13:36:54 frog Exp $
-//CLEANME#include <vtkByteSwap.h>
+// $Header: /cvs/public/gdcm/vtk/vtkGdcmReader.cxx,v 1.13 2003/07/01 10:04:37 frog Exp $
#include <stdio.h>
#include <vtkObjectFactory.h>
#include <vtkImageData.h>
vtkGdcmReader::~vtkGdcmReader()
{
// FIXME free memory
+ this->FileNameList.clear();
}
//----------------------------------------------------------------------------
strcpy(LocalName, name);
this->FileNameList.push_back(LocalName);
this->Modified();
+ delete[] LocalName;
}
//----------------------------------------------------------------------------
// Since we maintain a list of filenames, when building a volume,
// (see vtkGdcmReader::AddFileName), we additionaly need to purge
// this list when we manually positionate the filename:
- this->FileNameList.empty();
+ this->FileNameList.clear();
this->Modified();
}
///////// The files we CANNOT load are flaged. On debugging purposes
// count the loadable number of files and display thir number:
int NumberCoherentFiles = 0;
- for (std::list<std::string>::iterator FileName = FileNameList.begin();
- FileName != FileNameList.end();
- ++FileName)
+ for (std::list<std::string>::iterator Filename = FileNameList.begin();
+ Filename != FileNameList.end();
+ ++Filename)
{
- if (*FileName != "GDCM_UNREADABLE")
+ if (*Filename != "GDCM_UNREADABLE")
NumberCoherentFiles++;
}
vtkDebugMacro("Number of coherent files: " << NumberCoherentFiles);
// Variables for the UpdateProgress. We shall use 50 steps to signify
// the advance of the process:
- unsigned long UpdateProgressTarget = (unsigned long) this->NumLines
+ unsigned long UpdateProgressTarget = (unsigned long) ceil (this->NumLines
* this->TotalNumberOfPlanes
- / 50.0;
+ / 50.0);
// The actual advance measure:
unsigned long UpdateProgressCount = 0;