Hi David,<br><br>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.<br>
<br>I printed the correlation output scalar range and noted that max = 5.202e+06. I fixed the pipeline and changed the wiki accordingly.<br><br>Jerome<br><br><div class="gmail_quote">2010/2/7 David Doria <span dir="ltr"><<a href="mailto:daviddoria%2Bvtk@gmail.com" target="_blank">daviddoria+vtk@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">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).<div>
<br></div><div><div>The complete example is here:</div><div><a href="http://www.vtk.org/Wiki/VTK/Examples/Images/ImageCorrelation" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Images/ImageCorrelation</a></div><div>
<br></div><div>The problem is that the output (correlation.jpg) is blank. Anyone see any reason why this would be the case?</div><div><br></div><div>Thanks,<br><br>David<br>
</div></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br>