[ITK Community] Exception caught from itkImageFileReader.hxx

Girish, Gavaskar Ruturaj gavaskar.ruturaj.girish at philips.com
Mon Mar 3 23:14:18 EST 2014


Dear Jon,
Thanks for your reply, and sorry for my late reply. I do not yet know what exactly the problem is, but the program is working on another computer after compiling it exactly the same way. It surprised me, but I am happy with that. So my problem is resolved.

Regards
Ruturaj

From: Jon Haitz Legarreta [mailto:jhlegarreta at vicomtech.org]
Sent: Thursday, February 27, 2014 3:59 PM
To: Girish, Gavaskar Ruturaj
Cc: community at itk.org
Subject: Re: [ITK Community] Exception caught from itkImageFileReader.hxx

Dear Ruturaj,
in order to read a single DICOM file using the iktImageFileReader, you should use the itk::GDCMImageIO AFAIK, as in this [1] example.
For TIFF images, you'd generally use the itk::TIFFImageIO class [2], but I don't know about specificities of multipage TIFF files.
As for the toolkit you are mentioning, I see that it contains some heavy (I guess multipage) TIFF files. If the toolkit fails to open them, as you have the sources, then you may want to debug in order to provide the community with a deeper report of the problem, or you may want to report the problems to the authors of the toolkit. If it's able to read them, you may want to have a look at the sources in order to inspire your own multipage-TIFF file opening methods.
If the toolkit documentation does not say that it is able to handle DICOM files, you'd better not to assume it. Or else, if it says so, but does not provide some own sample files, then it'd be a good idea to suggest it to the authors.
Kind regards,
JON HAITZ

[1] http://www.itk.org/Doxygen/html/IO_2DicomImageReadPrintTags_8cxx-example.html
[2] http://www.itk.org/Insight/Doxygen/html/classitk_1_1TIFFImageIO.html


On 27 February 2014 11:04, Girish, Gavaskar Ruturaj <gavaskar.ruturaj.girish at philips.com<mailto:gavaskar.ruturaj.girish at philips.com>> wrote:
Hello all.

I have compiled a program which uses ITK (version 4.6). When I run the program I immediately get the following error and it aborts:

Exception caught when reading data image. The error is:

itk::ImageFileReaderException (000000000018CDA8)
Location: "void __cdecl itk::ImageFileReader<class itk::Image<float,3>,class itk
::DefaultConvertPixelTraits<float> >::GenerateOutputInformation(void)"
File: c:\program files\itk\include\itk-4.6\itkImageFileReader.hxx
Line: 143
Description:  Could not create IO object for file ..\..\image.dcm
  Tried to create one of the following:
  You probably failed to set a file suffix, or
    set the suffix to an unsupported type.

I have tried this many times with (3D) .dcm and (multipage) .tif input files, and I get the same error every time. I can surely say that I am giving the file extension correctly.
What could be the cause of this error?

Thanks.

Regards
Ruturaj

P.S.: I haven't written the program. It is freely available here<http://mosaic.mpi-cbg.de/?q=downloads/RCITK>. I am not familiar with the source code. I just want to know which different scenarios could give rise to this error (e.g. unsupported suffix & any others) which might help me know what is going wrong.

________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.

_______________________________________________
Community mailing list
Community at itk.org<mailto:Community at itk.org>
http://public.kitware.com/cgi-bin/mailman/listinfo/community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140304/20f922d8/attachment-0002.html>


More information about the Community mailing list