[vtkusers] Depth peeling a volume
David Brayford
dbrayford at gmail.com
Fri Sep 9 16:19:40 EDT 2011
Does anyone know how to show the inside of a volume scan in VTK as I
can display the data but can only see the outside shell when I want to
be able to view the inside. I can view the correct structures in a
DICOM viewer, but can only display a cylinder in VTK.
The data is a vtkVolume and can generate a correct DRR within ITK
using thresholding, bujt I don't know how to do this in VTK.
I tried this, but it didn't work
volumeActor = vtkVolume::New();
renderer->AddVolume(volumeActor);
vtkVolumeProperty *prop = vtkVolumeProperty::New();
vtkPiecewiseFunction *opacity = vtkPiecewiseFunction::New();
opacity->AddPoint(20, 0);
opacity->AddPoint(20, 0);
opacity->AddPoint(20, 0);
prop->SetScalarOpacity( opacity );
// connect up the volume to the property and the mapper
volumeActor->SetProperty( prop );
Thanks
David
More information about the vtkusers
mailing list