[Insight-developers] Re: Two sets of changes to the ConditionalIterators

Damion Shelton dmshelto@andrew.cmu.edu
Wed, 18 Sep 2002 12:35:47 -0400


>
>
>If the default strategy is "center", then perhaps my ellipsoid center
>needed to be shifted to (1.5, 4.5)?
>
>  
>
Yes. Because of the way data space is mapped to physical space, (1.0, 
4.0) is actually the lower-left vertex of the pixel you intended to have 
as the center. So, the correct center in physical space would be (1.5, 
4.5). In general, you'd have to worry about origin and spacing, so it 
might be easier to use Image::TransformContinuousIndexToPhysicalPoint 
with (1.5, 4.5) as the continuous index.

This doesn't explain the shifting effect you noticed. I'll have to take 
a look at this; I agree with your prediction:

> I would have expected (at worst) the "center" strategy, would have 
> picked up additional points on the left and top of the ellipsoid and 
> dropped points on the right and bottom.  However, the opposite occurred

-Damion-