<div dir="ltr">Hi,<div><br></div><div>Some applications suggest "preset" values for window/level that the user can choose for certain types of images or modalities.</div><div><br></div><div>See volview, for example: <a href="http://www.kitware.com/opensource/volview.html">http://www.kitware.com/opensource/volview.html</a></div>
<div><br></div><div>Initially, you can set the whole of the image range to map to the whole of the value range [0,1]</div><div><br></div><div>Something like:</div><div><br></div><div>    imageReader->Update();</div><div>
<br></div><div><div>    double range[2];</div><div>    imageReader->GetOutput()->GetPointData()->GetScalars()->GetRange(range);</div></div><div><br></div><div>    double window = range[1] - range[0];</div><div>
    double level = range[0] + (window/2.0);</div><div><br></div><div>    viewer->SetColorWindow(window);</div><div>    viewer->SetColorLevel(level);</div><div><br></div><div>hth</div><div><br></div><div>Goodwin</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 5, 2014 at 10:03 AM, kidane <span dir="ltr"><<a href="mailto:hiliwi.leake@gmail.com" target="_blank">hiliwi.leake@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 there,<br>
<br>
I am trying to develop robust DICOM series viewer using VTK to visualize MRI<br>
and PET series.<br>
<br>
I almost did most of the implementation but I am facing a problem with the<br>
setting of the ColorWindow and ColorLevel. every time I have to adjust these<br>
levels when I open a different series or shifted from MRI to PET.<br>
<br>
could some one help me if there is a way to synchronize the values of<br>
ColorWindow and ColorLevel with the current series and set the value based<br>
on that so that I can view any series with out changing the levels manually?<br>
<br>
thanks in advance!!!<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Automatic-ColorWindow-and-ColorLevel-setting-tp5726196.html" target="_blank">http://vtk.1045678.n5.nabble.com/Automatic-ColorWindow-and-ColorLevel-setting-tp5726196.html</a><br>

Sent from the VTK - Users mailing list archive at Nabble.com.<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>
</blockquote></div><br></div>