<div class="gmail_quote">Hi David,</div><div class="gmail_quote"><br></div><div class="gmail_quote">thanks for your detailed answer since it's very helpful. </div><div class="gmail_quote"><br></div><div class="gmail_quote">
But there's still something that I don't fully understand; reading documentation of vtkImageMapToColors it says: </div><div class="gmail_quote"><br></div><div class="gmail_quote">"<i>The <a class="el" href="http://www.vtk.org/doc/release/5.6/html/a00889.html" title="map the input image through a lookup table">vtkImageMapToColors</a>
filter will take an input image of any valid scalar type, and map the
first component of the image through a lookup table. The result is an
image of type VTK_UNSIGNED_CHAR.</i>"</div><div class="gmail_quote"><br></div><div class="gmail_quote">So, even if LUT has 1024 values, the output will be 8 bits (256 values), so for my understanding, data is cut down on the output so the monitor will receive only 256 shades of gray. Am I wrong or missing something?</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">Thanks in advance!</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Fri, Nov 4, 2011 at 2:17 PM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Fri, Nov 4, 2011 at 5:43 AM, Jesús Spínola <<a href="mailto:jspinola@gmail.com">jspinola@gmail.com</a>> wrote:<br>
><br>
> How can you achieve 24bits with vtkImageActor? I can't see how to setup the<br>
> pipeline.<br>
<br>
</div>You can make a 24-bit image by using vtkImageMapToColors to apply a<br>
lookup table. The lookup table should contain 1024 entries (instead<br>
of the usual 256) in order to maintain 10-bit fidelity.<br>
<br>
When RGB data is sent to a grayscale monitor (e.g. over a DVI cable or<br>
equivalent) the monitor displays a gray value equal to the luminance,<br>
which is usually calculated from RGB according to this classic<br>
formula:<br>
<br>
Y = R*0.30 + G*0.59 + B*0.11<br>
<br>
This formula comes from the CCIR 601 digital video standard, it<br>
compensates for the fact that our eyes are more sensitive to green<br>
light than to red or blue. Virtually all software or hardware that<br>
does RGB to YUV conversion uses this formula or something very<br>
close (including monitors, JPEG software, MPEG software, etc.)<br>
<br>
So, if you want a lookup table for 10-bit greyscale, then you need a<br>
lookup table that adjusts the RGB in order to provide 1024 different<br>
values of Y (since Y = luminance = value displayed on a grayscale<br>
monitor):<br>
<br>
R G B -> Y<br>
0 0 0 -> 0.000 (exactly 0.00)<br>
1 0 0 -> 0.300 (close to 0.25)<br>
1 0 2 -> 0.520 (close to 0.50)<br>
0 1 2 -> 0.810 (close to 0.75)<br>
1 1 1 -> 1.000 (exactly 1.00)<br>
etc. for all 1024 table values<br>
<br>
Do you see what I mean by a 24-bit RGB to 10-bit greyscale conversion?<br>
The goal is to make a lookup table that uses RGB values that aren't<br>
pure gray in order to achieve 10-bits of fidelity in luminance. Then,<br>
when a grayscale monitor displays the luminance, it can display a full<br>
10 bits of grayscale.<br>
<span class="HOEnZb"><font color="#888888"><br>
- David<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Jesús Spínola<br>