[Insight-developers] itk::ImageBase::TransformIndexToPhysicalPoint/TransformPointToContinuousIndex

Simon Warfield simon.warfield at childrens.harvard.edu
Tue Mar 17 21:18:06 EDT 2009


>
> I was aware of the issue, just never tripped over it before.
>
> I'm just not sure how to deal with it in this case.  It points out a
> fundamental problem in what I'm trying to do.  The net effect is this:
>
> Image A has dimensions { n, n, n } and spacing { s, s, s }
> Image B has dimensions { n/2, n/2, n/2 } and spacing { s*2, s*2, s*2 }
> Assume origin = { 0, 0, 0 } for both, and both are in the same orientation.
>
> Any physical point on an edge farthest from the origin -- e.g. { n-1, y, z
> }, { x, n-1, z }, { x, y, n-1 } etc -- is INSIDE image A, but NOT INSIDE
> image B.  Even though the two images theoretically have the same volume.
>
> And this is independent of whether the index is center-of-voxel or corner of
> voxel, or whether you're a North-going Zax or a South-going Zax.
>
> The mind reels.

Right, but since the origin is defined to be at the center of the first 
voxel,
assuming these two images have the same origin implies a translation 
between the volumes to make the center of the first voxel of each line 
up.  The coordinates of the center of the first voxel in one image are 
not at (0,0,0) in the physical coordinate system of the other image.

When you do upsampling or downsampling you need to maintain the physical 
coordinates of the position of the origin.
If you preserve the coordinates of the center of the first voxel 
appropriately, then the physical extent of the images is the same.

-- 
Simon 





More information about the Insight-developers mailing list