[vtkusers] Volume Opacity

dsjen at cs.unc.edu dsjen at cs.unc.edu
Fri Jun 13 13:20:01 EDT 2003


Hello VTK Users,

I'm having trouble changing the opacity of a vtkVolume.  I'm creating 
a vtkPiecewiseFunction and adding the following points to the function 
with the following lines of code, where opacity is a the piecewise 
function:

	opacity.AddPoint(0, 0.0);
	opacity.AddPoint(255,0.0);

This should make the volume completely transparent after I set the 
opacity of the volume:

	...
	...
	property.SetScalarOpacity(opacity);
	...
	...
	actor.SetProperty(property);
	...
	...

If anyone has any suggestions, needs clarification, or can point me to 
any references, I'd be very grateful.  Also, just for reference, I'm 
using vtk4.0 on WindowsXP.

Thanks,
Dennis




More information about the vtkusers mailing list