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
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php

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-developers

Reply via email to