[Insight-users] BinaryFunctorNeighborhoodImageFilter ?

Miller, James V (Research) millerjv at crd.ge.com
Fri Mar 11 10:33:53 EST 2005


Jordi, 

I would just make a filter that subclasses from ImageToImageFilter.
You can write a GenerateData() or ThreadedGenerateData() method
to implement your algorithm.  You'll just need two neighborhood 
iterators, one for each input image.

You should also provided a GenerateInputRequestedRegion() method
that takes the output requested region and pads it by the radius
of the neighborhood for your computation.  That way if a user 
streams data through your filter, you will not have an artificial
boundary condition.

A filter like the Code/BasicFilters/itkNoiseImageFilter might be 
a good place to start.  It has a fairly clean implementation of 
using neighorhood iterators to calculate the standard deviation
of pixel values in a neighborhood about each pixel.  For your 
case, you will have two neighborhood iterators and will have to 
modify the GenerateInputRequestedRegion() to calculate the input
requested region for both of your inputs.  You'll also need to 
add methods to set the second input.

Jim


-----Original Message-----
From: insight-users-bounces at itk.org
[mailto:insight-users-bounces at itk.org]On Behalf Of Jordi Inglada
Sent: Thursday, March 10, 2005 10:38 AM
To: insight-users at itk.org
Subject: [Insight-users] BinaryFunctorNeighborhoodImageFilter ?


Hi all,

I want to implement a filter which produces an output whose pixels are 
computed from 2 input images. The computation is not made pixel-wise, 
but by combining the neighborhoods of the homologous pixels of the 2 
input images.

As far as I understand, the BinaryFunctorImageFilter is not appropriate 
for this task since the functor used takes pixel values as input instead 
of neighborhoods.

 Actually, I would need to replace the ImageRegionConstIterators for the 
input images by ConstNeighborhoodIterators in the ThreadedGenerateData 
of the BinaryFunctorImageFilter.

Does this kind of filter already exist in Itk?

Or should I create som kind of BinaryFunctorNeighborhoodImageFilter?

Regards,

Jordi.

-- 
CNES - DCT/SI/AP - BPI 1219
18, avenue Edouard Belin
31401 Toulouse Cedex 09 - France
Tel. +33.(0)5.61.27.33.97 - Fax. +33.(0)5.61.28.31.09

_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list