[Insight-users] reading a dicom series, problems

Ruby Shamir rubke at cs.huji.ac.il
Mon Jul 19 05:22:56 EDT 2004


Hi All,

We tried to read Dicom series with ImageSeriesReader and used
itkDICOMImageSeriesTest.cxx and DicomSeriesReadImageWrite.cxx as
examples.

However when trying to read the data we counteres the next exception:
"////////////////////////////////////////////////
Error reading the series 

itk::ExceptionObject (0012E4C8)
Location: "Unknown" 
File: f:\itk\code\code\io\itkimagefilereader.txx
Line: 174
Description: Invalid output object type
/////////////////////////////////////////////////"

We did not succeed to read a single image too.

In addition when tried to run itkIOTests project with option = 6 or 5
It returned with unknown exception.

What can we do?

Thank you,

     Ruby

The code is:

typedef unsigned char                       PixelType;
const unsigned int Dimension = 3;
typedef itk::Image< PixelType, Dimension >  ImageType3D;
typedef itk::ImageSeriesReader< ImageType3D > ReaderTypeSeries;

itk::DICOMImageIO2::Pointer ioDicom2d = itk::DICOMImageIO2::New();

	ReaderTypeSeries::Pointer dicomSeriesReader =
ReaderTypeSeries::New();
	dicomSeriesReader->SetImageIO(ioDicom2d);

	dicomSeriesReader->SetFileNames(fileNamesVector);
	
	try
    { 
      dicomSeriesReader->Update();
    }
		catch( itk::ExceptionObject & excp )
    {
	  fstream readerErr;
	  readerErr.open("readerErr.txt",ios::out);

      readerErr << "Error reading the series " << endl;
      readerErr << excp << endl;

      readerErr.close();
    }

while "fileNamesVector" is a vector of strings updated in MFC file
chooser window.



More information about the Insight-users mailing list