[Insight-users] Problems trying to update ImageFileReader II: problem identified

Fran Vázquez gva03 at elai.upm.es
Thu May 11 07:45:41 EDT 2006


Hi all again !

I have pointed out the bug when updating the ImageFileReader (thanks Iván).

typedef unsigned char PixelComponentType;
typedef itk::RGBPixel< PixelComponentType > RGBPixelType;
const unsigned int Dimension = 2;

typedef itk::Image< RGBPixelType, Dimension > RGBImageType;
typedef itk::ImageFileReader< RGBImageType > ReaderType;

ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName("D:\personal\fvazquez\imagenes\5.jpg");

try
    {
        reader->Update();
    }
catch(itk::ExceptionObject &err)
    {
    CString msg;
    msg.Format("%s", err.GetDescription());
    MessageBox(NULL, msg, "Error", MB_ICONINFORMATION);
    }     

When the program reach the "reader->Update();" it crashes. The ExceptionObject shown in the messagebox is: "The file doesn't exist. D:\personal\fvazquez\imagenes\5.jpg", or more exactly:  "The file doesn't exist. D:personalvazquezimagenes.jpg", with some characters missing or wrong. 

However the image file exists and the full path is correct, I'm quite sure!. In my previous mail I write you an incomplete path (thanks Luis) but it was right typed in the code. 

Any ideas?.

Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20060511/5331b6be/attachment.html


More information about the Insight-users mailing list