<div>hi .&nbsp; i have just started some development using vtk. i have to display an slc file, and provide 'user editable' transfer functions. </div>  <div>background: <BR>---------------- <BR>i am using the following, and it works fine: </div>  <div>&nbsp;&nbsp;&nbsp; colTransFunc-&gt;AddRGBPoint (&nbsp;&nbsp;&nbsp;&nbsp; 0.0, 0.0, 0.0, 0.0); <BR>&nbsp;&nbsp;&nbsp; colTransFunc-&gt;AddRGBPoint (&nbsp;&nbsp;&nbsp; 64.0, 1.0, 0.0, 0.0); <BR>&nbsp;&nbsp;&nbsp; colTransFunc-&gt;AddRGBPoint (&nbsp;&nbsp; 128.0, 0.0, 0.0, 1.0); <BR>&nbsp;&nbsp;&nbsp; colTransFunc-&gt;AddRGBPoint (&nbsp;&nbsp; 192.0, 0.0, 1.0, 0.0); <BR>&nbsp;&nbsp;&nbsp; colTransFunc-&gt;AddRGBPoint (&nbsp;&nbsp; 255.0, 0.0, 0.2, 0.0); </div>  <div>&nbsp;&nbsp;&nbsp; opacTransFunc-&gt;AddPoint(&nbsp; 20,&nbsp;&nbsp; 0.0); <BR>&nbsp;&nbsp;&nbsp; opacTransFunc-&gt;AddPoint(&nbsp; 255,&nbsp; 0.2); </div>  <div>this obviousy maps (0 to 255) to (0 to 1).&nbsp; my understanding is that the 0 to 255 represents in xyz plane,
 distance of a point from the origin. so if i have a point at say 23, and its corresponding RGB is (1,0,0), that means i am telling the vtk renderer to color all 'innermost' points as red. </div>  <div>my questions: <BR>-------------------- <BR>1) is my understanding correct? <BR>2)isnt it wrong to hardcode 255? shudn't i be getting a 'range' for the given slc file? <BR>i tried: </div>  <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; poly-&gt;ShallowCopy(reader-&gt;GetOutput()); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reader-&gt;Update(); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; poly-&gt;GetScalarRange(Range); </div>  <div>where poly = vtkPolyData and reader = vtkSLCReader, but then i always get the range as (0 to 1). so then i will be mapping (0 to 1) to (0 to 1). that obviously does not give me correct results. <BR>3) after i figure out the correct mapping, how do i change the transfer functions? say i have sliders for
 red , green and blue each, when the user changes the slider, what should happen ? can you give an example of how the above mentioned functions should change ? <BR>4) do the solutions to the above questions also apply to the changing of opacity using vtkPiecewiseFunction? </div>  <div>thanks for your patience in reading the long list . hope to get some guidance soon. thanks again. </div>  <div>-vishal<BR></div>