[vtkusers] vtkGDCMImageReader and vtkGDCMPolyDataReader

timb tim.butler at ulh.nhs.uk
Thu Jul 12 12:03:44 EDT 2012


Hi,

I am using the vtkGDCMPolyDataReader class to read a RT Structure file, and
the vtkGDCMImageReader class to read a RT Dose file. This works fine in
seperate applications.

However when I combine the readers in a single class (or even over multiple
classes in the same application) I just get segmentation errors:

For example:

#include "vtkGDCMImageReader.h"
#include "vtkGDCMPolyDataReader.h"

int main(int argc, char *argv[])
{
  const char *filename1 = "RTStructure.dcm";
  const char *filename2 = "RTDose.dcm";

  vtkGDCMPolyDataReader *polyReader = vtkGDCMPolyDataReader::New();
  polyReader->SetFileName(filename1);
  polyReader->Update();

  vtkGDCMImageReader *imageReader = vtkGDCMImageReader::New();
  imageReader->SetFileName(filename2);
  imageReader->Update();
}


If I remove any one of the readers it works fine, else I get 'Segmentation
fault' - but putting them in different classes, calling Delete(), adding
SmartPointers makes no difference at all.

Any help is greatfully received - I'm using vtk5.6.1 and gdcm 2.2

Many thanks
Tim

--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkGDCMImageReader-and-vtkGDCMPolyDataReader-tp5714673.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list