#include <SoView2DMarkerEditor.h>

Public Types | |
| enum | vectorDragMode { VECTOR_DRAG_OFF = 0, VECTOR_DRAG_STARTPOINT = 1, VECTOR_DRAG_ENDPOINT = 2 } |
| 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_DEPTH_INDICATOR, DRAW_HIGHLIGHT_SLICE_SEGMENT, DRAW_BOLD } |
| type of vector drawing in depth 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 | |
| SoSFInt32 | depthVisibility |
| defines on how many voxel neighboring z voxel the markers are visible | |
| 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 | |
| SoSFFloat | alphaFactor |
| alpha factor applied to 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 | 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 | useAntiAlias |
| toggles the use of anti aliasing (openGL). | |
| 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 | |
Protected Member Functions | |
| int | calculateCurrentStyleIndex () |
| Calculates and returns the current style index for the selected marker depending on the colormode. | |
| bool | evalEventForDrawnObject (SoView2D *view2d, View2DSliceList *slicelist, View2DEvent *ec, View2DEventPhase phase) |
| Evaluates mouse events for the more complex visualizations of marker like spheres and discs. | |
| int | isDiscHit (SoView2D *view2D, const ml::vec3 &cursorPosition, View2DSliceList *slicelist) |
| Checks if any of the markers interpreted as discs is hit by the "cursorPosition". | |
| int | isSphereHit (SoView2D *view2D, const ml::vec3 &cursorPosition, View2DSliceList *slicelist) |
| Checks if any of the markers interpreted as spheres is hit by the "cursorPosition". | |
| int | isBoxHit (SoView2D *view2D, const ml::vec3 &cursorPosition, View2DSliceList *slicelist) |
| 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 | isDepthVisible (float depthValue) |
| Checks if the given value is within the depthVisibility. | |
| 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::vec3 &vec1, const ml::vec3 &vec2, View2DSliceList *dsl, View2DSlice *dslice, int slice, bool selected, int iconindex, int index=0) |
| Draws a single vector defined by "vec1", "vec2". | |
| void | drawMarker (float px, float py, int size, bool selected, int iconindex) |
| Draws a single marker, defined by "(px,py)" and "size". | |
| 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 | updatePalette () |
| updates the stylepalette depending on the currently connected stylepalette | |
Protected Attributes | |
| ml::vec3 | _eventStartposition |
| MLssize_t | _selectedObjectIndex |
| int | _objectEdited |
| bool | _pointDragged |
| flag if a point is dragged | |
| vectorDragMode | _vectorDragged |
| mode of the current drag | |
| ml::ListBase::ActionClass | _currAction |
| The current (last) action performed on the associated markerlist. | |
| long | _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 | |
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
| DRAW_NONE | |
| DRAW_DEPTH_INDICATOR | |
| DRAW_HIGHLIGHT_SLICE_SEGMENT | |
| DRAW_BOLD |
DRAW_BOLD added to draw e.g.
thick boxes suitable for screenshots used for presentation / publications |
Definition at line 161 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 103 of file SoView2DMarkerEditor.h.
position for text printed at markers
Definition at line 117 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 130 of file SoView2DMarkerEditor.h.
| SoView2DMarkerEditor::SoView2DMarkerEditor | ( | ) |
Constructor.
| int SoView2DMarkerEditor::calculateCurrentStyleIndex | ( | ) | [protected] |
Calculates and returns the current style index for the selected marker depending on the colormode.
| void SoView2DMarkerEditor::deleteSelectedObject | ( | ) | [virtual] |
| void SoView2DMarkerEditor::draw | ( | View2DSliceList * | dsl, | |
| View2DSlice * | dslice, | |||
| int | slice | |||
| ) | [virtual] |
| 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 | px, | |
| float | py, | |||
| int | size, | |||
| bool | selected, | |||
| int | iconindex | |||
| ) | [protected] |
Draws a single marker, defined by "(px,py)" and "size".
| 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::drawVector | ( | const ml::vec3 & | vec1, | |
| const ml::vec3 & | vec2, | |||
| View2DSliceList * | dsl, | |||
| View2DSlice * | dslice, | |||
| int | slice, | |||
| bool | selected, | |||
| int | iconindex, | |||
| int | index = 0 | |||
| ) | [protected] |
Draws a single vector defined by "vec1", "vec2".
| bool SoView2DMarkerEditor::evalEvent | ( | SoView2D * | view2d, | |
| View2DSliceList * | slicelist, | |||
| View2DEvent * | ec, | |||
| View2DEventPhase | phase | |||
| ) | [virtual] |
| bool SoView2DMarkerEditor::evalEventForDrawnObject | ( | SoView2D * | view2d, | |
| View2DSliceList * | slicelist, | |||
| View2DEvent * | ec, | |||
| View2DEventPhase | phase | |||
| ) | [protected] |
Evaluates mouse events for the more complex visualizations of marker like spheres and discs.
| 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.
| static void SoView2DMarkerEditor::initClass | ( | ) | [static] |
| bool SoView2DMarkerEditor::isActive | ( | ) | [virtual] |
| int SoView2DMarkerEditor::isBoxHit | ( | SoView2D * | view2D, | |
| const ml::vec3 & | cursorPosition, | |||
| View2DSliceList * | slicelist | |||
| ) | [protected] |
Checks if any of the markers interpreted as boxes is hit by the "cursorPosition".
| bool SoView2DMarkerEditor::isDepthVisible | ( | float | depthValue | ) | [protected] |
Checks if the given value is within the depthVisibility.
| int SoView2DMarkerEditor::isDiscHit | ( | SoView2D * | view2D, | |
| const ml::vec3 & | cursorPosition, | |||
| View2DSliceList * | slicelist | |||
| ) | [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.
| int SoView2DMarkerEditor::isSphereHit | ( | SoView2D * | view2D, | |
| const ml::vec3 & | cursorPosition, | |||
| View2DSliceList * | slicelist | |||
| ) | [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.
| 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::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
| void SoView2DMarkerEditor::updatePalette | ( | ) | [protected] |
updates the stylepalette depending on the currently connected stylepalette
internal XMarkerListContainer used to store markers
Definition at line 329 of file SoView2DMarkerEditor.h.
The current (last) action performed on the associated markerlist.
Definition at line 319 of file SoView2DMarkerEditor.h.
long SoView2DMarkerEditor::_currIndex [protected] |
current selected marker index in the associated markerlist
Definition at line 321 of file SoView2DMarkerEditor.h.
ml::XMarker SoView2DMarkerEditor::_currItem [protected] |
current selected marker object in the associated markerlist
Definition at line 323 of file SoView2DMarkerEditor.h.
ml::vec3 SoView2DMarkerEditor::_eventStartposition [protected] |
Definition at line 307 of file SoView2DMarkerEditor.h.
View2DIcons* SoView2DMarkerEditor::_icons [protected] |
int SoView2DMarkerEditor::_objectEdited [protected] |
Definition at line 311 of file SoView2DMarkerEditor.h.
ml::StylePalette* SoView2DMarkerEditor::_palette [protected] |
bool SoView2DMarkerEditor::_pointDragged [protected] |
MLssize_t SoView2DMarkerEditor::_selectedObjectIndex [protected] |
Definition at line 309 of file SoView2DMarkerEditor.h.
vectorDragMode SoView2DMarkerEditor::_vectorDragged [protected] |
flag to add a marker on mouse release only, not on mouse press
Definition at line 192 of file SoView2DMarkerEditor.h.
| SoSFBool SoView2DMarkerEditor::addOnClick |
| SoSFFloat SoView2DMarkerEditor::alphaFactor |
| 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 270 of file SoView2DMarkerEditor.h.
| SoSFEnum SoView2DMarkerEditor::colorMode |
| 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 266 of file SoView2DMarkerEditor.h.
| SoSFInt32 SoView2DMarkerEditor::currentStyleIndex |
styleindex of the activated object referring to the stylepalette
Definition at line 243 of file SoView2DMarkerEditor.h.
| SoSFInt32 SoView2DMarkerEditor::currentType |
current type of marker (used for new markers)
Definition at line 224 of file SoView2DMarkerEditor.h.
| SoSFBool SoView2DMarkerEditor::cutText |
cut text after a maximum number of lines (defined by "maxNumberOfLines")
Definition at line 212 of file SoView2DMarkerEditor.h.
| SoSFBool SoView2DMarkerEditor::deleteOnClick |
| SoSFInt32 SoView2DMarkerEditor::depthVisibility |
defines on how many voxel neighboring z voxel the markers are visible
Definition at line 174 of file SoView2DMarkerEditor.h.
| SoSFEnum SoView2DMarkerEditor::drawMode |
| SoSFEnum SoView2DMarkerEditor::editorMode |
| SoSFString SoView2DMarkerEditor::iconFile |
| SoSFInt32 SoView2DMarkerEditor::iconIdx |
set the initial index inside of the icon file
Definition at line 236 of file SoView2DMarkerEditor.h.
| SoSFString SoView2DMarkerEditor::internalIconFile |
| SoSFInt32 SoView2DMarkerEditor::maxNumberOfLines |
choose the maximum number of lines of text, if "cutText" is turned on
Definition at line 214 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 228 of file SoView2DMarkerEditor.h.
| SoSFBool SoView2DMarkerEditor::selectingOn |
flag to set if it is possible to select a marker
Definition at line 189 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 260 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 256 of file SoView2DMarkerEditor.h.
| SoSFBool SoView2DMarkerEditor::snapToSlice |
sets if the markers snap to the current slice when they are moved
Definition at line 273 of file SoView2DMarkerEditor.h.
| SoSFBool SoView2DMarkerEditor::snapToVoxel |
sets if the markers snap to the center of a voxel
Definition at line 177 of file SoView2DMarkerEditor.h.
| SoSFColor SoView2DMarkerEditor::textColor |
extra text color, depends on textColorMode if it is used
Definition at line 204 of file SoView2DMarkerEditor.h.
| SoSFEnum SoView2DMarkerEditor::textColorMode |
| SoSFInt32 SoView2DMarkerEditor::textFontSize |
| SoSFEnum SoView2DMarkerEditor::textMode |
| SoSFEnum SoView2DMarkerEditor::textPosition |
choose the position mode of the text for markers
Definition at line 200 of file SoView2DMarkerEditor.h.
| SoSFBool SoView2DMarkerEditor::textShadow |
| SoSFBool SoView2DMarkerEditor::useAntiAlias |
| SoSFBool SoView2DMarkerEditor::useIconFile |
| SoSFEnum SoView2DMarkerEditor::vectorArrow |
1.5.8