[vtkusers] Set the opacity or thresholding of a VTKVolume
David Brayford
dbrayford at gmail.com
Fri Sep 9 12:42:18 EDT 2011
I am having trouble setting the threshold value for a CT volume and
only see the outside shape and not the internal geometry.
Is the code below the method I need to use to be able to see the
internal structures and as the outer casing is dense what values do I
need to increase to get better penetrating power?
volumeActor = vtkVolume::New();
Renderer->AddVolume(volumeActor);
vtkVolumeProperty *prop = vtkVolumeProperty::New();
vtkPiecewiseFunction *opacity = vtkPiecewiseFunction::New();
opacity->AddPoint(84, 0);
opacity->AddPoint(151, .3);
opacity->AddPoint(255, 1);
prop->SetScalarOpacity( opacity );
// connect up the volume to the property and the mapper
volumeActor->SetProperty( prop );
More information about the vtkusers
mailing list