[Insight-users] Passing an image to NormalizedCorrelationImageFilter::SetTemplate

David Doria daviddoria at gmail.com
Thu Feb 3 11:14:08 EST 2011


On Thu, Feb 3, 2011 at 9:52 AM, Markus Neuner <neuner.markus at gmx.net> wrote:
> Hi David,
>
> You need to generate the kernel image before passing it to the operator
> with:
>    extractFilter->Update();
> and you must generate the kernel with:
>    UnsignedCharImageType::SizeType radius;
>    radius[0] = 10;
>    radius[1] = 10;
>    kernelOperator.CreateToRadius(radius);
> Then it should work.
> NOTE: The radius should match your extracted image, here it is chosen to be
> 10 as an example.
>
> Attached is a working example where the VTK stuff was stripped.
>
> Cheers, Markus

Hi Markus,

Thank you for addressing this long standing issue! That seems to have
helped - the output is no longer blank - but I'm having trouble
interpreting it.

I ran this:
http://www.vtk.org/Wiki/ITK/Examples/Broken/Images/NormalizedCorrelationImageFilter

with the Gourd image:
http://gitorious.org/itkwikiexamples/itkwikiexamples/blobs/master/Testing/Data/Gourds.png

Since I extracted the 100x100 patch from location (50,50), I expected
the maximum (or minimum?) of the correlation filter output to be
(50,50) (or at least (100,100) if it did some centering or something).

Instead, the output was:
Maximum: [639, 479]
Minimum: [633, 265]

Any thoughts?

Thanks,

David


More information about the Insight-users mailing list