Class SoROIManip
- java.lang.Object
-
- All Implemented Interfaces:
SafeDisposable
public class SoROIManip extends SoROI
Manipulator to transform an ROI (Region of Interest). This class defines a manipulator to transform an ROI (Region of Interest). The manipulator is a composite ofSoROI
and anSoTabBoxDragger
that allows the user to interactively move and resize the ROI.To define a simple ROI, set the limits of the ROI in the
SoROI.box
field (and do not set theSoROI.subVolume
field). The same result is obtained by setting the 'box' and 'subVolume' fields to the same value, but this is not necessary. But note that, likeSoROI
, the default ROI box is not automatically the full volume. You must initialize the ROI box to something, for example the volume dimensions minus one. SeeSoROI
for more details.Note: The edge color of the embedded dragger is modified, i.e. is not the same as the default edge color in
SoTabBoxDragger
.EXAMPLE // Initialize ROI box to full volume SoVolumeData volData = new SoVolumeData(); . . . SoROIManip roiManip = new SoROIManip(); roiManip.box.setValue( new SbVec3i32(0, 0, 0), volData.data.getSize().minus( new SbVec3i32(1, 1, 1))); root.addChild( roiManip ); File format/default:
ROIManip {
subVolume 0 0 0 0 0 0 box 0 0 0 1 1 1 flags 7 relative false boxOn true constrained false
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.ldm.nodes.SoROI
SoROI.FlagsType
-
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
Fields Modifier and Type Field Description SoSFBool
boxOn
Chooses between the 'box' (true) or the 'subVolume' (false) field in theSoROI
.SoSFBool
constrained
Constrains the dragger to fit in the data volume.-
Fields inherited from class com.openinventor.ldm.nodes.SoROI
box, dataSetId, flags, relative, subVolume
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoROIManip()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SoDragger
getDragger()
Returns the dragger node being employed by this manip.boolean
replaceManip(SoPath p, SoROI newOne)
Replaces the tail of the path, which must be this manipulator, with the givenSoROI
node.boolean
replaceNode(SoPath p)
Replaces the tail of the path with this manipulator.-
Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
-
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
-
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
-
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
-
-
-
Method Detail
-
replaceManip
public boolean replaceManip(SoPath p, SoROI newOne)
Replaces the tail of the path, which must be this manipulator, with the givenSoROI
node. If the path has a nodekit, this will try to use setPart() to insert the new node. Otherwise, the manipulator requires that the next-to-last node in the path chain be a group.The field values from the manipulator will be copied to the ROI node, and the manipulator will be replaced.
It will not make any changes to field connections. The calling process is thus responsible for keeping track of its own nodes and field connections.
-
replaceNode
public boolean replaceNode(SoPath p)
Replaces the tail of the path with this manipulator. The tail of the path must be anSoROI
node (or subclass thereof). If the path has a nodekit, this will try to use setPart() to insert the manipulator. Otherwise, the manipulator requires that the next-to-last node in the path chain be a group.The field values from the ROI node will be copied to this manipulator, and the ROI node will be replaced.
The old node will disappear if it has no references other than from the input path p and its parent, since this manipulator will be replacing it in both of those places. Nor will the manipulator make any changes to field connections of the old node. The calling process is thus responsible for keeping track of its own nodes and field connections.
-
getDragger
public SoDragger getDragger()
Returns the dragger node being employed by this manip.
-
-