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

Bill Lorensen wlorens1 at nycap.rr.com
Fri May 12 16:37:45 EDT 2006


The backslashes "\" are escaping the next character. Use forward slashes 
"/" instea1d.

At 07:45 AM 5/11/2006, Fran Vázquez wrote:
>
>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.
>_______________________________________________
>Insight-users mailing list
>Insight-users at itk.org
>http://www.itk.org/mailman/listinfo/insight-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20060512/0d7c4402/attachment.htm


More information about the Insight-users mailing list