[vtkusers] Error While Reading DICOM Images

Preeti Bindu preetibindu at gmail.com
Fri Jun 25 09:48:34 EDT 2010


Hi,

I am trying to read and display a series of DICOM images. When I build the
code there is no error but during runtime the vtkDICOMImageReader has an
error saying

ERROR: In /Users/pebble/Development/VTK/IO/vtkDICOMImageReader.cxx, line 120
vtkDICOMImageReader (0xe3e400): DICOMParser couldn't parse :
/Users/pebble/Desktop/dicom/.DS_Store

The code goes as follows:

vtkDICOMImageReader *reader = vtkDICOMImageReader :: New();
  reader-> SetDirectoryName("/Users/pebble/Desktop/dicom");
  reader-> Update();

  vtkImageViewer2 *viewer = vtkImageViewer2 :: New();
  viewer-> SetInput(reader->GetOutput());

  int NoOfImages = viewer-> GetWholeZMax();

  for (int i=0; i<=NoOfImages; ++i)
  {
    viewer-> SetZSlice(i);
    viewer-> Render();
  }

Can somebody tell me what's going wrong?

Thanks,

-- 
Regards,
Preeti Bindu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100625/9bb7491b/attachment.htm>


More information about the vtkusers mailing list