Demonstrate editing features
This demo show the whole workflow of editing. Select editing tools (SubVolume, Lasso or Polygon), edit volume and save result.
Following tools are available:
- SubVolume: drag the box in the area you want to edit, set the value with the slider and click Edit button.
- Lasso: use the edition tool (arrow) and draw a lasso on screen. The lasso will be extruded across the volume, setting all the voxels inside this volume with current slider value.
- Polygon: use the edition tool (arrow) and draw a polygon on the volume. You must click on visible part of the volume. To finalize polygon, double-click or hit enter key. Hit escape to cancel. The generated polygon is filled with slider value value, using slider thickness.
In this demo, a binary mask (SoVolumeMask) is edited. A value of 0 hide part of dataset, a value != 0 show the data. When saving edition, the resulting file is specified in the VolumeMask fileName field (which is by default $OIVHOME/examples/source/VolumeViz/examples/editing/editingFeature/mask.ldm)
The sceneInMemory use an InMemory dataset instead of an LDM volume mask. To use it, give the file sceneMask.iv in argument of this demo.
FILES:
-
VolumeViz/examples/editingFeature/editing.cxx
-
VolumeViz/examples/editingFeature/utils.h
-
VolumeViz/examples/editingFeature/interface.iv
-
VolumeViz/examples/editingFeature/sceneMask.iv
-
VolumeViz/examples/editingFeature/sceneInMemory.iv
SEE ALSO
SoDataSet, SoLassoScreenDrawer, SbExtrusionGenerator, SoRayPickAction
SCREENSHOT: