This demo use SoPolygonScreenDrawer and gpuPicking to draw a polygon in volumeData. The polygon is then written to dataSet using the first clicked voxel color. Use the selection miode (arrow), and draw a polygon on the volume. You must click on the visible part of the volume. To finalize polygon, double-click or hit enter key. Hit escape to cancel.
SoDataSet SoRayPickAction SoPolygonScreenDrawer