<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_ym19_1_1462886966089_2548" abp="2182"><span id="yui_3_16_0_ym19_1_1462886966089_2547" abp="2183">Very useful your comments ! I have learned something here.</span></div><div id="yui_3_16_0_ym19_1_1462886966089_2551" abp="2182"><span abp="2183"></span><br></div><div id="yui_3_16_0_ym19_1_1462886966089_2546" abp="2182"><span abp="2183">The line </span></div><div id="yui_3_16_0_ym19_1_1462886966089_2698" abp="2182"><span abp="2183"></span><br></div><div id="yui_3_16_0_ym19_1_1462886966089_2608" dir="ltr" abp="2182"><span id="yui_3_16_0_ym19_1_1462886966089_2718" abp="2183">> table->SetRange(0, 2047)</span></div><div id="yui_3_16_0_ym19_1_1462886966089_2609" dir="ltr" abp="2182"><span abp="2183"></span><br></div><div id="yui_3_16_0_ym19_1_1462886966089_2611" dir="ltr" abp="2182"><span id="yui_3_16_0_ym19_1_1462886966089_2610" abp="2183"><strong>is whole thing</strong>: I have removed lookup table from vtkMapImageToColors because I didn't found the proper value to setup lookup range, for CT images ... </span></div><div id="yui_3_16_0_ym19_1_1462886966089_2650" dir="ltr" abp="2182"><span abp="2183"></span><br></div><div id="yui_3_16_0_ym19_1_1462886966089_2649" dir="ltr" abp="2182"><span id="yui_3_16_0_ym19_1_1462886966089_2648" abp="2183"><em id="yui_3_16_0_ym19_1_1462886966089_2702">Without lookup table</em> I have the original window/level on my renderer, but, I get those warnings ... <em id="yui_3_16_0_ym19_1_1462886966089_2703">with lookup table</em>, and with [0, 2047] range, I have whiter images (and believe me, I had tried a lot of values).</span></div><div id="yui_3_16_0_ym19_1_1462886966089_2674" dir="ltr" abp="2182"><span abp="2183"></span><br></div><div id="yui_3_16_0_ym19_1_1462886966089_2673" dir="ltr" abp="2182"><span id="yui_3_16_0_ym19_1_1462886966089_2693" abp="2183">How can I get out of this trouble ?</span></div><div id="yui_3_16_0_ym19_1_1462886966089_2692" dir="ltr" abp="2182"><span abp="2183"></span><br></div><div id="yui_3_16_0_ym19_1_1462886966089_2691" dir="ltr" abp="2182"><span abp="2183">Flaviu.</span></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font face="Arial" size="2"> On Tuesday, May 10, 2016 3:20 PM, David Gobbi <david.gobbi@gmail.com> wrote:<br></font></div> <br><br> <div class="y_msg_container"><div id="yiv3015400661"><div><div dir="ltr">On Tue, May 10, 2016 at 5:53 AM, Flaviu2 via vtkusers <<a href="mailto:vtkusers@vtk.org" target="_blank" rel="nofollow" shape="rect" ymailto="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>> wrote:<br clear="none"><br clear="none">> My question is, it is OK to give up of lookup table ?<div><div><br clear="none"></div><div>If the input is 16-bit data (like most DICOM) then it needs a lookup table.</div><div><br clear="none"></div><div>> And how to setup VTK_UNSIGNED_CHAR at my input image data ?</div><div><br clear="none"></div><div>Don't! If the DICOM file is 16-bit data, then use 16-bit data in VTK.</div><div><br clear="none">> I have tried this:<br clear="none">><br clear="none">> m_pDICOMReader->GetOutput()->AllocateScalars(VTK_UNSIGNED_CHAR, 3);</div><div><br clear="none"></div><div>This will not work. The reader cannot read a 16-bit file into an 8-bit output.</div><div><div class="yiv3015400661yqt2395245240" id="yiv3015400661yqtfd57774"><br clear="none">> Not working .... can you help me, please ?</div><br clear="none"><br clear="none"></div></div><div>Create a vtkLookupTable for vtkImageMapToColors.</div><div><br clear="none"></div><div>table->SetValueRange(0.0, 1.0);</div><div>table->SetSaturationRange(0.0, 0.0);</div><div>table->SetRampToLinear();</div><div>table->Build();</div><div><br clear="none"></div><div>Also, use table->SetRange(min, max) to tell the lookup table the min and max</div><div>values in the image, e.g. something like table->SetRange(0, 2047).</div><div><br clear="none"></div><div>Cheers,</div><div> - David</div><div class="yiv3015400661yqt2395245240" id="yiv3015400661yqtfd86083"><div><br clear="none"></div></div></div></div></div><br><br></div> </div> </div> </div></div></body></html>