[ITK] [ITK-users] location of point in FloodFilledSpatialFunctionConditionalConstIterator

Matt McCormick matt.mccormick at kitware.com
Mon Apr 14 13:10:05 EDT 2014


Hi Matthew,

Could the ellipsoid code be place in a self-contained, small test that
we could use to verify and possible correct the behavior?

Thanks,
Matt

On Mon, Apr 14, 2014 at 1:02 PM, matthew <mrrm at web.de> wrote:
> Hi Matt,
>
> I am not sure, but the following code seems to be suspicious.
> To my mind, the origin case is the actual center case.
> The origin case is similar to the center case, but the offset needs to be
> subrtacted.
> I haven't looked at the rest.
>
> I was using it with an ellipsoid inside-outside-function, and the ellipsoids
> were all shifted by 0.5 along each dimension.
>
> ...
> switch ( m_InclusionStrategy )
>     {
>     // Origin
>     case 0:
>       {
>       // Get the physical location of this index
>       this->m_Image->TransformIndexToPhysicalPoint(index, position);
>
>       // Evaluate the function at this point
>       return this->GetFunction()->Evaluate(position);
>       }
>       break;
>
>     // Center
>     case 1:
>       {
>       // The center of the pixel is the index provided in the function
>       // call converted to a continuous index with an offset of 0.5
>       // along each dimension
>       ContinuousIndex< double, TImage::ImageDimension > contIndex;
>
>       for ( unsigned int i = 0; i < TImage::ImageDimension; i++ )
>         {
>         contIndex[i] = (double)index[i] + 0.5;
>         }
>
>       // Get the physical location of this index
>       this->m_Image->TransformContinuousIndexToPhysicalPoint(contIndex,
> position);
>
>       // Evaluate the function at this point
>       return this->GetFunction()->Evaluate(position);
> ...
>
>
>
>
>
> --
> View this message in context: http://itk-users.7.n7.nabble.com/location-of-point-in-FloodFilledSpatialFunctionConditionalConstIterator-tp33728p33739.html
> Sent from the ITK - Users mailing list archive at Nabble.com.
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/community
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users



More information about the Community mailing list