[Insight-users] Reaing RAW Images with SimpleITK for C# Windows
Sebastian Widz
widz at infovision.pl
Sat Oct 27 03:20:01 EDT 2012
Hi,
how to read RAW files with SimpleITK for C#.
I use SimpleITK C# version 0.5.1 on Windows (64 bit)
My code is:
String fileName = @"d:\Temp\MRI\t1_icbm_normal_1mm_pn3_rf20.rawb";
ImageFileReader reader = new ImageFileReader();
reader.SetFileName(fileName);
Image image = reader.Execute();
It works fine for .png or analyze images for example but not for RAW images.
I get the following error:
System.ApplicationException : Exception thrown in SimpleITK
ImageFileReader_Execute:
..\\..\\..\\..\\..\SimpleITK\Code\IO\src\sitkImageReaderBase.cxx:44:
sitk::ERROR: Unable to determine ImageIO reader for
"d:\Temp\MRI\t1_icbm_normal_1mm_pn3_rf20.rawb"
I understand that the ImageFileReader cannot recognize the file type. Is
there a way of passing the image type and image parameters in SimpleITK
since the standard ITK templates are hidden?
Regards, Sebastian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20121027/84068e92/attachment.htm>
More information about the Insight-users
mailing list