<div class="gmail_quote">On Sun, Feb 7, 2010 at 2:49 PM, Jérôme <span dir="ltr"><<a href="mailto:jerome.velut@gmail.com">jerome.velut@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
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></blockquote><div class="gmail_quote"><br></div>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)</div>
<div class="gmail_quote"><br clear="all">Thanks Jerome,<br><br><div>David</div></div>