[Insight-users] Problems in reading .mhd files

Tanweer Rashid trash001 at odu.edu
Tue Nov 20 19:31:18 EST 2012


Hi,

I am having problems reading a .MHD file. I get the following error:

d:\programfiles\itk\include\itk-4.2\itkimagefilereader.hxx:143:
 Could not create IO object for file C:\Users\trash001\Desktop\sphere.mhd
  Tried to create one of the following:
  You probably failed to set a file suffix, or
     set the suffix to an unsupported type.


My code is as follows:

typedef itk::Image<float, 3> VolumeType;
typedef itk::ImageFileReader<VolumeType> VolumeReaderType;

VolumeReaderType::Pointer reader = VolumeReaderType::New();
reader->SetFileName("C:\\Users\\trash001\\Desktop\\sphere.mhd");
reader->Update();


Thanks,
-- 
Tanweer Rashid
MSVE Dept.
Old Dominion University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20121120/8b0f22ab/attachment.htm>


More information about the Insight-users mailing list