[Insight-users] Neighborhood Operator

l franz l.franz25 at gmail.com
Tue Sep 6 07:36:18 EDT 2005


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/9526405f/attachment.htm


More information about the Insight-users mailing list