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->AddRGBPoint( -3024, 0, 0, 0, 0.5, 0.0 );<br> colorTransferFunction->AddRGBPoint( -16, 0.73, 0.25, 0.30, 0.49, .61 );<br> colorTransferFunction->AddRGBPoint( 641, .90, .82, .56, .5, 0.0 );<br>
colorTransferFunction->AddRGBPoint( 3071, 1, 1, 1, .5, 0.0 );<br> colorTransferFunction->AddRGBPoint( -155, .55, .25, .15, 0.5, .92 );<br> colorTransferFunction->AddRGBPoint( 217, .88, .60, .29, 0.33, 0.45 );<br>
<br> opacityTransferFunction->AddPoint(-3024, 0, 0.5, 0.0 );<br> opacityTransferFunction->AddPoint(-16, 0, .49, .61 );<br> opacityTransferFunction->AddPoint(641, .72, .5, 0.0 );<br> opacityTransferFunction->AddPoint(3071, .71, 0.5, 0.0);<br>
<br> volumeMapper->SetBlendModeToComposite();<br> volumeProperty->ShadeOn();<br> volumeProperty->SetAmbient(1.0);<br> volumeProperty->SetDiffuse(0.9);<br> volumeProperty->SetSpecular(0.2);<br>
volumeProperty->SetSpecularPower(10.0);<br> volumeProperty->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>