[Insight-users] crashes N-D Linear Time Exact Signed Euclidean Distance Transform

Bill Lorensen bill.lorensen at gmail.com
Mon Jun 2 19:12:51 EDT 2008


You are correct, it should work for 2d. It is (was) a bug in the
itkAnalyzeImageIO class. The bug was both for reading and writing.
This was fixed today. You can get the fixed files from the cvs
repository.

cd Insight/Code/IO
cvs update itkAnalyzeImageIO.h itkAnalyzeImageIO.cxx

Then rebuild ITK and your code.

Bill


On Mon, Jun 2, 2008 at 3:18 PM, Oleksandr Dzyubak <adzyubak at gmail.com> wrote:
> Hi Bill,
>
> Now I am a bit confused by what you are saying.
>
> 1) You say that it works for 3D but does not for 2D.
> I cannot understand that since 2D dimensionality is a particular case of 3D.
> Lets say 2D is a 3D with just one z-component. From my prospective, it has
> to work
> for 2D if it does for 3D. Opposite is not necessary true though.
>
> 2) If I comment the writer out, the program still crashes with the same
> error.
>
> 3) All my images are in the Analyze75 format
> and while using the other ITK filters I have not had any problems so far.
> (I mean with ITK Analyze reader/writer, except orientations, of course).
>
> Do you mean that even though my executables did not complain,
> the results I was getting could be wrong since I used ITK Analyze
> reader/writer?
>
> If so, in what fashion could the final results be wrong?
>
> Is it error-prone for some particular platform/compiler
> (Linux Debian with gcc 4.1.2 in my case) or it is more general case?
>
> How severe does it affect the final results?
>
> Thanks for your help,
>
> Alex
>
>
> Bill Lorensen wrote:
>>
>> Oleksandr,
>>
>> There are some known problems in the ITK Analyze reader/writer when
>> the images are 2D and not 3D. I think the read part has been fixed
>> recently. However, the write part still has problems. If your images
>> are 3D, then all should be fine. Until we fix this 2D Analyze image
>> problem, I'm afraid you cannot run the filters.
>>
>> Bill
>>
>> On Sun, Jun 1, 2008 at 1:07 PM, Oleksandr Dzyubak <adzyubak at gmail.com>
>> wrote:
>>
>>>
>>> Hi Bill,
>>>
>>> This time I try to be more accurate.
>>>
>>> 1) I downloaded ITK from CVS, compiled with the RelWithDeb flag, and
>>> installed on my Linux box.
>>> 2) I have Debian Etch with gcc 4.1.2
>>> 3) The example itkSignedMaurerDistanceMapImageFilterTest.cxx was taken
>>> from ITK distro and not from IJ.
>>>
>>>
>>> Insight/Testing/Code/BasicFilters/itkSignedMaurerDistanceMapImageFilterTest.cxx
>>>
>>> 4) Example was compiled in debug mode.
>>> 5) As you advised, the example was run on both SquareBinary201.png and
>>> SquareBinary201.hdr.
>>>
>>> Results.
>>> As you predicted, the example has processed the *.png image taken from
>>> ITK
>>> distro resulting
>>> in a nice looking map.
>>>
>>> dzyubak at debian: /BUILD$ ./SignedMaurerDistanceMapImageFilterTest
>>> SquareBinary201.png test_png.hdr
>>> WARNING: In /root/Insight/Code/IO/itkAnalyzeImageIO.cxx, line 1280
>>> AnalyzeImageIO (0x8169a98): ERROR: Analyze 7.5 File Format Only Allows
>>> RPI,
>>> PIR, and RIP Orientation
>>>
>>> However when I tried to run it on a real stuff (all my images in
>>> Analyze75
>>> format), the same image but
>>> taken from IJ archive (SquareBinary201.hdr), it crashes.
>
>


More information about the Insight-users mailing list