[Insight-users] Runtime error about"itkimagefilereader"

Jianfeng Xu at UIUC jxu9 at uiuc.edu
Sat Oct 21 22:18:22 EDT 2006


Hello, All,

I have some problem with reading PNG files.  When I run my code, a "Runtime Error" will occur.
My code is simple and showed as follows:

typedef itk::Image<unsigned short,2> InternalImageType;
typedef itk::ImageFileReader< InternalImageType  > ImageReaderType;
ImageReaderType::Pointer  ImageReader;

 ImageReader=ImageReaderType::New();
 ImageReader->SetFileName("med.png");
 ImageReader->Update();

The image is created by the Windows tool "Paint" and saved as "png" file.
Could some one shed light on it? Thank you!

Bests,
Jianfeng 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20061021/04ccfda7/attachment.htm


More information about the Insight-users mailing list