[Insight-developers] NormalizedCorrelationImageFilter::SetTemplate parameter type
Bradley Lowekamp
blowekamp at mail.nih.gov
Tue Jun 26 09:42:11 EDT 2012
David,
This certainly sounds like a bug.
Do you have a patch?
If the patch is not invasive and gets approved today, it may... just may be able to make it into the RC4.
Brad
On Jun 26, 2012, at 8:17 AM, David Doria wrote:
> 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
========================================================
Bradley Lowekamp
Medical Science and Computing for
Office of High Performance Computing and Communications
National Library of Medicine
blowekamp at mail.nih.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-developers/attachments/20120626/27d782c7/attachment.htm>
More information about the Insight-developers
mailing list