[Insight-users] Neighborhood Operator

Miller, James V (Research) millerjv at crd.ge.com
Tue Sep 6 10:03:03 EDT 2005


Franz, 
 
I added a NeighborhoodOperator subclass a while back that you may want to look at.  It is probably as stripped down as possible.  Take a look at Insight/Code/Common/itkAnnulusOperator.h.  This operator only provides the GenerateCoefficients() and Fill() methods.  I 
use the operator to apply to all the pixels under the neighborhood (i.e. it is not directional).
 
Jim

-----Original Message-----
From: insight-users-bounces+millerjv=crd.ge.com at itk.org [mailto:insight-users-bounces+millerjv=crd.ge.com at itk.org]On Behalf Of l franz
Sent: Tuesday, September 06, 2005 7:36 AM
To: insight-users at itk.org
Subject: [Insight-users] Neighborhood Operator


Hi everybody,

I'm creating my non-directional neighborhood operator. For that, I have created a "GenerateCoefficients" method and a "Fill" method. Then, to generate the coefficients of this operator, I call "CreateToRadius ( SizeType &)" inherted from the "NeighborhoodOperator" class. The input parameter of this last method is the operator's raduis.

This operator will be used with "NeighborhoodInnerProduct" class.

The operator size is equal to the neighborhood size. So they have the same radius. I have defined the neighborhoodradius like this:

   typedef Neighborhood< InputPixelType, ImageDimension > NeighborhoodType;
   typename NeighborhoodType::SizeType neighborhoodRadius;

Then, I called the "CreateToRadius" method like this:

   myOperator.CreateToRadius ( neighborhoodRadius );

But that doesn't work. Here is the error given by the compiler: 

no matching function for call to
`itk::UsanOperator<main (int, char **)::InputImageType, 2, itk::NeighborhoodAllocator<PixelType>
>::CreateToRadius (itk::Size<3> &)'

candidates
are: void itk::NeighborhoodOperator<TPixel, VDimension, TAllocator>::CreateToRadius (typename
itk::Neighborhood<TPixel, VDimension, TAllocator>::SizeType &) [with TPixel = PixelType, unsigned int
VDimension = 2, TAllocator = itk::NeighborhoodAllocator<PixelType>]

So, if I understand well, the radius type is wrong. The radius type must be itk::Neighborhood<TPixel, VDimension, TAllocator>::SizeType . But, for me, it's already the case... So I don't really see the reason of this problem.

Does someone has an advice on it?

Thanks a lot,

Regards,

Franz



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20050906/00eaab60/attachment.htm


More information about the Insight-users mailing list