[Insight-users] reading dicom error
Ali Habib
ali.mahmoud.habib at gmail.com
Tue Dec 28 06:50:45 EST 2010
Dear All,
I used the following code to read DICOM file , but it always enter the catch
, am I forget something
typedef signed short InputPixelType;
const unsigned int InputDimension = 2;
typedef itk::Image< InputPixelType, InputDimension > InputImageType;
typedef itk::ImageFileReader< InputImageType > ReaderType;
typedef InputImageType::SizeType SizeType;
ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName( "IM35" );
typedef itk::GDCMImageIO ImageIOType;
ImageIOType::Pointer gdcmImageIO = ImageIOType::New();
reader->SetImageIO( gdcmImageIO );
try
{
reader->Update();
}
catch (itk::ExceptionObject & e)
{
std::cerr << "exception in file reader " << std::endl;
std::cerr << e << std::endl;
// return EXIT_FAILURE;
}
any suggestion please
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20101228/f7d458eb/attachment.htm>
More information about the Insight-users
mailing list