Individual bits in a pixel represent individual objects:
0 [b0000] - no object
1 [b0001] - object A
2 [b0010] - object B
4 [b0100] - object C
8 [b1000] - object D
…
the picture also contains intersections of objects:
3 [b0011] - objects A and B
12 [b1100] - objects C and D
13 [b1101] - objects A and C and D
…
OUTPUT
A 2D image created by ray casting a 3D image by setting all the bits of the objects the ray “visited” during the pass. Basically using vtkGPUVolumeRayCastMapper with SetBlendModeToAdditive() but instead of summing perform a binary OR function.
I need the outline of each object defined in the 3D image from the current camera position.
Currently I am ray casting each object from the 3D image separately but I need to optimize the application.
Can you please advise me what combination of filters I should choose?
Thank you in advance for any advice…
The GPU volume ray cast mapper supports label mapping with up to 256 labels. You’d have to create a 3D volume that serves as a mask for the mapper identifying individual labels (objects, in your case). Take a look at the TestGPURayCastLabelMap for an example.
The volume mapper supports user specified custom shader code pieces. Take a look at TestGPURayCastUserShader for an example of how to override shader code in the volume mapper. The blending is done using the VTK::Shading::Impl tag.