[vtkusers] Differences in MIP between GPU and CPU Ray caster
ianl
ilindsay at insigniamedical.co.uk
Thu Nov 10 05:40:14 EST 2011
I hope someone can shed some light on this one - what am I missing or is this
a bug?
I am using the vtkGPUVolumeRayCastMapper to render a CT volume (signed
short) data set via vtkSmartVolumeMapper - I have stepped in to confirm
this. If I render a volume in MIP mode by setting
SetBlendModeToMaximumIntensity, the result I get is different from that
obtained when using the CPU ray caster (by setting
SetRequestedRenderModeToRayCast on the smart mapper).
For opacities set so that everything from a skin value and above is opaque
(opacity of 1), I can still see through the volume to see denser tissue when
using the GPU renderer. When using the software ray caster, the result is as
I would expect - everything of skin density and above is opaque.
My transfer functions are set up as follows:
vtkSmartPointer<vtkPiecewiseFunction> greyTransferFunction =
vtkSmartPointer<vtkPiecewiseFunction>::New();
greyTransferFunction->AddSegment( -1024. , 1.0 , 3071. , 1.0 ); // all
white
vtkSmartPointer<vtkPiecewiseFunction> opacityFunction =
vtkSmartPointer<vtkPiecewiseFunction>::New();
opacityFunction->AddSegment(lowerBound, 0., upperBound, 1.);
vtkSmartPointer<vtkVolumeProperty> volProps =
vtkSmartPointer<vtkVolumeProperty>::New();
volProps->SetColor(greyTransferFunction);
volProps->SetScalarOpacity(opacityFunction);
where lowerBound and upperBound are the lower and upper ends of the opacity
ramp.
Interestingly, this does not seem to affect the GPU implementation of
composite rendering mode (SetBlendModeToComposite) which functions as I
would expect with respect to opacity. I have tested this on an ATI and an
NVidia card with the same results. I am using a build from master extracted
on 26th October to get the ATI GPU rendering support.
Thanks, Ian Lindsay
--
View this message in context: http://vtk.1045678.n5.nabble.com/Differences-in-MIP-between-GPU-and-CPU-Ray-caster-tp4980675p4980675.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list