[Insight-developers] NormalizedCorrelationImageFilter::SetTemplate parameter type

David Doria daviddoria at gmail.com
Tue Jun 26 08:17:42 EDT 2012


The function NormalizedCorrelationImageFilter::SetTemplate accepts a
OutputNeighborhoodType& .

http://www.itk.org/Doxygen/html/classitk_1_1NormalizedCorrelationImageFilter.html#a162b8d1f6412e4466fb39ffb85a4fa74

That type doesn't make sense, as this is an input argument. Shouldn't it be
an InputNeighborhoodType (though that type doesn't seem to be defined).

I ran into this problem when doing:

  typedef itk::CovariantVector<float, 3> FloatVectorType;
  typedef itk::Image<FloatVectorType, 2> FloatVectorImageType;

  itk::ImageKernelOperator<FloatVectorType> kernelOperator;
  kernelOperator.SetImageKernel(extractFilter->GetOutput());
  kernelOperator.CreateToRadius(radius);

  typedef itk::NormalizedCorrelationImageFilter<FloatVectorImageType,
MaskType,
                                                FloatImageType>
CorrelationFilterType;
  CorrelationFilterType::Pointer correlationFilter =
CorrelationFilterType::New();
  correlationFilter->SetInput(reader->GetOutput());
  correlationFilter->SetTemplate(kernelOperator); // Compiler error: no
matching function call
to SetTemplate(itk::ImageKernelOperator<itk::CovariantVector<float, 3u> >&)
  correlationFilter->Update();

The compiler thinks OutputNeighborhoodType = itk::Neighborhood<float, 2u,
itk::NeighborhoodAllocator<float> >] because 'float' is the output pixel
type.

Can someone confirm that this seems like a bug?

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-developers/attachments/20120626/5a2bbfc9/attachment.htm>


More information about the Insight-developers mailing list