<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I encounter some problems in using 
vtkMapToWindowLevelColors, maybe a little confused how to use it. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>What I want to do is: I have a medical image data 
set (16 bits), and want to use this filter to do window level/width operation, 
it works well. Now I want to add some new features, for example, mark the CT 
value range of (500 - 700) to red, but keep other values to their default gray 
value. So how should I specify the this filter with LUT? Ex: window level/width 
can be specified to (400, 1000)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>  m_ImageMap->SetInput( image 
);<BR>  <BR>  vtkLookupTable* lut = 
vtkLookupTable::New();</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial 
size=2>//////////////////////////////////////////////////////////////////   
how to specify the codes in this section?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>  
lut->SetNumberOfTableValues(256);<BR>  //lut->SetHueRange(0.0, 
0.0);<BR>  //lut->SetSaturationRange(0.0, 0.0);<BR>  
//lut->SetValueRange(0.0, 1.0);<BR>  lut->Build();<BR>  for (i = 
240; i <= 255; i++)<BR>  {<BR>    
lut->SetTableValue(i, ............... );<BR>  }<BR>  for (i = 
0; i <= 240; i++)<BR>  {<BR>    lut->SetTableValue(i, 
.....................);<BR>  }</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial 
size=2>//////////////////////////////////////////////////////////////////////////</FONT></DIV>
<DIV><FONT face=Arial size=2>  </FONT><FONT face=Arial size=2></FONT></DIV>
<DIV><FONT face=Arial size=2>  
m_ImageMap->SetLookupTable(lut);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>  m_ImageMap->SetLevel( level 
);<BR>  m_ImageMap->SetWindow( width );</FONT></DIV>
<DIV><FONT face=Arial size=2>  </FONT></DIV>
<DIV><FONT face=Arial size=2>m_Actor->SetInput( m_ImageMap->GetOutput() 
);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks a lot!!!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Hui Zhang</FONT></DIV></BODY></HTML>