[vtkusers] Image correlation

Jérôme jerome.velut at gmail.com
Sun Feb 7 14:49:58 EST 2010


Hi David,

When I change the type of the scalar data -eg. from double to uchar for
writing jpeg-, I rather use vtkImageShiftScale. You can set a primary shift
(eg. set min to zero) and then scale (eg. set max to 255). I think it has
been designed especially for that because it includes a cast-like behaviour:
SetOutputScalarTypeToXxxx.

I printed the correlation output scalar range and noted that max =
5.202e+06. I fixed the pipeline and changed the wiki accordingly.

Jerome

2010/2/7 David Doria <daviddoria+vtk at gmail.com <daviddoria%2Bvtk at gmail.com>>

> I am trying to adapt the tcl vtkImageCorrelate test into an example. The
> documentation says that the output of vtkImageCorrelate will be double
> values (I am expecting between -1 and 1 (or 0 and 1)?). To view an image of
> the correlation values, I turn these double values into an unsigned char
> image (I used vtkImageMathematics to multiply by 255).
>
> The complete example is here:
> http://www.vtk.org/Wiki/VTK/Examples/Images/ImageCorrelation
>
> The problem is that the output (correlation.jpg) is blank. Anyone see any
> reason why this would be the case?
>
> Thanks,
>
> David
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100207/9309044c/attachment.htm>


More information about the vtkusers mailing list