<font><font face="verdana,sans-serif">Try this:</font></font> <a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/ImageValueRange">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/ImageValueRange</a> <div><font>or this: <a href="http://vtk.1045678.n5.nabble.com/Scale-Image-Values-to-0-1-tp4808465p4809978.html">http://vtk.1045678.n5.nabble.com/Scale-Image-Values-to-0-1-tp4808465p4809978.html</a><br>

</font><br><div class="gmail_quote">2012/3/24 oka <span dir="ltr">&lt;<a href="mailto:oka@bpe.es.osaka-u.ac.jp">oka@bpe.es.osaka-u.ac.jp</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Dear Zukic,<br>
<br>
Thank you for your comment.<br>
Result is all right.<br>
I want to judge automatically<br>
if max pixel value is 1 or 255.<br>
Is there any easy way to check<br>
or get  pixel values ?<br>
<br>
Best regards,<br>
<br>
Oka<br>
<div class="HOEnZb"><div class="h5"><br>
&gt; setShift(0)<br>
&gt; setScale(255)<br>
&gt;<br>
&gt; 2012/3/23 oka &lt;<a href="mailto:oka@bpe.es.osaka-u.ac.jp">oka@bpe.es.osaka-u.ac.jp</a>&gt;<br>
&gt;<br>
&gt; &gt; Dear Zukic,<br>
&gt; &gt;<br>
&gt; &gt; Thank you for your reply.<br>
&gt; &gt; I think shiftscale will shift the pixel value<br>
&gt; &gt; for example,  100 to 200 by SetShift(100).<br>
&gt; &gt; Greyscale image has 0 and 1 values<br>
&gt; &gt; and I want to change 1 to 255 remaining<br>
&gt; &gt; 0 unchanged.<br>
&gt; &gt; I am not sure how to treat such greyscale<br>
&gt; &gt; image file.<br>
&gt; &gt;<br>
&gt; &gt; Best regards,<br>
&gt; &gt;<br>
&gt; &gt; Oka<br>
&gt; &gt;<br>
&gt; &gt; &gt; I guess you need to normalize image values then.<br>
&gt; &gt; &gt; <a href="http://www.vtk.org/Wiki/VTK/Examples/Images/ImageShiftScale" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Images/ImageShiftScale</a><br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; On Thu, Mar 22, 2012 at 11:57, oka &lt;<a href="mailto:oka@bpe.es.osaka-u.ac.jp">oka@bpe.es.osaka-u.ac.jp</a>&gt; wrote:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Dear vtk users,<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; How can I read binary image format file ?<br>
&gt; &gt; &gt; &gt; I use MetaIO file, mhd and raw files.<br>
&gt; &gt; &gt; &gt; How can I describe mhd header for binary image format file<br>
&gt; &gt; &gt; &gt; (0-1 values only) ?  If 0 and 255 are used<br>
&gt; &gt; &gt; &gt; for unsigned char type, it is all right, but 0-1<br>
&gt; &gt; &gt; &gt; image shows a only black image.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Best regards,<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Oka<br>
&gt; &gt; &gt; &gt; --<br>
&gt; &gt; &gt; &gt; oka &lt;<a href="mailto:oka@bpe.es.osaka-u.ac.jp">oka@bpe.es.osaka-u.ac.jp</a>&gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; _______________________________________________<br>
&gt; &gt; &gt; &gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Visit other Kitware open-source projects at<br>
&gt; &gt; &gt; &gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt; &gt; &gt; &gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Follow this link to subscribe/unsubscribe:<br>
&gt; &gt; &gt; &gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt; oka &lt;<a href="mailto:oka@bpe.es.osaka-u.ac.jp">oka@bpe.es.osaka-u.ac.jp</a>&gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
oka &lt;<a href="mailto:oka@bpe.es.osaka-u.ac.jp">oka@bpe.es.osaka-u.ac.jp</a>&gt;<br>
<br>
</font></span></blockquote></div><br></div>