MeVisLabToolboxReference
|
SoView2DMarkerEditor is a geometry editor that stores markers in a XMarkerList and allows editing of these. More...
#include <SoView2DMarkerEditor.h>
Public Types | |
enum | vectorDragMode { VECTOR_DRAG_NONE, VECTOR_DRAG_STARTPOINT, VECTOR_DRAG_ENDPOINT, VECTOR_DRAG_OFFSET, VECTOR_DRAG_MOVE, VECTOR_DRAG_RESIZE } |
mode of the editor for new objects More... | |
enum | editorModeType { EDIT_VECTOR = 0, EDIT_MARKER = 1, EDIT_OBJECT = 2 } |
mode of the editor for new objects More... | |
enum | drawModeType { DRAW_VECTOR = 0, DRAW_MARKER, DRAW_DISC, DRAW_SPHERE, DRAW_VECTOR_AND_DISC } |
draw mode of the editor More... | |
enum | editorColorType { COLOR_BY_INDEX = 0, COLOR_BY_TYPE = 1, COLOR_BY_ID = 2 } |
type of color used for markers More... | |
enum | textColorType { COLOR_LIKE_MARKER = 0, COLOR_TEXT = 1 } |
type of color for text labels More... | |
enum | textModeType { TEXT_OFF, TEXT_STYLEINDEX, TEXT_STYLENAME, TEXT_ITEMNAME, TEXT_ITEMID, TEXT_VOXELPOS, TEXT_WORLDPOS, TEXT_LENGTH, TEXT_MARKERTYPE, TEXT_MARKERLISTINDEX } |
type of text printed at markers More... | |
enum | textPositionType { TEXT_POSITION_CENTER, TEXT_POSITION_ABOVE, TEXT_POSITION_RIGHT_ABOVE, TEXT_POSITION_RIGHT, TEXT_POSITION_RIGHT_BELOW, TEXT_POSITION_BELOW, TEXT_POSITION_LEFT_BELOW, TEXT_POSITION_LEFT, TEXT_POSITION_LEFT_ABOVE } |
position for text printed at markers More... | |
enum | vectorArrowType { VECTOR_NO_ARROWS = 0, VECTOR_END_ARROW = 1, VECTOR_START_ARROW = 2, VECTOR_BOTH_ARROWS = 3, VECTOR_PLUS_MINUS = 4, VECTOR_PM_WITH_ARR = 5, BOX_START_TO_END = 6, BOX_PLUS_MINUS = 7 } |
type of drawn arrows More... | |
enum | depthVectorDrawType { DRAW_NONE, DRAW_HIGHLIGHT_SLICE_SEGMENT } |
type of vector drawing in depth More... | |
enum | depthVisibilityType { DEPTH_IN_SLICES, DEPTH_IN_MM } |
Depth visibility mode. More... | |
Public Member Functions | |
SoView2DMarkerEditor () | |
Constructor. | |
void | draw (View2DSliceList *dsl, View2DSlice *dslice, int slice) |
reimplemented from SoView2DExtension | |
bool | evalEvent (SoView2D *view2d, View2DSliceList *slicelist, View2DEvent *ec, View2DEventPhase phase) |
reimplemented from SoView2DExtension | |
void | deleteSelectedObject () |
delete the selected object | |
bool | isActive () |
returns if the editor is active | |
void | setupIcons () |
setup the icons from an icon file | |
bool | ignoreEvent (View2DEvent *ec) |
Overwrite ignoreEvent -> ignore the "ignoreHandledEvents"-Field. | |
Static Public Member Functions | |
static void | initClass () |
Inventor runtime type system. | |
static bool | handleNotificationCB (void *usrData, ml::Field *field) |
callback from the XMarkerListContainer's handleNotification | |
Public Attributes | |
SoSFFloat | depthVisibility |
defines up to which distance markers are visible value is either in slices or in mm depending on the depthVisibilityMode field | |
SoSFEnum | depthVisibilityMode |
select the mode for depth visibility | |
SoSFBool | snapToVoxel |
sets if the markers snap to the center of a voxel | |
SoSFEnum | editorMode |
select the mode for creation of new object | |
SoSFBool | deleteOnClick |
set if markers are deleted on click | |
SoSFBool | addOnClick |
flag for permitting adding of markers | |
SoSFBool | selectingOn |
flag to set if it is possible to select a marker | |
SoSFBool | actOnReleaseOnly |
flag to add a marker on mouse release only, not on mouse press | |
SoSFEnum | colorMode |
choose the mode of the color for markers | |
SoSFEnum | textMode |
choose the mode of the text for markers | |
SoSFEnum | textPosition |
choose the position mode of the text for markers | |
SoSFEnum | textColorMode |
choose the color of the text for markers | |
SoSFColor | textColor |
extra text color, depends on textColorMode if it is used | |
SoSFBool | textShadow |
flag if text shadow should be drawn | |
SoSFInt32 | textFontSize |
font size of text | |
SoSFBool | showTextOnlyForSelectedMarker |
show text only for selected marker; | |
SoSFBool | cutText |
cut text after a maximum number of lines (defined by "maxNumberOfLines") | |
SoSFInt32 | maxNumberOfLines |
choose the maximum number of lines of text, if "cutText" is turned on | |
SoSFEnum | vectorArrow |
choose how vector arrows are drawn | |
SoSFInt32 | vectorLineWidth |
line width for vectors | |
SoSFFloat | alphaFactor |
alpha factor applied to all markers | |
SoSFFloat | minimumAlpha |
minimum alpha value for all markers | |
SoSFInt32 | currentType |
current type of marker (used for new markers) | |
SoSFMLBase | outputMLModule |
hybrid ML module requires a field named "outputMLModule" for MeVisLab to be able to use the ML module | |
SoSFMLBase | stylePalette |
input style palette | |
SoSFBool | drawMarkerShapesWithLines |
determines how markers are rendered with style palette when icon file is disabled if false, markers are always rendered as squares if true, markers are rendered with shapes according to palette marker type | |
SoSFBool | useIconFile |
set if the icon file should be used | |
SoSFInt32 | iconIdx |
set the initial index inside of the icon file | |
SoSFString | iconFile |
name of the icon file (with $() vars) | |
SoSFString | internalIconFile |
expanded (real) icon file path | |
SoSFInt32 | currentStyleIndex |
styleindex of the activated object referring to the stylepalette | |
SoSFEnum | depthVectorDrawMode |
defines certain draw modes | |
SoSFEnum | drawMode |
defines the visualization mode of the marker | |
SoSFBool | highlightSelection |
All other markers are drawn as simple markers (this may be useful if there are too many markers lying together) | |
SoSFBool | useAntiAlias |
toggles the use of anti aliasing (openGL). | |
SoSFBool | useVectorLengthAsMarkerSize |
should the vector's length set the marker's size? | |
SoSFBool | selectiveDrawing |
if this option is turned on, only the current marker is drawn in the selected draw mode All other markers are drawn as simple markers (this may be useful if there are too many markers lying together) | |
SoSFBool | selectionBoxesForCurrentOnly |
If this option is turned on, selection boxes are only drawn for the current marker (Requested in support forum: UsingMevisLab->"Turning off selection markers of arrows in SoView2DMarkerEditor") | |
SoSFBool | cooperative |
If "cooperative"-mode is turned on clicks besides the current markers (+ "Selection Tolerance") are ignored, except when "CreateMode" is turned on This can be used to handle the parallel editing of more than one marker editor (or other view2d extensions reacting on mouse events -> SoView2dPosition, SoView2dRectangle) | |
SoSFBool | busy |
This field shows if an operation like moving a marker around is finished (e.g. | |
SoSFBool | snapToSlice |
sets if the markers snap to the current slice when they are moved | |
SoSFBool | overwriteCurrentTimePoint |
Should the current time point be overwritten? | |
SoSFInt32 | newCurrentTimePoint |
Sets the new current time point. | |
Protected Member Functions | |
MLssize_t | performHitTest (float deviceX, float deviceY, const SbVec3f &eventVoxel, View2DSliceList *slicelist, vectorDragMode &dragMode) |
returns selected item (-1 if nothing hit) and drag mode | |
void | immediateItemAction (ml::ListBase::ActionClass action, MLssize_t index) |
perform action on marker list immediately | |
void | itemAction (ml::ListBase::ActionClass action, MLssize_t index) |
perform action on marker list, possibly delayed if actOnReleaseOnly is set (action is stored in _currAction, _currIndex and _currItem then) | |
bool | startDrag (float deviceX, float deviceY, const SbVec3f &eventVoxel, View2DSliceList *slicelist, bool validLocation, bool performAction) |
(Try to) start dragging operation at the given coordinates, returns true if the position was/could be used for some operations. | |
void | performDrag (const SbVec3f &eventVoxel, View2DSliceList *slicelist) |
Continue drag operation started with startDrag (with performAction = true). | |
void | finishDrag () |
Finish drag operation started with startDrag. | |
int | calculateCurrentStyleIndex () |
Calculates and returns the current style index for the selected marker depending on the colormode. | |
MLssize_t | isDiscHit (const ml::vec3 &cursorPosition, View2DSliceList *slicelist, vectorDragMode &dragMode) |
Checks if any of the markers interpreted as discs is hit by the "cursorPosition". | |
MLssize_t | isSphereHit (const ml::vec3 &cursorPosition, View2DSliceList *slicelist, vectorDragMode &dragMode) |
Checks if any of the markers interpreted as spheres is hit by the "cursorPosition". | |
MLssize_t | isBoxHit (const ml::vec3 &cursorPosition, View2DSliceList *slicelist, vectorDragMode &dragMode) |
Checks if any of the markers interpreted as boxes is hit by the "cursorPosition". | |
void | resizeObject (const ml::vec3 &startCursorPosition, const ml::vec3 &endCursorPosition, ml::XMarkerList *markers) |
Resizes the selected marker depending on the mouse movement from "startCursorPosition" to "endCursorPosition". | |
void | moveObject (const ml::vec3 &startCursorPosition, const ml::vec3 &endCursorPosition, ml::XMarkerList *markers) |
Moves the selected marker depending on the mouse movement from "startCursorPosition" to "endCursorPosition". | |
bool | markerIsHit (float markerSize, float pointX, float pointY, float centerX, float centerY, bool shouldSnapToVoxel, SbVec3f hitPositionVoxel, SbVec3f markerPositionVoxel) |
Checks whether a marker with the given size is hit at the given position. | |
bool | isDepthVisible (float depthValue, float voxelSizeZ) |
Checks if the given value is within the depthVisibility. | |
float | getDepthVisibilityBlendValue (float distance, float voxelSizeZ) |
Returns the blend factor for depth visibility, depending on the unit mode. | |
bool | isVectorDepthVisible (float depthValue1, float depthValue2, int slice, float voxelSizeZ) |
Returns whether a vector is visible according to its position and the various depth visibility settings. | |
bool | isVectorCrossedBySlice (float depthValue1, float depthValue2, int slice, float voxelSizeZ) |
Returns whether a vector is crossed by a slice. | |
bool | isDiscVisible (ml::Disc *disc, View2DSliceList *slicelist, int slice) |
Checks if the given "disc" is visible in the given slice. | |
bool | isSphereVisible (View2DSliceList *slicelist, const ml::vec3 ¢er, float radius, int slice) |
Checks if the sphere defined by "center" and "radius" is visible in the given slice. | |
void | drawVector (const ml::XMarker &marker, bool isSelected, int markerIndex, View2DSliceList *slicelist, View2DSlice *dslice, int slice, float voxelSizeZ, const SbVec4f &originalMarkerColor) |
Draws the given marker as a vector (or box, depending on the mode). | |
void | drawVectorCrossedBySlices (const ml::XMarker &marker, bool isSelected, float lineWidth, int markerIndex, View2DSliceList *slicelist, View2DSlice *dslice, int slice) |
Draws a vector crossed by slices. Can draw a plus/minus vector. | |
void | drawVectorCross (float deviceX1, float deviceY1, float deviceX2, float deviceY2, float lineWidth) |
Draws the section of a vector crossed by the current slice. | |
void | drawVectorBelow (float deviceX1, float deviceY1, float deviceX2, float deviceY2, float lineWidth) |
Draws the section of a vector below the current slice. | |
void | drawVectorAbove (float deviceX1, float deviceY1, float deviceX2, float deviceY2, float lineWidth) |
Draws the section of a vector above the current slice. | |
void | drawVectorBox (const ml::XMarker &marker, bool isSelected, int markerIndex, int lineWidth, View2DSliceList *slicelist, View2DSlice *dslice, int slice) |
Draws the axis aligned box. Can handle plus/minus mode. | |
void | drawVectorArrowHeads (const ml::XMarker &marker, bool isSelected, int markerIndex, View2DSliceList *slicelist, View2DSlice *dslice, int slice) |
Draws arrow head(s). | |
void | drawVectorArrowHead (const SbVec2f &deviceStart, const SbVec2f &deviceEnd, bool isEndArrow) |
Draws a single arrow head. | |
void | drawMarker (float deviceX, float deviceY, int size, bool selected, int markerindex, const ml::XMarker &marker) |
Chooses whether to draw a marker via texture or by gl lines. | |
void | drawMarkerWithLines (ml::StylePalette::MarkerType markertype, float deviceX, float deviceY, float size, int lineWidth, bool antiAlias, const ml::XMarker &marker) |
Draws a single marker. | |
int | getPaletteIndex (const ml::XMarker &marker, int i) |
Returns the index into the style palette, depending on the color mode or 0 if no style palette is attached. | |
void | drawSphere (ml::Sphere *s, View2DSliceList *dsl, View2DSlice *dslice, int slice, float r, float g, float b, bool bHighlight, float alphaFactor=1.0f) |
Draws a single sphere "s". | |
void | drawDisc (ml::Disc *d, View2DSliceList *dsl, View2DSlice *dslice, int slice, float r, float g, float b, bool bHighlight, float alphaFactor=1.0f) |
Draws a single disc "d". | |
void | drawTextForMarker (const ml::XMarker &marker, MLssize_t index, float vx, float vy, float vz, size_t i, View2DSlice *dslice, const ml::XMarkerList *markers, float *rgba) |
Draws text for the given marker. | |
void | updatePalette () |
updates the stylepalette depending on the currently connected stylepalette | |
virtual int | getTimePoint (View2DSliceList *slicelist, int slice) |
Returns the current timepoint which is either the actual shown timepoint or the timepoint overwritten by the field overwriteTimePoint; The slice parameter is not used in the standard implementation but can be necessary in derived classes. | |
void | computeVoxelMinMaxZ (float &minz, float &maxz, const ml::XMarker &marker, View2DSliceList *slicelist) |
compute the min/max z values of a marker, depending on box mode | |
void | getProjectedDeviceCoordinates (const ml::XMarker &marker, SbVec3f &voxelStartPosition, SbVec3f &voxelEndPosition, float &deviceStartX, float &deviceStartY, float &deviceEndX, float &deviceEndY, int slice, View2DSliceList *slicelist) |
Projects the given marker positions on the current slice and converts the projected positions to device coordinates, also returns the start/end voxel positions. | |
void | getProjectedDeviceCoordinates (const ml::XMarker &marker, float &deviceStartX, float &deviceStartY, float &deviceEndX, float &deviceEndY, int slice, View2DSliceList *slicelist) |
Projects the given marker positions on the current slice and converts the projected positions to device coordinates. | |
void | getProjectedDeviceCoordinates (const SbVec3f &voxelStartPosition, const SbVec3f &voxelEndPosition, float &deviceStartX, float &deviceStartY, float &deviceEndX, float &deviceEndY, int slice, View2DSliceList *slicelist) |
Projects the given voxel positions on the current slice and converts the projected positions to device coordinates. | |
void | getProjectedDeviceCoordinates (const SbVec3f &voxelPosition, float &deviceX, float &deviceY, int slice, View2DSliceList *slicelist) |
Projects the given voxel position on the current slice and converts the projected position to device coordinates. | |
void | convertMarkerVectorToVoxel (const ml::XMarker &marker, SbVec3f &voxelStartPosition, SbVec3f &voxelEndPosition, View2DSliceList *slicelist) |
Converts the start/end position of the given marker to voxel positions, regards plus/minus mode. | |
GLushort | getStipplePattern (GLint lineWidth) |
Returns a line stipple pattern based on the given line width. | |
virtual | ~SoView2DMarkerEditor () |
Destructor. | |
virtual int | getCurrentCursor (SoViewerProxy *viewerProxy) |
interface forwarded from SoPointingAction: | |
virtual bool | isSensitiveAt (const SoPointerPosition &pos) |
virtual void | startPressAt (const SoPointerPosition &pos) |
virtual void | dragMoveTo (const SoPointerPosition &pos) |
virtual SoPointingAction * | endPress (int clickCount) |
Protected Attributes | |
ml::vec3 | _lastWorldPosition |
MLssize_t | _selectedObjectIndex |
bool | _pointDragged |
true if a click was accepted in the event handling (even if no real dragging will occur) | |
vectorDragMode | _vectorDragged |
mode of the current drag | |
ml::ListBase::ActionClass | _currAction |
The current (last) action performed on the associated markerlist. | |
MLssize_t | _currIndex |
current selected marker index in the associated markerlist | |
ml::XMarker | _currItem |
current selected marker object in the associated markerlist | |
View2DIcons * | _icons |
texture icons used for markers | |
ml::XMarkerListContainer | _container |
internal XMarkerListContainer used to store markers | |
ml::StylePalette * | _palette |
input style palette |
SoView2DMarkerEditor is a geometry editor that stores markers in a XMarkerList and allows editing of these.
This module is a hybrid module which inherits the fields from the ml::XMarkerList container inside of MeVisLab
Definition at line 59 of file SoView2DMarkerEditor.h.
type of vector drawing in depth
Definition at line 164 of file SoView2DMarkerEditor.h.
Depth visibility mode.
DEPTH_IN_SLICES |
The depth visibility in number of slices. |
DEPTH_IN_MM |
The depth visibility in mm. |
Definition at line 171 of file SoView2DMarkerEditor.h.
draw mode of the editor
Definition at line 83 of file SoView2DMarkerEditor.h.
type of color used for markers
Definition at line 93 of file SoView2DMarkerEditor.h.
mode of the editor for new objects
Definition at line 76 of file SoView2DMarkerEditor.h.
type of color for text labels
Definition at line 100 of file SoView2DMarkerEditor.h.
type of text printed at markers
TEXT_OFF | |
TEXT_STYLEINDEX | |
TEXT_STYLENAME | |
TEXT_ITEMNAME | |
TEXT_ITEMID | |
TEXT_VOXELPOS | |
TEXT_WORLDPOS | |
TEXT_LENGTH | |
TEXT_MARKERTYPE | |
TEXT_MARKERLISTINDEX |
Definition at line 106 of file SoView2DMarkerEditor.h.
position for text printed at markers
Definition at line 120 of file SoView2DMarkerEditor.h.
type of drawn arrows
VECTOR_NO_ARROWS | |
VECTOR_END_ARROW | |
VECTOR_START_ARROW | |
VECTOR_BOTH_ARROWS | |
VECTOR_PLUS_MINUS | |
VECTOR_PM_WITH_ARR | |
BOX_START_TO_END | |
BOX_PLUS_MINUS |
Definition at line 133 of file SoView2DMarkerEditor.h.
mode of the editor for new objects
VECTOR_DRAG_NONE | |
VECTOR_DRAG_STARTPOINT | |
VECTOR_DRAG_ENDPOINT | |
VECTOR_DRAG_OFFSET | |
VECTOR_DRAG_MOVE | |
VECTOR_DRAG_RESIZE |
Definition at line 66 of file SoView2DMarkerEditor.h.
SoView2DMarkerEditor::SoView2DMarkerEditor | ( | ) |
Constructor.
virtual SoView2DMarkerEditor::~SoView2DMarkerEditor | ( | ) | [protected, virtual] |
Destructor.
int SoView2DMarkerEditor::calculateCurrentStyleIndex | ( | ) | [protected] |
Calculates and returns the current style index for the selected marker depending on the colormode.
void SoView2DMarkerEditor::computeVoxelMinMaxZ | ( | float & | minz, |
float & | maxz, | ||
const ml::XMarker & | marker, | ||
View2DSliceList * | slicelist | ||
) | [protected] |
compute the min/max z values of a marker, depending on box mode
void SoView2DMarkerEditor::convertMarkerVectorToVoxel | ( | const ml::XMarker & | marker, |
SbVec3f & | voxelStartPosition, | ||
SbVec3f & | voxelEndPosition, | ||
View2DSliceList * | slicelist | ||
) | [protected] |
Converts the start/end position of the given marker to voxel positions, regards plus/minus mode.
void SoView2DMarkerEditor::deleteSelectedObject | ( | ) | [virtual] |
delete the selected object
Reimplemented from SoView2DExtension.
virtual void SoView2DMarkerEditor::dragMoveTo | ( | const SoPointerPosition & | pos | ) | [protected, virtual] |
Reimplemented from SoView2DInteractionExtension.
void SoView2DMarkerEditor::draw | ( | View2DSliceList * | dsl, |
View2DSlice * | dslice, | ||
int | slice | ||
) | [virtual] |
reimplemented from SoView2DExtension
Reimplemented from SoView2DExtension.
void SoView2DMarkerEditor::drawDisc | ( | ml::Disc * | d, |
View2DSliceList * | dsl, | ||
View2DSlice * | dslice, | ||
int | slice, | ||
float | r, | ||
float | g, | ||
float | b, | ||
bool | bHighlight, | ||
float | alphaFactor = 1.0f |
||
) | [protected] |
Draws a single disc "d".
void SoView2DMarkerEditor::drawMarker | ( | float | deviceX, |
float | deviceY, | ||
int | size, | ||
bool | selected, | ||
int | markerindex, | ||
const ml::XMarker & | marker | ||
) | [protected] |
Chooses whether to draw a marker via texture or by gl lines.
void SoView2DMarkerEditor::drawMarkerWithLines | ( | ml::StylePalette::MarkerType | markertype, |
float | deviceX, | ||
float | deviceY, | ||
float | size, | ||
int | lineWidth, | ||
bool | antiAlias, | ||
const ml::XMarker & | marker | ||
) | [protected] |
Draws a single marker.
void SoView2DMarkerEditor::drawSphere | ( | ml::Sphere * | s, |
View2DSliceList * | dsl, | ||
View2DSlice * | dslice, | ||
int | slice, | ||
float | r, | ||
float | g, | ||
float | b, | ||
bool | bHighlight, | ||
float | alphaFactor = 1.0f |
||
) | [protected] |
Draws a single sphere "s".
void SoView2DMarkerEditor::drawTextForMarker | ( | const ml::XMarker & | marker, |
MLssize_t | index, | ||
float | vx, | ||
float | vy, | ||
float | vz, | ||
size_t | i, | ||
View2DSlice * | dslice, | ||
const ml::XMarkerList * | markers, | ||
float * | rgba | ||
) | [protected] |
Draws text for the given marker.
void SoView2DMarkerEditor::drawVector | ( | const ml::XMarker & | marker, |
bool | isSelected, | ||
int | markerIndex, | ||
View2DSliceList * | slicelist, | ||
View2DSlice * | dslice, | ||
int | slice, | ||
float | voxelSizeZ, | ||
const SbVec4f & | originalMarkerColor | ||
) | [protected] |
Draws the given marker as a vector (or box, depending on the mode).
void SoView2DMarkerEditor::drawVectorAbove | ( | float | deviceX1, |
float | deviceY1, | ||
float | deviceX2, | ||
float | deviceY2, | ||
float | lineWidth | ||
) | [protected] |
Draws the section of a vector above the current slice.
void SoView2DMarkerEditor::drawVectorArrowHead | ( | const SbVec2f & | deviceStart, |
const SbVec2f & | deviceEnd, | ||
bool | isEndArrow | ||
) | [protected] |
Draws a single arrow head.
void SoView2DMarkerEditor::drawVectorArrowHeads | ( | const ml::XMarker & | marker, |
bool | isSelected, | ||
int | markerIndex, | ||
View2DSliceList * | slicelist, | ||
View2DSlice * | dslice, | ||
int | slice | ||
) | [protected] |
Draws arrow head(s).
void SoView2DMarkerEditor::drawVectorBelow | ( | float | deviceX1, |
float | deviceY1, | ||
float | deviceX2, | ||
float | deviceY2, | ||
float | lineWidth | ||
) | [protected] |
Draws the section of a vector below the current slice.
void SoView2DMarkerEditor::drawVectorBox | ( | const ml::XMarker & | marker, |
bool | isSelected, | ||
int | markerIndex, | ||
int | lineWidth, | ||
View2DSliceList * | slicelist, | ||
View2DSlice * | dslice, | ||
int | slice | ||
) | [protected] |
Draws the axis aligned box. Can handle plus/minus mode.
void SoView2DMarkerEditor::drawVectorCross | ( | float | deviceX1, |
float | deviceY1, | ||
float | deviceX2, | ||
float | deviceY2, | ||
float | lineWidth | ||
) | [protected] |
Draws the section of a vector crossed by the current slice.
void SoView2DMarkerEditor::drawVectorCrossedBySlices | ( | const ml::XMarker & | marker, |
bool | isSelected, | ||
float | lineWidth, | ||
int | markerIndex, | ||
View2DSliceList * | slicelist, | ||
View2DSlice * | dslice, | ||
int | slice | ||
) | [protected] |
Draws a vector crossed by slices. Can draw a plus/minus vector.
virtual SoPointingAction* SoView2DMarkerEditor::endPress | ( | int | clickCount | ) | [protected, virtual] |
Reimplemented from SoView2DInteractionExtension.
bool SoView2DMarkerEditor::evalEvent | ( | SoView2D * | view2d, |
View2DSliceList * | slicelist, | ||
View2DEvent * | ec, | ||
View2DEventPhase | phase | ||
) | [virtual] |
reimplemented from SoView2DExtension
Reimplemented from SoView2DExtension.
void SoView2DMarkerEditor::finishDrag | ( | ) | [protected] |
Finish drag operation started with startDrag.
virtual int SoView2DMarkerEditor::getCurrentCursor | ( | SoViewerProxy * | viewerProxy | ) | [protected, virtual] |
interface forwarded from SoPointingAction:
Reimplemented from SoView2DInteractionExtension.
float SoView2DMarkerEditor::getDepthVisibilityBlendValue | ( | float | distance, |
float | voxelSizeZ | ||
) | [protected] |
Returns the blend factor for depth visibility, depending on the unit mode.
int SoView2DMarkerEditor::getPaletteIndex | ( | const ml::XMarker & | marker, |
int | i | ||
) | [protected] |
Returns the index into the style palette, depending on the color mode or 0 if no style palette is attached.
void SoView2DMarkerEditor::getProjectedDeviceCoordinates | ( | const ml::XMarker & | marker, |
SbVec3f & | voxelStartPosition, | ||
SbVec3f & | voxelEndPosition, | ||
float & | deviceStartX, | ||
float & | deviceStartY, | ||
float & | deviceEndX, | ||
float & | deviceEndY, | ||
int | slice, | ||
View2DSliceList * | slicelist | ||
) | [protected] |
Projects the given marker positions on the current slice and converts the projected positions to device coordinates, also returns the start/end voxel positions.
void SoView2DMarkerEditor::getProjectedDeviceCoordinates | ( | const ml::XMarker & | marker, |
float & | deviceStartX, | ||
float & | deviceStartY, | ||
float & | deviceEndX, | ||
float & | deviceEndY, | ||
int | slice, | ||
View2DSliceList * | slicelist | ||
) | [protected] |
Projects the given marker positions on the current slice and converts the projected positions to device coordinates.
void SoView2DMarkerEditor::getProjectedDeviceCoordinates | ( | const SbVec3f & | voxelPosition, |
float & | deviceX, | ||
float & | deviceY, | ||
int | slice, | ||
View2DSliceList * | slicelist | ||
) | [protected] |
Projects the given voxel position on the current slice and converts the projected position to device coordinates.
void SoView2DMarkerEditor::getProjectedDeviceCoordinates | ( | const SbVec3f & | voxelStartPosition, |
const SbVec3f & | voxelEndPosition, | ||
float & | deviceStartX, | ||
float & | deviceStartY, | ||
float & | deviceEndX, | ||
float & | deviceEndY, | ||
int | slice, | ||
View2DSliceList * | slicelist | ||
) | [protected] |
Projects the given voxel positions on the current slice and converts the projected positions to device coordinates.
GLushort SoView2DMarkerEditor::getStipplePattern | ( | GLint | lineWidth | ) | [protected] |
Returns a line stipple pattern based on the given line width.
virtual int SoView2DMarkerEditor::getTimePoint | ( | View2DSliceList * | slicelist, |
int | slice | ||
) | [protected, virtual] |
Returns the current timepoint which is either the actual shown timepoint or the timepoint overwritten by the field overwriteTimePoint; The slice parameter is not used in the standard implementation but can be necessary in derived classes.
static bool SoView2DMarkerEditor::handleNotificationCB | ( | void * | usrData, |
ml::Field * | field | ||
) | [static] |
callback from the XMarkerListContainer's handleNotification
bool SoView2DMarkerEditor::ignoreEvent | ( | View2DEvent * | ec | ) | [virtual] |
Overwrite ignoreEvent -> ignore the "ignoreHandledEvents"-Field.
Reimplemented from SoView2DExtension.
void SoView2DMarkerEditor::immediateItemAction | ( | ml::ListBase::ActionClass | action, |
MLssize_t | index | ||
) | [protected] |
perform action on marker list immediately
static void SoView2DMarkerEditor::initClass | ( | ) | [static] |
Inventor runtime type system.
Reimplemented from SoView2DInteractionExtension.
bool SoView2DMarkerEditor::isActive | ( | ) | [virtual] |
returns if the editor is active
Reimplemented from SoView2DExtension.
MLssize_t SoView2DMarkerEditor::isBoxHit | ( | const ml::vec3 & | cursorPosition, |
View2DSliceList * | slicelist, | ||
vectorDragMode & | dragMode | ||
) | [protected] |
Checks if any of the markers interpreted as boxes is hit by the "cursorPosition".
bool SoView2DMarkerEditor::isDepthVisible | ( | float | depthValue, |
float | voxelSizeZ | ||
) | [protected] |
Checks if the given value is within the depthVisibility.
MLssize_t SoView2DMarkerEditor::isDiscHit | ( | const ml::vec3 & | cursorPosition, |
View2DSliceList * | slicelist, | ||
vectorDragMode & | dragMode | ||
) | [protected] |
Checks if any of the markers interpreted as discs is hit by the "cursorPosition".
bool SoView2DMarkerEditor::isDiscVisible | ( | ml::Disc * | disc, |
View2DSliceList * | slicelist, | ||
int | slice | ||
) | [protected] |
Checks if the given "disc" is visible in the given slice.
virtual bool SoView2DMarkerEditor::isSensitiveAt | ( | const SoPointerPosition & | pos | ) | [protected, virtual] |
Reimplemented from SoView2DInteractionExtension.
MLssize_t SoView2DMarkerEditor::isSphereHit | ( | const ml::vec3 & | cursorPosition, |
View2DSliceList * | slicelist, | ||
vectorDragMode & | dragMode | ||
) | [protected] |
Checks if any of the markers interpreted as spheres is hit by the "cursorPosition".
bool SoView2DMarkerEditor::isSphereVisible | ( | View2DSliceList * | slicelist, |
const ml::vec3 & | center, | ||
float | radius, | ||
int | slice | ||
) | [protected] |
Checks if the sphere defined by "center" and "radius" is visible in the given slice.
bool SoView2DMarkerEditor::isVectorCrossedBySlice | ( | float | depthValue1, |
float | depthValue2, | ||
int | slice, | ||
float | voxelSizeZ | ||
) | [protected] |
Returns whether a vector is crossed by a slice.
bool SoView2DMarkerEditor::isVectorDepthVisible | ( | float | depthValue1, |
float | depthValue2, | ||
int | slice, | ||
float | voxelSizeZ | ||
) | [protected] |
Returns whether a vector is visible according to its position and the various depth visibility settings.
void SoView2DMarkerEditor::itemAction | ( | ml::ListBase::ActionClass | action, |
MLssize_t | index | ||
) | [protected] |
perform action on marker list, possibly delayed if actOnReleaseOnly is set (action is stored in _currAction, _currIndex and _currItem then)
bool SoView2DMarkerEditor::markerIsHit | ( | float | markerSize, |
float | pointX, | ||
float | pointY, | ||
float | centerX, | ||
float | centerY, | ||
bool | shouldSnapToVoxel, | ||
SbVec3f | hitPositionVoxel, | ||
SbVec3f | markerPositionVoxel | ||
) | [protected] |
Checks whether a marker with the given size is hit at the given position.
void SoView2DMarkerEditor::moveObject | ( | const ml::vec3 & | startCursorPosition, |
const ml::vec3 & | endCursorPosition, | ||
ml::XMarkerList * | markers | ||
) | [protected] |
Moves the selected marker depending on the mouse movement from "startCursorPosition" to "endCursorPosition".
void SoView2DMarkerEditor::performDrag | ( | const SbVec3f & | eventVoxel, |
View2DSliceList * | slicelist | ||
) | [protected] |
Continue drag operation started with startDrag (with performAction = true).
startDrag needs to have returned true.
MLssize_t SoView2DMarkerEditor::performHitTest | ( | float | deviceX, |
float | deviceY, | ||
const SbVec3f & | eventVoxel, | ||
View2DSliceList * | slicelist, | ||
vectorDragMode & | dragMode | ||
) | [protected] |
returns selected item (-1 if nothing hit) and drag mode
void SoView2DMarkerEditor::resizeObject | ( | const ml::vec3 & | startCursorPosition, |
const ml::vec3 & | endCursorPosition, | ||
ml::XMarkerList * | markers | ||
) | [protected] |
Resizes the selected marker depending on the mouse movement from "startCursorPosition" to "endCursorPosition".
void SoView2DMarkerEditor::setupIcons | ( | ) |
setup the icons from an icon file
bool SoView2DMarkerEditor::startDrag | ( | float | deviceX, |
float | deviceY, | ||
const SbVec3f & | eventVoxel, | ||
View2DSliceList * | slicelist, | ||
bool | validLocation, | ||
bool | performAction | ||
) | [protected] |
(Try to) start dragging operation at the given coordinates, returns true if the position was/could be used for some operations.
If performAction was set the operation really is performed, if not this method can be used to test the potential outcome (e.g. to determine the mouse cursor shape). _vectorDragged will always be set by this method to the required drag operation.
virtual void SoView2DMarkerEditor::startPressAt | ( | const SoPointerPosition & | pos | ) | [protected, virtual] |
Reimplemented from SoView2DInteractionExtension.
void SoView2DMarkerEditor::updatePalette | ( | ) | [protected] |
updates the stylepalette depending on the currently connected stylepalette
internal XMarkerListContainer used to store markers
Definition at line 360 of file SoView2DMarkerEditor.h.
The current (last) action performed on the associated markerlist.
Definition at line 350 of file SoView2DMarkerEditor.h.
MLssize_t SoView2DMarkerEditor::_currIndex [protected] |
current selected marker index in the associated markerlist
Definition at line 352 of file SoView2DMarkerEditor.h.
ml::XMarker SoView2DMarkerEditor::_currItem [protected] |
current selected marker object in the associated markerlist
Definition at line 354 of file SoView2DMarkerEditor.h.
View2DIcons* SoView2DMarkerEditor::_icons [protected] |
texture icons used for markers
Definition at line 357 of file SoView2DMarkerEditor.h.
ml::vec3 SoView2DMarkerEditor::_lastWorldPosition [protected] |
Definition at line 340 of file SoView2DMarkerEditor.h.
ml::StylePalette* SoView2DMarkerEditor::_palette [protected] |
input style palette
Definition at line 362 of file SoView2DMarkerEditor.h.
bool SoView2DMarkerEditor::_pointDragged [protected] |
true if a click was accepted in the event handling (even if no real dragging will occur)
Definition at line 345 of file SoView2DMarkerEditor.h.
MLssize_t SoView2DMarkerEditor::_selectedObjectIndex [protected] |
Definition at line 342 of file SoView2DMarkerEditor.h.
vectorDragMode SoView2DMarkerEditor::_vectorDragged [protected] |
mode of the current drag
Definition at line 347 of file SoView2DMarkerEditor.h.
flag to add a marker on mouse release only, not on mouse press
Definition at line 204 of file SoView2DMarkerEditor.h.
SoSFBool SoView2DMarkerEditor::addOnClick |
flag for permitting adding of markers
Definition at line 198 of file SoView2DMarkerEditor.h.
SoSFFloat SoView2DMarkerEditor::alphaFactor |
alpha factor applied to all markers
Definition at line 234 of file SoView2DMarkerEditor.h.
SoSFBool SoView2DMarkerEditor::busy |
This field shows if an operation like moving a marker around is finished (e.g.
after a RELEASE event) or not This information can be used to avoid reacting on every change of the positions when a marker is moved around
Definition at line 297 of file SoView2DMarkerEditor.h.
SoSFEnum SoView2DMarkerEditor::colorMode |
choose the mode of the color for markers
Definition at line 207 of file SoView2DMarkerEditor.h.
SoSFBool SoView2DMarkerEditor::cooperative |
If "cooperative"-mode is turned on clicks besides the current markers (+ "Selection Tolerance") are ignored, except when "CreateMode" is turned on This can be used to handle the parallel editing of more than one marker editor (or other view2d extensions reacting on mouse events -> SoView2dPosition, SoView2dRectangle)
Definition at line 293 of file SoView2DMarkerEditor.h.
SoSFInt32 SoView2DMarkerEditor::currentStyleIndex |
styleindex of the activated object referring to the stylepalette
Definition at line 264 of file SoView2DMarkerEditor.h.
SoSFInt32 SoView2DMarkerEditor::currentType |
current type of marker (used for new markers)
Definition at line 240 of file SoView2DMarkerEditor.h.
SoSFBool SoView2DMarkerEditor::cutText |
cut text after a maximum number of lines (defined by "maxNumberOfLines")
Definition at line 224 of file SoView2DMarkerEditor.h.
SoSFBool SoView2DMarkerEditor::deleteOnClick |
set if markers are deleted on click
Definition at line 195 of file SoView2DMarkerEditor.h.
defines certain draw modes
Definition at line 267 of file SoView2DMarkerEditor.h.
SoSFFloat SoView2DMarkerEditor::depthVisibility |
defines up to which distance markers are visible value is either in slices or in mm depending on the depthVisibilityMode field
Definition at line 183 of file SoView2DMarkerEditor.h.
select the mode for depth visibility
Definition at line 186 of file SoView2DMarkerEditor.h.
determines how markers are rendered with style palette when icon file is disabled if false, markers are always rendered as squares if true, markers are rendered with shapes according to palette marker type
Definition at line 252 of file SoView2DMarkerEditor.h.
SoSFEnum SoView2DMarkerEditor::drawMode |
defines the visualization mode of the marker
Definition at line 270 of file SoView2DMarkerEditor.h.
SoSFEnum SoView2DMarkerEditor::editorMode |
select the mode for creation of new object
Definition at line 192 of file SoView2DMarkerEditor.h.
All other markers are drawn as simple markers (this may be useful if there are too many markers lying together)
Definition at line 273 of file SoView2DMarkerEditor.h.
SoSFString SoView2DMarkerEditor::iconFile |
name of the icon file (with $() vars)
Definition at line 259 of file SoView2DMarkerEditor.h.
SoSFInt32 SoView2DMarkerEditor::iconIdx |
set the initial index inside of the icon file
Definition at line 257 of file SoView2DMarkerEditor.h.
SoSFString SoView2DMarkerEditor::internalIconFile |
expanded (real) icon file path
Definition at line 261 of file SoView2DMarkerEditor.h.
SoSFInt32 SoView2DMarkerEditor::maxNumberOfLines |
choose the maximum number of lines of text, if "cutText" is turned on
Definition at line 226 of file SoView2DMarkerEditor.h.
SoSFFloat SoView2DMarkerEditor::minimumAlpha |
minimum alpha value for all markers
Definition at line 237 of file SoView2DMarkerEditor.h.
Sets the new current time point.
Definition at line 305 of file SoView2DMarkerEditor.h.
hybrid ML module requires a field named "outputMLModule" for MeVisLab to be able to use the ML module
Definition at line 244 of file SoView2DMarkerEditor.h.
Should the current time point be overwritten?
Definition at line 303 of file SoView2DMarkerEditor.h.
SoSFBool SoView2DMarkerEditor::selectingOn |
flag to set if it is possible to select a marker
Definition at line 201 of file SoView2DMarkerEditor.h.
If this option is turned on, selection boxes are only drawn for the current marker (Requested in support forum: UsingMevisLab->"Turning off selection markers of arrows in SoView2DMarkerEditor")
Definition at line 287 of file SoView2DMarkerEditor.h.
if this option is turned on, only the current marker is drawn in the selected draw mode All other markers are drawn as simple markers (this may be useful if there are too many markers lying together)
Definition at line 283 of file SoView2DMarkerEditor.h.
show text only for selected marker;
Definition at line 222 of file SoView2DMarkerEditor.h.
SoSFBool SoView2DMarkerEditor::snapToSlice |
sets if the markers snap to the current slice when they are moved
Definition at line 300 of file SoView2DMarkerEditor.h.
SoSFBool SoView2DMarkerEditor::snapToVoxel |
sets if the markers snap to the center of a voxel
Definition at line 189 of file SoView2DMarkerEditor.h.
input style palette
Definition at line 247 of file SoView2DMarkerEditor.h.
SoSFColor SoView2DMarkerEditor::textColor |
extra text color, depends on textColorMode if it is used
Definition at line 216 of file SoView2DMarkerEditor.h.
SoSFEnum SoView2DMarkerEditor::textColorMode |
choose the color of the text for markers
Definition at line 214 of file SoView2DMarkerEditor.h.
SoSFInt32 SoView2DMarkerEditor::textFontSize |
font size of text
Definition at line 220 of file SoView2DMarkerEditor.h.
SoSFEnum SoView2DMarkerEditor::textMode |
choose the mode of the text for markers
Definition at line 210 of file SoView2DMarkerEditor.h.
SoSFEnum SoView2DMarkerEditor::textPosition |
choose the position mode of the text for markers
Definition at line 212 of file SoView2DMarkerEditor.h.
SoSFBool SoView2DMarkerEditor::textShadow |
flag if text shadow should be drawn
Definition at line 218 of file SoView2DMarkerEditor.h.
SoSFBool SoView2DMarkerEditor::useAntiAlias |
toggles the use of anti aliasing (openGL).
Definition at line 276 of file SoView2DMarkerEditor.h.
SoSFBool SoView2DMarkerEditor::useIconFile |
set if the icon file should be used
Definition at line 255 of file SoView2DMarkerEditor.h.
should the vector's length set the marker's size?
Definition at line 279 of file SoView2DMarkerEditor.h.
SoSFEnum SoView2DMarkerEditor::vectorArrow |
choose how vector arrows are drawn
Definition at line 229 of file SoView2DMarkerEditor.h.
SoSFInt32 SoView2DMarkerEditor::vectorLineWidth |
line width for vectors
Definition at line 231 of file SoView2DMarkerEditor.h.