[Insight-users] reading a dicom series, problems

Luis Ibanez luis.ibanez at kitware.com
Tue Jul 20 01:17:49 EDT 2004


Hi Ruby,


Do your DICOM filenames have extension ".dcm" ?

Please post one of the (*exact*) DICOM filenames
that your are providing to ITK.


Thanks,


     Luis


------------------
Ruby Shamir wrote:

> Hi Luis,
> 
> Thank you very much for the answers.
> 
> I can not read even a single dicom image (even when writing the filename
> as const string).
> 
> Maybe reinstalling itk may solve the problems.
> 
> Best regards
> 
>    Ruby
> 
> -----Original Message-----
> From: Luis Ibanez [mailto:luis.ibanez at kitware.com] 
> Sent: Tuesday, July 20, 2004 5:16 AM
> To: Ruby Shamir
> Cc: insight-users at itk.org
> Subject: Re: [Insight-users] reading a dicom series, problems
> 
> 
> Hi Ruby,
> 
> When you mix ITK and MFC,
>            ...and found a problem....
> 
> The culprit must of course be MFC    :-)
> 
> ...
> 
> The exception seems to be thrown when the reader
> attempts to read one of the DICOM slice files.
> 
> It basically means that one or several of the
> filenames that you are passing in your
> "fileNamesVector" vector of strings simply does
> not exist on the disk.
> 
> Please print out the filenames contained in your
> "fileNamesVector" and post them to the list.
> 
> It is quite likely that in the process you will find
> that the filename are constructed incorrectly.
> 
> 
> 
>    Regards
> 
> 
> 
>       Luis
> 
> 
> 
> --------------------
> Ruby Shamir wrote:
> 
>>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.
>>
>>_______________________________________________
>>Insight-users mailing list
>>Insight-users at itk.org
>>http://www.itk.org/mailman/listinfo/insight-users
>>
> 
> 
> 
> 
> 
> 





More information about the Insight-users mailing list