[vtkusers] Image correlation

David Doria daviddoria+vtk at gmail.com
Sun Feb 7 15:33:10 EST 2010


On Sun, Feb 7, 2010 at 2:49 PM, Jérôme <jerome.velut at gmail.com> wrote:

> 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
>
>
Beautiful, exactly what I was looking for. I guess my assumption that the
output was between 0 and 1 was wrong. Also, you mentioned that it is
assuming the minimum correlation is zero, but that is not true if the pixels
have negative values, correct? (which would not be the case for "real"
images like these, but if your ImageData represents some data other than
pixel values it could be the case)

Thanks Jerome,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100207/c6ce119f/attachment.htm>


More information about the vtkusers mailing list