[Insight-developers] Image as an OrientedImage Progress
Rupert Brooks
rupe.brooks at gmail.com
Mon Sep 22 11:38:47 EDT 2008
Hi Kent,
On Mon, Sep 22, 2008 at 10:07 AM, kent williams
<norman-k-williams at uiowa.edu> wrote:
> 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].
I think this approach may still yield some subtle problems. If the
direction cosines are not aligned with the coordinate axes, then this
approach could end up with non-orthogonal, and or non-unit vectors in
this matrix. In other words, the Direction matrix would not be a
valid rotation matrix.
I suspect this will cause problems.
For example, consider this direction matrix
-0.114314 0.759657 0.609908
-0.245579 0.571765 -0.757986
-0.942996 -0.241136 0.123102
>
> 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.
>
The calculation of the image derivative is one such case, and its a
pretty important case. Indeed, it may ultimately be the driver for
switching to the OrientedImage rather than the Image class, as the
registration framework was breaking down on non-axis-aligned images.
To make the question very specific, given a slice with the above
direction cosines, what is its derivative? Should it be a vector of
dimension 3, or dimension 2 in this scheme?
> 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.
There might be flaws in the tests, but what i suspect is happening is
that for the image processing tests, a fresh image is being created,
or read from a metafile format, and in both those cases the problem
will be avoided.
Cheers,
Rupert
--
--------------------------------------------------------------
Rupert Brooks
More information about the Insight-developers
mailing list