[vtkusers] again DICOM, how to read the data?
mauro maiorca
mauromaiorca at gmail.com
Mon Sep 10 01:47:15 EDT 2007
Hi all,
I got a problem trying to read my DICOMs using vtkDICOMImageReader,
but it seems unable to read the images!
I.e. the code:
vtkDICOMImageReader *reader = vtkDICOMImageReader::New();
reader->SetDirectoryName("/home/mauro/data/patient1");
reader->SetFileName("im0021.dcm");
reader->Update();
//vtkImageData *tmpImage = vtkImageData::New();
//tmpImage = reader->GetOutput();
printf ("width:%d Height:%d\n", reader->GetWidth (), reader->GetHeight() );
reader->Delete();
//tmpImage->Delete();
return 0;
it gives:
width:0 Height:0
if I leave the comments out, it gives the following segmentation fault
error message:
"ERROR: In /home/mauro/source_packages/VTK/Filtering/vtkImageSource.cxx, line 73
vtkDICOMImageReader (0x8059a78): Execute(): Method not defined.
Segmentation fault (core dumped)"
I don't have any clue, do you?
cheers,
Mauro
More information about the vtkusers
mailing list