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

Miller, James V (Research) millerjv@crd.ge.com
Wed, 18 Sep 2002 14:58:26 -0400


I changed my code to set the center at (1.5, 4.5) and got the
results I wanted.


> -----Original Message-----
> From: Damion Shelton [mailto:dmshelto@andrew.cmu.edu]
> Sent: Wednesday, September 18, 2002 12:36 PM
> To: Miller, James V (Research)
> Cc: 'insight-developers@public.kitware.com'
> Subject: Re: Two sets of changes to the ConditionalIterators
> 
> 
> >
> >
> >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-
>