[Insight-developers] GDCMImageIO crashes in CanReadFile! (ITK-2857)
Williams, Norman K
norman-k-williams at uiowa.edu
Fri Mar 16 10:18:17 EDT 2012
I think I may have linked to the wrong bug report, this is the relevant
one:
https://itk.icts.uiowa.edu/jira/browse/ITK-2859
the problem is that itk::GDCMImageIO tries to read the Analyze header as
part of GDCMImageIO::CanReadFile, and fails on an assertion, crashing any
program that tries to read an analyze file. It didn't used to work that
way because by an accident of ordering, prior to ITK4, the Analyze reader
was in the list of candidate ImageIO in front of GDCMIO.
That CanRead function is missing from the ITK version of GDCM; if no one
objects I can try backporting it in, or is there sufficient reason to
refresh GDCM in ITK?
--
Kent Williams norman-k-williams at uiowa.edu
On 3/16/12 8:51 AM, "Mathieu Malaterre" <mathieu.malaterre at gmail.com>
wrote:
>Hi,
>
>On Thu, Mar 15, 2012 at 8:51 PM, Williams, Norman K
><norman-k-williams at uiowa.edu> wrote:
>> I'm trying to clear some of my longstanding ITK Jira tickets and started
>> looking at this:
>>
>> https://itk.icts.uiowa.edu/jira/browse/ITK-2857
>>
>> I verified that this is in fact a real problem. Furthermore the problem
>> is this: GDCMImageIO::CanReadFile tries to read the file with the GDCM
>> library, and the reader gets way too far into reading the file before an
>> assertion fails and it crashes.
>>
>> In other words GDCM Library Seen As Harmful.
>
>For some reason I got CCed on that message. So I am jumping in this
>bug report, but I am having a very very hard time to understand how
>GDCM could be related to a report which claims:
>
>...
>DimSize required and not defined.
>MetaObject: Read: MET_Read Failed
>MetaImage: M_Read: Error parsing file
>MetaImage: Read: Cannot parse file
>terminate called after throwing an instance of 'itk::ExceptionObject'
>what(): /home/vdelmon/work/ITK/Modules/IO/Meta/src/itkMetaImageIO.cxx:87:
>itk::ERROR: MetaImageIO(0x27314f0): File cannot be read: tata.mhd for
>reading.
>Reason: Success
>zsh: abort ./analyze_test tata.mhd titi.mhd
>...
>
>> I'm going to try and find a way to sniff a DICOM file that doesn¹t
>>involve
>> making the GDCM library cause assertion failures, but if anyone already
>> knows how to do this don't hesitate to speak up!
>
>I would suggest you give GDCM another try. The function CanRead took
>some iterations to work, see for yourself:
>
>http://gdcm.git.sourceforge.net/git/gitweb.cgi?p=gdcm/gdcm;a=commitdiff;h=
>d9da82f5;hp=d868c525d3214c38a1ec99581e205daf40387c1d#patch4
>
>A well known-code (D. Clunie) is referenced in the source code and I
>explain why this online reference does not work with real-life DICOM
>instances.
>
>2cts
>--
>Mathieu
________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you.
________________________________
More information about the Insight-developers
mailing list