[Insight-developers] ImageSpatialObject Bug0006340

Rupert Brooks rupe.brooks at gmail.com
Tue Aug 5 13:58:52 EDT 2008


Hi Everyone,

As Luis wisely suggested i waited until after the 3.8 release to work
on this  :-)  I still need some big picture advice though.

> Please note that the first action to take, even before experimenting
> with a fix, is to add a tests that illustrates the failure. E.g. to
> add a test that exercise the condition you have identified as
> problematic.

I've added the test (itkImageMaskSpatialObjectTest2), and you all
should notice it failing in your dashboards shortly :-)

Theres more than one way to patch the problem - i'll refer back to my
previous email.  I think theres a conceptual bug, or at least
confusion in the itk::Image. I cant decide how i should make
ImageSpatialObject behave when handed an ITK image that has
non-identity directions.

>> Briefly, the image spatial object takes the coordinate transform from
>> the image that it is given, and uses that as its IndexToWorld
>> transformation.  Previously, it was ignoring the direction.  The fix
>> was a matter of adding the necessary lines to copy the direction
>> information also.
>>
>> However, this fix raises a further issue, and I'd like advice:
>>
>> The itk::Image class may have a non-identity direction component, but
>> it always ignores it.  However, a naive implementation of my fix would
>> use that direction information, giving a different behavior than the
>> itk::Image.  I could write code to check if its an ITK image, and then
>> behave differently, but this seems inelegant at best.   Is this
>> actually another bug - should an itk::Image always have an identity
>> direction, to conform with its behavior?  Can i ignore the issue,
>> assuming the user will be bright enough to only put direction
>> information in an itk::Image for a very good reason.

Does anyone have some insights into how the itkImageSpatialObject
should behave when handed an itk::Image which has non-identity
direction cosines?

(the bug in question is this one
http://public.kitware.com/Bug/view.php?id=0006340)

Cheers
Rupert B.


-- 
--------------------------------------------------------------
Rupert Brooks
McGill Centre for Intelligent Machines (www.cim.mcgill.ca)
Ph.D Student, Electrical and Computer Engineering
http://www.cyberus.ca/~rbrooks


More information about the Insight-developers mailing list