[Insight-users] Re: [Bug 2256] Changed - writing and reading gipl images

Karthik Krishnan Karthik.Krishnan at kitware.com
Mon Oct 10 15:35:00 EDT 2005


Thanks for the example code. Yes indeed it was a bug and is fixed in CVS.

(BTW, I like you handy command line utility and I've installed it on my 
machine :) )

thanks
Regards
karthik

Marius Staring wrote:

> Hi Karthik,
>
> Thank you for fixing the bmp and analyze bugs. My tests succeed now.
>
> Regarding the gipl bug. The little endian - big endian seems not to be 
> the problem. I have added the program with which I detected the 
> problem as an attachment.
>
> If you build it and then run
>
>        pxcastconvert image_in.mhd image.gipl
>
> followed by
>
>       pxcastconvert image.gipl image_gipl.mhd
>
> the error will become clear.
>
> I have runned the program under windows with visual 2003 .NET under 
> debug mode. The image_type when writing the gipl is nicely set to 
> unsigned short (big endian). However, in the ReadImageInformation() 
> this image_type is read in as 0 (also big endian), resulting in an 
> unknown component type. I don't know why, and I hope you can find that 
> out :)
>
> Hope this helps,
>
> Marius Staring
>
> phpbt at public.kitware.com wrote:
>
>> ============================================================================ 
>>
>> THIS MESSAGE WAS GENERATED BY THE BUGTRACKER SOFTWARE PLEASE DO NOT 
>> REPLY
>>
>> INSTEAD FOLLOW BUG'S URL BELOW IN ORDER TO DETAIL BUG:
>> ============================================================================ 
>>
>>         Bug #: 2256 
>> (http://public.kitware.com/Bug/bug.php?op=show&bugid=2256)
>>   Reported By: marius at isi.uu.nl
>> ---------------------------------------------------------------------------- 
>>
>>       Summary: writing and reading gipl images
>>           URL:
>>       Product: ITK
>>       Version: 2.4
>>  To be Closed in Version: None
>>        Closed in Version: None
>>     Component: Build
>>       Site(s): All
>>        Status: Assigned
>>    Resolution: None
>>      Severity: Critical
>>    OS/Version: All
>>      Database: None
>>      Priority: 4
>>   Assigned To: karthik.krishnan at kitware.com
>> ============================================================================ 
>>
>>                              COMMENTS
>>
>> ----- Posted by marius at isi.uu.nl at 11:08 AM on 09-19-2005 -----
>> I can write a gipl image, but when I try to read it back, the function
>> ReadImageInformation() from GIPLImageIO returns an unknown component
>> type.
>>
>> ----- Posted by karthik.krishnan at kitware.com at 1:46 PM on 10-06-2005 
>> -----
>> + Please post an example where this happens.
>>
>> One possibility is that
>> + the data endian is incorrect. For instance the data might be 
>> written out
>> + as LittleEndian and might be read back as BigEndian. This will 
>> cause the
>> + tags indicating the component type to flip and will end up not setting
>> + the component type.. Is that the case ?
>>
>> Thanks
>>
>>  
>>
>


More information about the Insight-users mailing list