[Insight-developers] ImageRegion bounds caching

Luis Ibanez luis.ibanez at kitware.com
Tue Mar 1 09:26:15 EST 2011


Hi Michael,

Are you using an image region in an inner loop ?

The bounds computation only takes one addition per dimension,...

Is the operation so critical that it is worth the pain
of maintained a cached variable synchronized ?

Have we run any profiling that points at this operation
as a critical one ?


     Luis


--------------------------------
On Wed, Feb 23, 2011 at 4:48 PM, M Stauffer (V) <mstauff at verizon.net> wrote:
> Hi,
>
> I'd like to change ImageRegion to cache its bounds when its members
> m_Size and/or m_Index are set, then compute ImageRegion::IsInside more
> quickly by simple comparison against the bounds. As a reference, bounds
> caching is done in itkImageFunction::SetInputImage, and used in
> itkImageFunction::IsInside routines.
>
> Since this is such a fundamental method, I'd like to check first if
> there's something I'm missing?
>
> Cheers,
> Michael
>
> _______________________________________________
> 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://kitware.com/products/protraining.html
>
> 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-developers
>


More information about the Insight-developers mailing list