<div dir="ltr">Hi Hiliwi,<div><br></div><div>Set the window/level in the viewer - don't use a LUT.</div><div><br></div><div>imageViewer->SetColourWindow(1500)</div><div>imageViewer->SetColourLevel(150)</div><div>
<br></div><div>These values will map an intensity range from -600 to 900 (as in your example) to a value range of 0.0 to 1.0 (black to white)</div><div><br></div><div>FYI, the above methods are just wrappers around vtkImageMapper::SetColorWindow() and vtkImageMapper::SetColorLevel</div>
<div><br></div><div>hth</div><div><br></div><div>Goodwin</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Feb 25, 2014 at 8:53 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">I able to adjust it using lookuptable for a single dicom image. But when I<br>
tried to read and display a series of Dicom images I could't able to<br>
integrate the lookuptable.<br>
<br>
could anyone help me please??? the code is down.<br>
<br>
    reader = vtkSmartPointer<vtkDICOMImageReader>::New();<br>
    imageViewer = vtkSmartPointer<vtkImageViewer2>::New();<br>
<br>
        ///////////////////<br>
<br>
    reader->SetDirectoryName(folderDCM.c_str());<br>
    reader->Update();<br>
<br>
        vtkSmartPointer<vtkLookupTable> table =<br>
vtkSmartPointer<vtkLookupTable>::New();<br>
        table->SetRange(-600,900); // image intensity range<br>
        table->SetValueRange(0.0, 1.0); // from black to white<br>
        table->SetSaturationRange(0.0, 0.0); // no color saturation<br>
        table->SetRampToLinear();<br>
        table->Build();<br>
         // Map the image through the lookup table<br>
        vtkSmartPointer<vtkImageMapToColors> color =<br>
vtkSmartPointer<vtkImageMapToColors>::New();<br>
        color->SetLookupTable(table);<br>
///////////////////////////////////////////////////////////////////////////<br>
        //color->SetInput(reader->GetOutput());<br>
         // Set the image                                      "here is the<br>
problem. I couldn't link it"<br>
         //reader->SetInput(color->GetOutput());<br>
///////////////////////////////////////////////////////////////////////////<br>
    imageViewer->SetInputConnection(reader->GetOutputPort());<br>
<br>
    imageViewer->SetRenderWindow(ui->qVTK1->GetRenderWindow());<br>
<br>
kind rgards,<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/MRI-DICOM-image-black-and-white-display-tp5726091p5726102.html" target="_blank">http://vtk.1045678.n5.nabble.com/MRI-DICOM-image-black-and-white-display-tp5726091p5726102.html</a><br>

<div class="im HOEnZb">Sent from the VTK - Users mailing list archive at Nabble.com.<br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br></div>