20#include <Inventor/fields/SoSFVec3f.h> 
   21#include <Inventor/fields/SoSFFloat.h> 
   22#include <Inventor/fields/SoSFVec3f.h> 
   23#include <Inventor/fields/SoSFBool.h> 
   24#include <Inventor/fields/SoSFColor.h> 
   25#include <Inventor/fields/SoSFInt32.h> 
   26#include <Inventor/fields/SoSFUShort.h> 
   28#include <Inventor/SbBox.h> 
  143  void drawRect(
View2DSlice* dslice, 
const SbVec3f& voxelPosition, 
float* rgba);
 
  145  void drawEllipse(
View2DSlice* dslice, 
const SbVec3f& voxelPosition);
 
  149  void calculateModelSize(
View2DSlice* dslice, 
float vz, 
float& modelSize, 
float& modelSizeX_px,
 
  150    float& modelSizeY_px);
 
  152  SbBox2f calculateBoundingBox(
const SbVec2f& modelCenter,
 
  153    float modelSizeX_px, 
float modelSizeY_px);
 
  155  SbVec2f calculateModelCenter(
View2DSlice* dslice, 
const SbVec3f& voxelPosition);
 
 
View2DEventPhase
event phase for simple extensions that grab the focus, do something (motion) and are released afterwa...
 
drawingModelType
Draw and edit a position on the SoView2D.
 
@ DRAWINGMODEL_CROSSHAIRS
 
@ DRAWINGMODEL_CROSSHAIRS_WITH_CIRCLE
 
@ DRAWINGMODEL_VOXEL_RECT
 
#define SOVIEW2D_API
File to resolve system dependencies in View2D library.
 
void pointerPosition(SoState *state, const SoPointerPosition &pos) override
Same as below, with additional SoState argument. By default, simply calls the below version.
 
SoPointerPosition manages the current position of the mouse cursor.
 
SoView2DInteractionExtension is base class for all SoView2DExtensions that want to support the Manage...
 
draw and edit a position on the SoView2D
 
SoSFBool colorAxes
flag to draw axes in color
 
SoSFBool updateOnRelease
update worldPosition on release event
 
SoSFBool updateOnPress
update worldPosition on press event
 
bool _isDragging
flag if position is being dragged
 
SoSFFloat blendOutside
blend factor for the slice the position is not located on
 
void pointerPosition(const SoPointerPosition &pos) override
Override this if you always need to be informed of the current mouse cursor position.
 
SoSFFloat crossHairSpacing
spacing in center of the crosshair position indicator
 
SoSFFloat drawingModelSize
size of the position indicator model
 
void startPressAt(const SoPointerPosition &pos) override
 
SoView2DPosition()
Constructor.
 
void draw(View2DSliceList *dsl, View2DSlice *dslice, int slice) override
reimplemented from SoView2DExtension
 
SoSFVec3f firstSliceWorldPosition
world position on first slice (useful, if numOfSlices in the corresponding viewer is > 1)
 
SoSFBool updateOnMotion
update worldPosition on motion event
 
SoSFColor coronalColor
color for coronal view
 
SoSFEnum drawingModel
model that shall be used for the position indicator (crosshairs, circle...)
 
bool evalEvent(SoView2D *view2d, View2DSliceList *slicelist, View2DEvent *ec, View2DEventPhase phase) override
reimplemented from SoView2DExtension
 
SoSFColor sagittalColor
color for sagittal view
 
SoSFUShort linePattern
line stipple pattern
 
SoSFBool drawEditingRect
flag to draw mini rect in cursor center
 
SoSFBool cooperative
enable cooperative editing
 
SoSFBool colorBorder
flag to draw colored borders
 
SoSFFloat blendOnto
blend factor for the slice the position is located on
 
bool ignoreEvent(View2DEvent *ec) override
Overwrite ignoreEvent -> ignore the "ignoreHandledEvents"-Field.
 
SbVec3f _oldWorldPos
previous world position
 
SoSFColor axialColor
color for axial view
 
void getAxisColor(char orientation, float *color)
get color of orientation
 
SoSFEnum drawingModelSizeUnit
unit in which cross-hair dimensions are expressed (voxel, world or screen units)
 
bool isSensitiveAt(const SoPointerPosition &pos) override
interface forwarded from SoPointingAction:
 
static void initClass()
inventor runtime type system
 
SoSFVec3f worldPosition
selected world position
 
SoSFFloat lineWidth
line width of the rendered position indicators
 
SoSFFloat colorBorderWidth
width of the color border
 
void dragMoveTo(const SoPointerPosition &pos) override
 
void setPosition(const SbVec3f &pos, SoView2D *view2d, View2DSliceList *slicelist)
 
SoView2D is a 2D viewer for image data.
 
View2DEvent stores all information on an event on a SoView2D.
 
a list that holds all View2DSlice objects (lazily created) of a SoView2D
 
a single slice that is stored in a View2DSliceList, typically created by a View2DSliceList