[Insight-developers] Image as an OrientedImage Progress

kent williams norman-k-williams at uiowa.edu
Mon Sep 22 10:07:07 EDT 2008


What I checked in as a stopgap is this: If a vector is zeros, set one
element to one, based on the contents of the other variable.  EG

[1 0] [0 0] -> [1 0] [0 1], [0 1] [0 0] -> [0 1] [1 0].

It wouldn't be 'painful' to make 3 the smallest direction cosine dimension.
2D images would still be 2D; the difference would strictly affect
calculations to and from index space to world space, to the extent they
occur in 2D image algorithms.

Right now it appears that at least the ITK tests, when they use 2D images,
are operating in index space, because otherwise, when we turn on the 'Image
Acts as Oriented Image' flag, tests would fail, because what's actually in
the direction cosines in 2D is nonsense.

I'm open to changing my idiotic fix to the equally wrong but simpler fix of
setting 2D dir cosines to identity. Or open to someone else doing it.  But I
still think that if there would ever be a case where we want something valid
to happen with physical coordinates in 2D, there will have to be 3D dir
cosines.


On 9/22/08 7:53 AM, "Rupert Brooks" <rupe.brooks at gmail.com> wrote:
> 
> I'm definitely not a fan of embedding all 2D images in 3D.  Would all
> image gradients then have to be computed in 3D, although they would be
> meaningless in the direction normal to the image?
> 
> Perhaps a less painful way to fix the issue is, if the image is read
> in 2D, but has 3D direction cosines, the 2D direction cosines are set
> to the identity.  Alternatively, one could project the appropriate set
> of coordinate axes onto the 3D image axes and come up with a set of 2D
> direction cosines related to the original embedding.  Honestly im not
> sure such a projection would actually mean very much.  However, either
> of these approaches would not give degenerate results.
> 
> Cheers,
> 
> Rupert



More information about the Insight-developers mailing list