Hi All,<br><br>I am stuck in a problem where in I have a volume rendered by using vtkVolumeRayCastCompositeFunction and vtkRayCastMapper. The volume is obtained from a series of DICOM images. I need to form an opaque volume such that I should be able to view the inside of the volume through the cavities. I am using the vtkPiecewiseFunction to do so. The snippet is as follows:<br>
<br><br clear="all">      colorTransferFunction-&gt;AddRGBPoint( -3024, 0, 0, 0, 0.5, 0.0 );<br>      colorTransferFunction-&gt;AddRGBPoint( -16, 0.73, 0.25, 0.30, 0.49, .61 );<br>      colorTransferFunction-&gt;AddRGBPoint( 641, .90, .82, .56, .5, 0.0 );<br>
      colorTransferFunction-&gt;AddRGBPoint( 3071, 1, 1, 1, .5, 0.0 );<br>      colorTransferFunction-&gt;AddRGBPoint( -155, .55, .25, .15, 0.5, .92 );<br>      colorTransferFunction-&gt;AddRGBPoint( 217, .88, .60, .29, 0.33, 0.45 );<br>
            <br>      opacityTransferFunction-&gt;AddPoint(-3024, 0, 0.5, 0.0 );<br>      opacityTransferFunction-&gt;AddPoint(-16, 0, .49, .61 );<br>      opacityTransferFunction-&gt;AddPoint(641, .72, .5, 0.0 );<br>      opacityTransferFunction-&gt;AddPoint(3071, .71, 0.5, 0.0);<br>
            <br>      volumeMapper-&gt;SetBlendModeToComposite();<br>      volumeProperty-&gt;ShadeOn();<br>      volumeProperty-&gt;SetAmbient(1.0);<br>      volumeProperty-&gt;SetDiffuse(0.9);<br>      volumeProperty-&gt;SetSpecular(0.2);<br>
      volumeProperty-&gt;SetSpecularPower(10.0);<br>      volumeProperty-&gt;SetScalarOpacityUnitDistance(0.8919);  <br><br>I have attached the output for the above inputs. Can anyone please tell me a way by which I will be able to obtain a completely opaque volume? How to specify the opacity values for the opacityTransferFunction? What is the difference between scalar opacity and gradient opacity?<br>
<br>Thanks,<br><br>-Preeti<br><br>