[Insight-users] minimum of two image regions

Luis Ibanez luis.ibanez at kitware.com
Wed May 20 22:23:28 EDT 2009


Hi David,

Please read the ITK Software Guide

     http://www.itk.org/ItkSoftwareGuide.pdf

in particular the Iterators chapter.

It will show you that you can define an iterator
by using an image and a subregion of the image.

For example,

    ImageRegionIterator<ImageType> it( image, region );

    it.GoToBegin();

    while( !it.IsAtEnd() )
      {
      //... do something here.
      ++it;
      }


That said,

For the comparison of your two images, you could use
the RegionOfInterestImageFilter  on each one of them
and connect the outputs to the filter that you want
to use for comparing the extracted subregions.


   Regards,


       Luis


-----------------------------
David Pastor wrote:
> Hello,
>  
> I need to do the following
>  
> Having two images which are same dimension, size, spacing, pixel type 
> and both very similar to each other, I need to compare a common region 
> (like a local geodesic comparison) without iterating over the whole image.
>  
> Is there any filter to do this quickly? otherwise, how can i set the 
> iteratos to cover only my target region instead of the whole image region?
>  
> Thanks
> David
> 
> 
> ------------------------------------------------------------------------
> 
> _____________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.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-users


More information about the Insight-users mailing list