[ITK-users] Error while reading Unknown Image Information

Scapegoat Sarthak scapegoat.sarthak at gmail.com
Mon Mar 16 10:15:03 EDT 2015


Hi All,

I am trying to read information from different images using the Unknown
Image Type Example (http://itk.org/Wiki/ITK/Examples/IO/ReadUnknownImageType)
but I am getting an Access violation error. The three main lines of code
(which compile without issues) I am using are:

itk::ImageIOBase::Pointer imageIO =
itk::ImageIOFactory::CreateImageIO(argv[3], itk::ImageIOFactory::ReadMode );
imageIO->SetFileName(std::string(argv[3]));
imageIO->ReadImageInformation();

I am getting the error in the second line. I am using CMake to generate
project files as described in the example so the include directories and
libraries are all taken care of. I tried to read different files (.nii,
.dcm, .png, .jpg) but all of them give the same error.

Any suggestions regarding what I am doing wrong?

Thanks in advance,
Sarthak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20150316/d3485433/attachment.html>


More information about the Insight-users mailing list