<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"><<a href="mailto:oka@bpe.es.osaka-u.ac.jp">oka@bpe.es.osaka-u.ac.jp</a>></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>
> setShift(0)<br>
> setScale(255)<br>
><br>
> 2012/3/23 oka <<a href="mailto:oka@bpe.es.osaka-u.ac.jp">oka@bpe.es.osaka-u.ac.jp</a>><br>
><br>
> > Dear Zukic,<br>
> ><br>
> > Thank you for your reply.<br>
> > I think shiftscale will shift the pixel value<br>
> > for example, 100 to 200 by SetShift(100).<br>
> > Greyscale image has 0 and 1 values<br>
> > and I want to change 1 to 255 remaining<br>
> > 0 unchanged.<br>
> > I am not sure how to treat such greyscale<br>
> > image file.<br>
> ><br>
> > Best regards,<br>
> ><br>
> > Oka<br>
> ><br>
> > > I guess you need to normalize image values then.<br>
> > > <a href="http://www.vtk.org/Wiki/VTK/Examples/Images/ImageShiftScale" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Images/ImageShiftScale</a><br>
> > ><br>
> > > On Thu, Mar 22, 2012 at 11:57, oka <<a href="mailto:oka@bpe.es.osaka-u.ac.jp">oka@bpe.es.osaka-u.ac.jp</a>> wrote:<br>
> > ><br>
> > > > Dear vtk users,<br>
> > > ><br>
> > > > How can I read binary image format file ?<br>
> > > > I use MetaIO file, mhd and raw files.<br>
> > > > How can I describe mhd header for binary image format file<br>
> > > > (0-1 values only) ? If 0 and 255 are used<br>
> > > > for unsigned char type, it is all right, but 0-1<br>
> > > > image shows a only black image.<br>
> > > ><br>
> > > > Best regards,<br>
> > > ><br>
> > > > Oka<br>
> > > > --<br>
> > > > oka <<a href="mailto:oka@bpe.es.osaka-u.ac.jp">oka@bpe.es.osaka-u.ac.jp</a>><br>
> > > ><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<br>
> > > > <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:<br>
> > > > <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>
> ><br>
> > --<br>
> > oka <<a href="mailto:oka@bpe.es.osaka-u.ac.jp">oka@bpe.es.osaka-u.ac.jp</a>><br>
> ><br>
> ><br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
oka <<a href="mailto:oka@bpe.es.osaka-u.ac.jp">oka@bpe.es.osaka-u.ac.jp</a>><br>
<br>
</font></span></blockquote></div><br></div>