MeVisLabToolboxReference
|
SoView2D is a 2D viewer for image data. More...
#include <SoView2D.h>
Public Member Functions | |
SoView2D () | |
constructor More... | |
SbString | getViewerId () const |
returns the viewer id of this viewer More... | |
View2DSliceList * | getSliceList () |
returns the slicelist that is used to manage the slices More... | |
SbVec2f | getSliceSize () |
get slice size x/y in millimeters (used by SoOrthoView2D) More... | |
SoAction * | getAction () |
get pointer to current action. More... | |
virtual void | GLRender (SoGLRenderAction *action) |
reimplemented Inventor method which renders the slices More... | |
void | updateSliceListOnImageChange () |
update the slice list if the image has changed More... | |
virtual void | handleEvent (SoHandleEventAction *action) |
handle the mouse and keyboard events and send them to extensions More... | |
bool | handleKeyboardEvent (int nKey, bool shift, bool alt, bool ctrl) |
handle standard key, returns true if handles More... | |
virtual void | computeBBox (SoAction *action, SbBox3f &box, SbVec3f ¢er) |
when rendering in 3D, calculate the bounding box of the drawn slice(s) More... | |
virtual void | generatePrimitives (SoAction *action) |
not implemented More... | |
bool | getEventLocation (SoHandleEventAction *action, bool &hit, float &dx, float &dy, SbVec3f &voxelHit, int &sliceID) |
get event location of the event contained in action, returns if the image is hit, the device location and the voxel position (extracted from handleEvent). More... | |
void | setSliceInitFunc (SliceInitFunc fn, void *user) |
Set slice position initialization callback The callback function set by this method is called when the input image changes. More... | |
SliceInitFunc | getSliceInitFunc (void) |
Get slice position initialization callback. More... | |
int | getCurrentCenterSlice () |
returns the central of all currently visible slices (e.g. startSlice, if numSlices is 1) More... | |
void | adjustSliceOriginToCenter (float newSliceZoom) |
sets the new sliceZoom value and adjusts the sliceOrigin to zoom to the center of the ROI More... | |
void | translateInnerSlice (float x, float y) |
translates the inner slice x/y pixel on the screen More... | |
void | getStatusString (SbString &string) |
access status string More... | |
ml::LUTFunction * | getDefaultLut () |
get the default lut object (just a relative ramp from 0 to 1) More... | |
ml::LUTFunction * | getLutFromScene (SoAction *action) |
get the lut from the scene (default ramp if no lut is set) More... | |
bool | updateLutData (ml::LUTFunction *lut, ml::LUTData< MLuint8 > *data, SoSFMLImage *img, View2DLutPrecision precision) |
renders the lut data from the lut function according to the image data (lut may be NULL, SoView2D will then use a default ramp) returns if the lut could be rendered or if the rendering failed. More... | |
void | startCineMode () |
start the cine mode More... | |
void | stopCineMode () |
stop the cine mode More... | |
SbVec2f | getSingleSliceSize (int windowX, int windowY) |
get the size of a single slice in the window area (this can be used to align annotation font size across several SoView2Ds) More... | |
int | getMaxStartSlice () |
returns the highest sensible value for startSlice More... | |
Public Member Functions inherited from SoInteractionOwner | |
SoInteractionOwner () | |
Default constructor. More... | |
virtual | ~SoInteractionOwner () |
The destructor will destroy all interactions created with this object as owner. More... | |
virtual std::list< SoInteraction * > | getInteractions (SoState *state) |
Returns the list of all interactions of this provider. More... | |
virtual void | pointerPosition (SoState *state, const SoPointerPosition &pos) |
Same as below, with additional SoState argument. Be defaults simply calls the below version. More... | |
virtual void | pointerLeftWindow (SoState *state) |
Same as below, with additional SoState argument. Be defaults simply calls the below version. More... | |
Public Member Functions inherited from SoInteractionProvider | |
SoInteractionProvider () | |
Default constructor. More... | |
virtual | ~SoInteractionProvider () |
template<class T > | |
std::list< T * > | getInteractionsOfType (SoState *state) |
Returns list of interactions of a specific type: More... | |
virtual std::list< SoCommandAction * > | getCommandActions (SoState *state) |
virtual std::list< SoPointingAction * > | getPointingActions (SoState *state) |
virtual std::list< SoOffsetAction * > | getOffsetActions (SoState *state) |
Static Public Member Functions | |
static void | initClass () |
inventor runtime type system More... | |
static View2DFont * | globalFont () |
get the global font used for annotations etc. (only call this within a valid GL context!) More... | |
static View2DFont * | globalFont (int) |
DEPRECATED: cache context id is no longer needed. More... | |
static View2DFont & | globalFontRef () |
Always return an existing font singleton as from globalFont(); used for annotations etc. More... | |
static std::string | getDICOMTagValue (SoSFMLImage *image, const std::string &dicomTagName) |
Returns the value of a DICOM tag with the given name as a string, or an empty string if the tag was not found in the given image. More... | |
static SoInteractionProvider * | getInteractionProvider (SoNode *node) |
static method to register with SoInteractionProvider for this class More... | |
Static Public Member Functions inherited from SoInteractionProvider | |
static void | registerInteractionProviderNode (SoType type, GetProviderFunc func) |
Register a function to obtain a SoInteractionProvider from a SoNode. More... | |
static SoInteractionProvider * | getInteractionProvider (SoNode *node) |
Get a SoInteractionProvider from a SoNode if registered, else NULL. More... | |
Public Attributes | |
SoSFTrigger | renderingDone |
output field is triggered from the inside when all rendering is done. More... | |
SoSFString | instanceName |
Defines interface field to store the instance name. More... | |
SoSFString | interactionProviderID |
This field overrides the instanceName as providerID if specified. More... | |
SoSFMLImage | image |
input ML image More... | |
SoSFBool | drawImageData |
if set to false, only the extensions of the SoView2D are drawn, not the images More... | |
SoSFString | viewerId |
id string, needs to be unique in a network if used More... | |
SoSFEnum | blendMode |
blend mode for rendering More... | |
SoSFEnum | filterMode |
filter mode for rendering More... | |
SoSFEnum | cacheMode |
caching of slices More... | |
SoSFFloat | alphaFactor |
alpha factor for rendering More... | |
SoSFColor | baseColor |
base color in which the slices are drawn More... | |
SoSFBool | useShaders |
if enabled, the SoView2D tries to emulate a hardware lut by using hardware shaders, only works on hardware that supports shaders and is ignored otherwise More... | |
SoSFBool | applyLut |
select if the View2d should apply the scene LUT to the slice data (default is true) More... | |
SoSFEnum | lutPrecision |
defines the precision of the LUT More... | |
SoSFInt32 | startSlice |
current start slice More... | |
SoSFInt32 | sliceStep |
step to next rendered slice More... | |
SoSFInt32 | numSlices |
number of slices that are rendered More... | |
SoSFInt32 | numXSlices |
number of slices that are rendered in X More... | |
SoSFInt32 | maxSlice |
the maximum slice number, read from the image , used to restrict startSlice More... | |
SoSFBool | keepSlicesInView |
if this is set, the slices are prevented from leaving the visible area. More... | |
SoSFInt32 | timePoint |
the timepoint the viewers is currently showing More... | |
SoSFInt32 | maxTimePoint |
the maximum timepoint, read from the image , used to restrict timePoint More... | |
SoSFInt32 | slab |
the slab that is rendered (1=only one slice) More... | |
SoSFBool | unzoomOnImageChange |
If enabled, the module unzooms automatically on an input image change. More... | |
SoSFVec2f | margin |
margin to the border of the viewer More... | |
SoSFVec2f | spacing |
spacing between slices More... | |
SoSFPlane | plane |
plane representing the slice in world coordinates More... | |
SoSFVec2f | lowerLeft |
restrict the rendering to a subpart of the viewer, in normalized coordinated More... | |
SoSFVec2f | upperRight |
restrict the rendering to a subpart of the viewer, in normalized coordinated More... | |
SoSFBool | snapToCenter |
if set, the viewer snaps to center of image on each input image change More... | |
SoSFBool | standardKeys |
enable the keypad and 0-9 keys More... | |
SoSFBool | standardKeysNumbers |
enable number keys 0-9, depends on standardKeys being enabled More... | |
SoSFBool | standardKeysNeedValidPosition |
set if the keys work anywhere or only if pressed with mouse inside of a slice (needed for SoOrthoView2D) More... | |
SoSFBool | passHandledFlagToInventor |
Set this true if following inventor nodes should not react to events that have been handled by a SoView2DExtension Depricated name: updateInventorEvent;. More... | |
SoSFBool | reverseExtensionDrawingOrder |
Reverse drawing order of extensions. More... | |
SoSFVec2f | sliceOrigin |
the internal origin of the slice in voxels (for shifting inside of the view) More... | |
SoSFFloat | sliceZoom |
the internal zoom of the slice (for zooming inside if the view) More... | |
SoSFFloat | sliceZoomSynchronized |
same as sliceZoom, except that changes to this member update the slice origin so that the viewing center remains in the center of the viewer More... | |
SoSFVec2f | zoomCenter |
center of zoom/scale operation in normalized coordinates More... | |
SoSFVec3f | viewingCenter |
world position of the current center of the viewer More... | |
SoSFBool | enableViewingCenter |
If enabled, the viewing center is activated for reading and writing. More... | |
SoSFFloat | minSliceZoomKeyboard |
minimum slice zoom for keyboard modifications (always clamped by MIN_MIN_SLICE_ZOOM and 1.0) More... | |
SoSFTrigger | unzoom |
sets sliceOrigin to (0,0) and sliceZoom to 1.0 More... | |
SoSFColor | backgroundColor |
fill slice background with given color More... | |
SoSFFloat | backgroundAlphaFactor |
background alpha factor (0=background invisible) More... | |
SoSFBool | handle2DEvents |
handle events when rendering in 2D More... | |
SoSFBool | handle3DEvents |
handle events when rendering in 3D More... | |
SoSFBool | useManagedInteraction |
prefer to use managed interaction instead of classical event handling if a SoView2DExtension provides it More... | |
SoSFBool | enableZBuffer |
use Z buffer in 3D rendering More... | |
SoSFBool | enableZWrite |
write Z buffer in 3D rendering More... | |
SoSFFloat | devicePixelSize |
size of a pixel in mm when rendering in 3D More... | |
SoSFTrigger | startCine |
start the cine mode More... | |
SoSFTrigger | stopCine |
stop the cine mode More... | |
SoSFInt32 | cineCenterT |
center of timepoint cine More... | |
SoSFInt32 | cineIntervalT |
interval of timepoint cine More... | |
SoSFInt32 | cineCenterZ |
center of z cine More... | |
SoSFInt32 | cineIntervalZ |
interval of z cine More... | |
SoSFEnum | cineMode |
mode of the Cinemode (Z,T,ZT) More... | |
SoSFEnum | cineDirection |
direction of Cinemode More... | |
SoSFEnum | cineRepeat |
flag to indicated if loop or ping-pong is used More... | |
SoSFFloat | cineSpeed |
speed of cine mode (in seconds), minimum cine speed is fixed to one repaint per image More... | |
SoSFBool | cineFullRangeZ |
flag if the full z range or the z interval is used More... | |
SoSFBool | cineFullRangeT |
flag if the full time range or the time interval is used More... | |
SoSFBool | cineAlwaysReset |
Always reset to start slice/time point and forward direction on start press (start with current position and direction otherwise) More... | |
SoSFBool | cineModeActive |
read-only flag indicating whether cine mode is active or not More... | |
SoSFEnum | sliceAlignX |
align the image inside of the slice if there is space left, default is VIEW2D_ALIGN_CENTER More... | |
SoSFEnum | sliceAlignY |
align the image inside of the slice if there is space left, default is VIEW2D_ALIGN_CENTER More... | |
SoSFEnum | zoomMode |
zoom mode that defines mapping to the viewer area More... | |
SoSFFloat | zoomModeParameter |
zoom mode parameter, depends on zoomMode what its value means More... | |
SoSFBool | invertKeyPanningDirections |
invert panning by keyboard More... | |
SoSFBool | invertKeySlicingDirection |
invert slicing by keyboard More... | |
SoSFBool | overrideAspectRatio |
set if the aspect ratio should be overwritten by user aspect ratio More... | |
SoSFFloat | overrideAspectRatioValue |
user defined aspect ratio, is only used if overrideAspectRatio is set to true More... | |
SoSFTrigger | deleteSelected |
delete current object in active SoView2DExtension More... | |
SoSFTrigger | edit |
set the extensions into edit mode More... | |
SoSFString | status |
status of current extension More... | |
SoSFString | seriesInstanceUID |
the DICOM seriesInstanceUID of the image currently displayed More... | |
SoSFString | frameOfReferenceUID |
the DICOM frameOfReferenceUID of the image currently displayed. More... | |
SoSFBool | deletingEnabled |
enable/disable delete-events for SoView2D-Extensions More... | |
Protected Member Functions | |
virtual | ~SoView2D () |
destructor More... | |
void | updateKeyboardActionEnabledState () |
SbBool | isMouseButtonPressed (int i) |
returns if given mousebutton (0-2) is currently pressed this is handles by the View2D, since Inventor only sends down individual MouseButtonPressed events and doesn't keep this state information More... | |
bool | isDeviceCoordInViewerArea (float dx, float dy, SoHandleEventAction *action) |
returns if the event of the given action is located over the viewer area More... | |
void | imageChanged () |
React on image changed. More... | |
void | sliceUnzoomAction (void) |
Reset slice zoom and translation. More... | |
void | updateViewingCenterAndPlane () |
update viewing center from sliceOrigin and sliceNumber More... | |
void | viewingCenterChanged () |
sets slice origins of all viewers according to current viewing center if synchronizePanning is on More... | |
void | updateSliceRepresentingPlane (const SbVec3f &worldCenter) |
void | sliceZoomChanged () |
updates the member sliceZoomSynchronized More... | |
void | sliceZoomSynchronizedChanged () |
updates the sliceZoom and corrects the slice origin, so that the viewing center of the slice remains in thew center of the view More... | |
int | setStartSlice (int slice, bool keepInView=false, bool noCB=false) |
set start slice, but obey possible restrictions (returns effective value) if keepInView is set, the slice will be restricted to the visible range if noCB is set, the field sensor is temporarily disabled when changing the value More... | |
void | cineTimerSensor () |
timer sensor used for cine mode More... | |
bool | cineAdvanceZ (bool backwards, bool wrapAround) |
these methods advance the slice/timepoint in cine mode. More... | |
bool | cineAdvanceT (bool backwards, bool wrapAround) |
void | doCineAnimationStep () |
this method does one cine animation step More... | |
void | cineDirectionChanged () |
updates the current cine direction when the cine direction value is changed More... | |
void | deleteSelectedObjectAction () |
delete the selected object More... | |
void | editObjectsAction () |
switch extensions to edit mode More... | |
void | handleScheduledActions (const SoNodeList *primitives) |
handle the actions given by deleteSelectedObject and editObjects More... | |
int | getCineStartZ () |
get the start z for cine mode More... | |
int | getCineEndZ () |
get the end z for cine mode More... | |
int | getCineStartT () |
get the start t for cine mode More... | |
int | getCineEndT () |
get the end t for cine mode More... | |
void | getLutFromScene (SoAction *action, ml::LUTData< MLuint8 > *data) |
render the lut into the given lut data object More... | |
void | layoutSlices (int wx, int wy) |
layout slices inside of the window area More... | |
void | updateLayoutAndDraw (int originX, int originY, int width, int height, bool updateLayoutOnly, SoNodeList *primitives=0, int sharedCacheContext=-1, bool is3D=false, bool reverse=false) |
update layout and draw in 2D or 3D More... | |
virtual void | objRef () |
Memory management by reference counting for SoInteractionProvider. More... | |
virtual void | objUnref () |
virtual std::string | getID () const |
Returns the id string for identifying the provider (and its actions) More... | |
Protected Member Functions inherited from SoInteractionOwner | |
virtual void | pointerPosition (const SoPointerPosition &) |
Override this if you always need to be informed of the current mouse cursor position. More... | |
virtual void | pointerLeftWindow () |
This is called when the mouse cursor leaves the window. More... | |
bool | hasInteractions () const |
Returns whether there are any actions defined by this owner. More... | |
template<class T > | |
bool | hasInteractionsOfType () const |
Same as above, but asking for a specific type of interaction. More... | |
void | addPointingAction (SoPointingAction *) |
void | addCommandAction (SoCommandAction *) |
void | addOffsetAction (SoOffsetAction *) |
Static Protected Member Functions | |
static void | updateKeyboardActionEnabledStateCB (void *data, SoSensor *a) |
update enabled state of the keyboard actions More... | |
static void | imageChangedCB (void *data, SoSensor *a) |
callback that calls imageChanged(); More... | |
static void | sliceUnzoomCB (void *data, SoSensor *a) |
callback that calls sliceUnzoomAction(); More... | |
static void | updateViewingCenterAndPlaneCB (void *data, SoSensor *a) |
callback which forwards to updateViewingCenterAndPlane() More... | |
static void | enableViewingCenterChangedCB (void *data, SoSensor *a) |
enable / disable viewing center usage. More... | |
static void | viewingCenterChangedCB (void *data, SoSensor *a) |
callback which forwards to viewingCenterChanged() More... | |
static void | sliceZoomChangedCB (void *data, SoSensor *a) |
callback which forwards to sliceToomChanged More... | |
static void | sliceZoomSynchronizedChangedCB (void *data, SoSensor *a) |
callback which forwards to sliceZoomSynchronizedChanged More... | |
static void | keepSlicesInViewCB (void *data, SoSensor *a) |
if keepSlicesInView is activated, set startSlice to a permitted value More... | |
static void | minSliceZoomKeyboardCB (void *data, SoSensor *a) |
callback for minimum slice zoom modification that performs clamping to value range More... | |
static void | cineTimerSensorCB (void *data, SoSensor *a) |
callback that calls cineTimerSensor(); More... | |
static void | startCineModeCB (void *data, SoSensor *a) |
callback that calls startCineMode(); More... | |
static void | stopCineModeCB (void *data, SoSensor *a) |
callback that calls stopCineMode(); More... | |
static void | cineDirectionChangedCB (void *data, SoSensor *a) |
callback that calls cineDirectionChanged() More... | |
static void | deleteSelectedObjectCB (void *data, SoSensor *a) |
callback that calls deleteSelectedObjectAction(); More... | |
static void | editObjectsCB (void *data, SoSensor *a) |
callback that calls deleteSelectedObjectAction(); More... | |
Protected Attributes | |
SoAction * | _action |
pointer to current action More... | |
View2DSliceList * | _sliceList |
the internal slice list which stores and handles rendered slices More... | |
ml::LUTFunction * | _localLut |
an internal lut which is used if there is no lut in the scene More... | |
ml::LUTData< MLuint8 > * | _lutData |
the currently allocated lut data More... | |
SbBool | _mouseButton [3] |
state of the mouse buttons (kept up-to-date with the handleEvent method) More... | |
SoTimerSensor * | _cineTimer |
sensor for cine mode More... | |
SoFieldSensor * | _imageSensor |
sensor for changed image More... | |
SoFieldSensor * | _startCine |
sensor for cine start More... | |
SoFieldSensor * | _stopCine |
sensor for cine stop More... | |
SoFieldSensor * | _cineDirection |
sensor for cine direction More... | |
SoFieldSensor * | _sliceUnzoom |
sensor for unzooming of slices More... | |
SoFieldSensor * | _minSliceZoomKeyboardSensor |
sensor for minSliceZoomKeyboard More... | |
SoFieldSensor * | _editObjects |
sensor for editing objects More... | |
SoFieldSensor * | _deleteSelectedObject |
sensor for deleting object More... | |
SoFieldSensor * | _viewingCenterSensor |
sensor for start slice More... | |
SoFieldSensor * | _enableViewingCenterSensor |
sensor for viewing center activation More... | |
SoFieldSensor * | _sliceAlignXSensor |
sensor for horizontal alignment More... | |
SoFieldSensor * | _sliceAlignYSensor |
sensor for vertical alignment More... | |
SoFieldSensor * | _startSliceSensor |
sensor for start slice More... | |
SoFieldSensor * | _numSlicesSensor |
sensor for numSlices More... | |
SoFieldSensor * | _sliceStepSensor |
sensor for sliceStep More... | |
SoFieldSensor * | _keepSlicesInViewSensor |
sensor for keepSlicesInView More... | |
SoFieldSensor * | _sliceZoomSensor |
sensor for slice zoom More... | |
SoFieldSensor * | _sliceZoomSynchronizedSensor |
SoFieldSensor * | _sliceOriginSensor |
sensor for slice origin More... | |
SoFieldSensor * | _standardKeysSensor |
SoFieldSensor * | _standardKeysNumbersSensor |
SoFieldSensor * | _standardKeysNeedValidPositionSensor |
SoFieldSensor * | _useManagedInteractionSensor |
bool | _cineStep |
flag for cinemode More... | |
bool | _cineBackward |
flag for cinemode More... | |
bool | _editObjectsScheduled |
flag if edit mode on extensions should be activated More... | |
bool | _deleteSelectedObjectScheduled |
flag if delete of object on extension should be activated More... | |
bool | _dragging |
remember if we are during a drag operation More... | |
bool | _mouseOverViewer |
remember if the mouse cursor is over the viewer area More... | |
SliceInitFunc | _sliceInitFunc |
external slice initialization callback More... | |
void * | _sliceInitUser |
user data for _sliceInitFunc More... | |
unsigned int | _imageSerialNumber |
last serial number of image More... | |
MLDataType | _currentLUTImageDataType |
double | _currentLUTImageMin |
double | _currentLUTImageMax |
int | _currentLUTImageNumChannels |
Static Protected Attributes | |
static View2DFont * | _globalFont |
static stored View2DFont that is valid in all SoView2D render contexts More... | |
SoInteractionHandler * | _interactionHandler |
Delegate that handles events for the new interaction scheme. More... | |
SoInteractionProvider * | _interactionProvider |
Delegate that provides the interaction objects from the SoView2DExtensions. More... | |
class | View2DInteractionHandler |
class | View2DInteractionProvider |
Additional Inherited Members | |
Public Types inherited from SoInteractionProvider | |
typedef SoInteractionProvider *(* | GetProviderFunc) (SoNode *) |
Callback function type. More... | |
SoView2D is a 2D viewer for image data.
Definition at line 56 of file SoView2D.h.
SoView2D::SoView2D | ( | ) |
constructor
|
protectedvirtual |
destructor
void SoView2D::adjustSliceOriginToCenter | ( | float | newSliceZoom | ) |
sets the new sliceZoom value and adjusts the sliceOrigin to zoom to the center of the ROI
|
protected |
|
protected |
these methods advance the slice/timepoint in cine mode.
If backwards is set, they move backwards. If wrapAround is set, the slice/timepoint is set to the first/last value if the end is reached, otherwise the slice/timepoint is not changed, but in both cases true is returned (i.e. for wrap-around or stop)
|
protected |
updates the current cine direction when the cine direction value is changed
|
staticprotected |
callback that calls cineDirectionChanged()
|
protected |
timer sensor used for cine mode
|
staticprotected |
callback that calls cineTimerSensor();
|
virtual |
when rendering in 3D, calculate the bounding box of the drawn slice(s)
|
protected |
delete the selected object
|
staticprotected |
callback that calls deleteSelectedObjectAction();
|
protected |
this method does one cine animation step
|
protected |
switch extensions to edit mode
|
staticprotected |
callback that calls deleteSelectedObjectAction();
|
staticprotected |
enable / disable viewing center usage.
Can only be enabled if alignX and alignY are set to CENTER
|
virtual |
not implemented
|
inline |
get pointer to current action.
If there is no current action the function returns NULL. May be used to access the Open Inventor state.
Definition at line 294 of file SoView2D.h.
|
protected |
get the end t for cine mode
|
protected |
get the end z for cine mode
|
protected |
get the start t for cine mode
|
protected |
get the start z for cine mode
int SoView2D::getCurrentCenterSlice | ( | ) |
returns the central of all currently visible slices (e.g. startSlice, if numSlices is 1)
|
inline |
get the default lut object (just a relative ramp from 0 to 1)
Definition at line 361 of file SoView2D.h.
|
static |
Returns the value of a DICOM tag with the given name as a string, or an empty string if the tag was not found in the given image.
bool SoView2D::getEventLocation | ( | SoHandleEventAction * | action, |
bool & | hit, | ||
float & | dx, | ||
float & | dy, | ||
SbVec3f & | voxelHit, | ||
int & | sliceID | ||
) |
get event location of the event contained in action, returns if the image is hit, the device location and the voxel position (extracted from handleEvent).
If sliceID is set to NO_SLICE_ID, it will be set to the index of the slice that was hit by this test. If sliceID is any other value, it is taken to be the index of a slice and the test is only performed on this slice. This is used to grab the mouse for this slice at a mouse press.
|
protectedvirtual |
Returns the id string for identifying the provider (and its actions)
Reimplemented from SoInteractionOwner.
|
static |
static method to register with SoInteractionProvider for this class
ml::LUTFunction* SoView2D::getLutFromScene | ( | SoAction * | action | ) |
get the lut from the scene (default ramp if no lut is set)
|
protected |
render the lut into the given lut data object
int SoView2D::getMaxStartSlice | ( | ) |
returns the highest sensible value for startSlice
SbVec2f SoView2D::getSingleSliceSize | ( | int | windowX, |
int | windowY | ||
) |
get the size of a single slice in the window area (this can be used to align annotation font size across several SoView2Ds)
|
inline |
Get slice position initialization callback.
Definition at line 345 of file SoView2D.h.
View2DSliceList* SoView2D::getSliceList | ( | ) |
returns the slicelist that is used to manage the slices
SbVec2f SoView2D::getSliceSize | ( | ) |
get slice size x/y in millimeters (used by SoOrthoView2D)
void SoView2D::getStatusString | ( | SbString & | string | ) |
access status string
|
inline |
returns the viewer id of this viewer
Definition at line 285 of file SoView2D.h.
|
static |
get the global font used for annotations etc. (only call this within a valid GL context!)
|
inlinestatic |
DEPRECATED: cache context id is no longer needed.
Definition at line 328 of file SoView2D.h.
References globalFont().
Referenced by globalFont().
|
static |
Always return an existing font singleton as from globalFont(); used for annotations etc.
To be called only from within a valid GL context!
|
virtual |
reimplemented Inventor method which renders the slices
|
virtual |
handle the mouse and keyboard events and send them to extensions
bool SoView2D::handleKeyboardEvent | ( | int | nKey, |
bool | shift, | ||
bool | alt, | ||
bool | ctrl | ||
) |
handle standard key, returns true if handles
|
protected |
handle the actions given by deleteSelectedObject and editObjects
|
protected |
React on image changed.
|
staticprotected |
callback that calls imageChanged();
|
static |
inventor runtime type system
|
protected |
returns if the event of the given action is located over the viewer area
|
protected |
returns if given mousebutton (0-2) is currently pressed this is handles by the View2D, since Inventor only sends down individual MouseButtonPressed events and doesn't keep this state information
|
staticprotected |
if keepSlicesInView is activated, set startSlice to a permitted value
|
protected |
layout slices inside of the window area
|
staticprotected |
callback for minimum slice zoom modification that performs clamping to value range
|
inlineprotectedvirtual |
Memory management by reference counting for SoInteractionProvider.
Implements SoInteractionOwner.
Definition at line 399 of file SoView2D.h.
|
inlineprotectedvirtual |
Implements SoInteractionOwner.
Definition at line 400 of file SoView2D.h.
|
inline |
Set slice position initialization callback The callback function set by this method is called when the input image changes.
If the callback return value is >= 0, it determines the initial slice position, otherwise it is ignored. At the time the callback is executed, most of the View2D's properties are not initialized, so the View2D* pointer passed to the callback should be used for object identification only.
Definition at line 341 of file SoView2D.h.
|
protected |
set start slice, but obey possible restrictions (returns effective value) if keepInView is set, the slice will be restricted to the visible range if noCB is set, the field sensor is temporarily disabled when changing the value
|
protected |
Reset slice zoom and translation.
|
staticprotected |
callback that calls sliceUnzoomAction();
|
protected |
updates the member sliceZoomSynchronized
|
staticprotected |
callback which forwards to sliceToomChanged
|
protected |
updates the sliceZoom and corrects the slice origin, so that the viewing center of the slice remains in thew center of the view
|
staticprotected |
callback which forwards to sliceZoomSynchronizedChanged
void SoView2D::startCineMode | ( | ) |
start the cine mode
|
staticprotected |
callback that calls startCineMode();
void SoView2D::stopCineMode | ( | ) |
stop the cine mode
|
staticprotected |
callback that calls stopCineMode();
void SoView2D::translateInnerSlice | ( | float | x, |
float | y | ||
) |
translates the inner slice x/y pixel on the screen
|
protected |
|
staticprotected |
update enabled state of the keyboard actions
|
protected |
update layout and draw in 2D or 3D
bool SoView2D::updateLutData | ( | ml::LUTFunction * | lut, |
ml::LUTData< MLuint8 > * | data, | ||
SoSFMLImage * | img, | ||
View2DLutPrecision | precision | ||
) |
renders the lut data from the lut function according to the image data (lut may be NULL, SoView2D will then use a default ramp) returns if the lut could be rendered or if the rendering failed.
When the rendering fails, you can always call with lut==NULL and will get a correct default ramp)
void SoView2D::updateSliceListOnImageChange | ( | ) |
update the slice list if the image has changed
|
protected |
|
protected |
update viewing center from sliceOrigin and sliceNumber
|
staticprotected |
callback which forwards to updateViewingCenterAndPlane()
|
protected |
sets slice origins of all viewers according to current viewing center if synchronizePanning is on
|
staticprotected |
callback which forwards to viewingCenterChanged()
|
friend |
Definition at line 622 of file SoView2D.h.
|
friend |
Definition at line 623 of file SoView2D.h.
|
protected |
pointer to current action
Definition at line 523 of file SoView2D.h.
|
protected |
flag for cinemode
Definition at line 598 of file SoView2D.h.
|
protected |
sensor for cine direction
Definition at line 552 of file SoView2D.h.
|
protected |
flag for cinemode
Definition at line 596 of file SoView2D.h.
|
protected |
sensor for cine mode
Definition at line 544 of file SoView2D.h.
|
protected |
Definition at line 533 of file SoView2D.h.
|
protected |
Definition at line 535 of file SoView2D.h.
|
protected |
Definition at line 534 of file SoView2D.h.
|
protected |
Definition at line 536 of file SoView2D.h.
|
protected |
sensor for deleting object
Definition at line 560 of file SoView2D.h.
|
protected |
flag if delete of object on extension should be activated
Definition at line 603 of file SoView2D.h.
|
protected |
remember if we are during a drag operation
Definition at line 606 of file SoView2D.h.
|
protected |
sensor for editing objects
Definition at line 558 of file SoView2D.h.
|
protected |
flag if edit mode on extensions should be activated
Definition at line 601 of file SoView2D.h.
|
protected |
sensor for viewing center activation
Definition at line 565 of file SoView2D.h.
|
staticprotected |
static stored View2DFont that is valid in all SoView2D render contexts
Definition at line 619 of file SoView2D.h.
|
protected |
sensor for changed image
Definition at line 546 of file SoView2D.h.
|
protected |
last serial number of image
Definition at line 616 of file SoView2D.h.
|
protected |
Delegate that handles events for the new interaction scheme.
Definition at line 626 of file SoView2D.h.
|
protected |
Delegate that provides the interaction objects from the SoView2DExtensions.
Definition at line 628 of file SoView2D.h.
|
protected |
sensor for keepSlicesInView
Definition at line 579 of file SoView2D.h.
|
protected |
an internal lut which is used if there is no lut in the scene
Definition at line 528 of file SoView2D.h.
|
protected |
the currently allocated lut data
Definition at line 530 of file SoView2D.h.
|
protected |
sensor for minSliceZoomKeyboard
Definition at line 556 of file SoView2D.h.
|
protected |
state of the mouse buttons (kept up-to-date with the handleEvent method)
Definition at line 541 of file SoView2D.h.
|
protected |
remember if the mouse cursor is over the viewer area
Definition at line 608 of file SoView2D.h.
|
protected |
sensor for numSlices
Definition at line 575 of file SoView2D.h.
|
protected |
sensor for horizontal alignment
Definition at line 568 of file SoView2D.h.
|
protected |
sensor for vertical alignment
Definition at line 570 of file SoView2D.h.
|
protected |
external slice initialization callback
Definition at line 611 of file SoView2D.h.
|
protected |
user data for _sliceInitFunc
Definition at line 613 of file SoView2D.h.
|
protected |
the internal slice list which stores and handles rendered slices
Definition at line 526 of file SoView2D.h.
|
protected |
sensor for slice origin
Definition at line 587 of file SoView2D.h.
|
protected |
sensor for sliceStep
Definition at line 577 of file SoView2D.h.
|
protected |
sensor for unzooming of slices
Definition at line 554 of file SoView2D.h.
|
protected |
sensor for slice zoom
Definition at line 582 of file SoView2D.h.
|
protected |
Definition at line 584 of file SoView2D.h.
|
protected |
Definition at line 591 of file SoView2D.h.
|
protected |
Definition at line 590 of file SoView2D.h.
|
protected |
Definition at line 589 of file SoView2D.h.
|
protected |
sensor for cine start
Definition at line 548 of file SoView2D.h.
|
protected |
sensor for start slice
Definition at line 573 of file SoView2D.h.
|
protected |
sensor for cine stop
Definition at line 550 of file SoView2D.h.
|
protected |
Definition at line 592 of file SoView2D.h.
|
protected |
sensor for start slice
Definition at line 563 of file SoView2D.h.
SoSFFloat SoView2D::alphaFactor |
alpha factor for rendering
Definition at line 86 of file SoView2D.h.
SoSFBool SoView2D::applyLut |
select if the View2d should apply the scene LUT to the slice data (default is true)
Definition at line 93 of file SoView2D.h.
SoSFFloat SoView2D::backgroundAlphaFactor |
background alpha factor (0=background invisible)
Definition at line 175 of file SoView2D.h.
SoSFColor SoView2D::backgroundColor |
fill slice background with given color
Definition at line 173 of file SoView2D.h.
SoSFColor SoView2D::baseColor |
base color in which the slices are drawn
Definition at line 88 of file SoView2D.h.
SoSFEnum SoView2D::blendMode |
blend mode for rendering
Definition at line 80 of file SoView2D.h.
SoSFEnum SoView2D::cacheMode |
caching of slices
Definition at line 84 of file SoView2D.h.
SoSFBool SoView2D::cineAlwaysReset |
Always reset to start slice/time point and forward direction on start press (start with current position and direction otherwise)
Definition at line 227 of file SoView2D.h.
SoSFInt32 SoView2D::cineCenterT |
center of timepoint cine
Definition at line 204 of file SoView2D.h.
SoSFInt32 SoView2D::cineCenterZ |
center of z cine
Definition at line 208 of file SoView2D.h.
SoSFEnum SoView2D::cineDirection |
direction of Cinemode
Definition at line 214 of file SoView2D.h.
SoSFBool SoView2D::cineFullRangeT |
flag if the full time range or the time interval is used
Definition at line 223 of file SoView2D.h.
SoSFBool SoView2D::cineFullRangeZ |
flag if the full z range or the z interval is used
Definition at line 221 of file SoView2D.h.
SoSFInt32 SoView2D::cineIntervalT |
interval of timepoint cine
Definition at line 206 of file SoView2D.h.
SoSFInt32 SoView2D::cineIntervalZ |
interval of z cine
Definition at line 210 of file SoView2D.h.
SoSFEnum SoView2D::cineMode |
mode of the Cinemode (Z,T,ZT)
Definition at line 212 of file SoView2D.h.
SoSFBool SoView2D::cineModeActive |
read-only flag indicating whether cine mode is active or not
Definition at line 230 of file SoView2D.h.
SoSFEnum SoView2D::cineRepeat |
flag to indicated if loop or ping-pong is used
Definition at line 216 of file SoView2D.h.
SoSFFloat SoView2D::cineSpeed |
speed of cine mode (in seconds), minimum cine speed is fixed to one repaint per image
Definition at line 218 of file SoView2D.h.
SoSFTrigger SoView2D::deleteSelected |
delete current object in active SoView2DExtension
Definition at line 258 of file SoView2D.h.
SoSFBool SoView2D::deletingEnabled |
enable/disable delete-events for SoView2D-Extensions
Definition at line 271 of file SoView2D.h.
SoSFFloat SoView2D::devicePixelSize |
size of a pixel in mm when rendering in 3D
Definition at line 193 of file SoView2D.h.
SoSFBool SoView2D::drawImageData |
if set to false, only the extensions of the SoView2D are drawn, not the images
Definition at line 74 of file SoView2D.h.
SoSFTrigger SoView2D::edit |
set the extensions into edit mode
Definition at line 260 of file SoView2D.h.
SoSFBool SoView2D::enableViewingCenter |
If enabled, the viewing center is activated for reading and writing.
Definition at line 164 of file SoView2D.h.
SoSFBool SoView2D::enableZBuffer |
use Z buffer in 3D rendering
Definition at line 187 of file SoView2D.h.
SoSFBool SoView2D::enableZWrite |
write Z buffer in 3D rendering
Definition at line 190 of file SoView2D.h.
SoSFEnum SoView2D::filterMode |
filter mode for rendering
Definition at line 82 of file SoView2D.h.
SoSFString SoView2D::frameOfReferenceUID |
the DICOM frameOfReferenceUID of the image currently displayed.
Definition at line 268 of file SoView2D.h.
SoSFBool SoView2D::handle2DEvents |
handle events when rendering in 2D
Definition at line 178 of file SoView2D.h.
SoSFBool SoView2D::handle3DEvents |
handle events when rendering in 3D
Definition at line 181 of file SoView2D.h.
SoSFMLImage SoView2D::image |
input ML image
Definition at line 71 of file SoView2D.h.
SoSFString SoView2D::instanceName |
Defines interface field to store the instance name.
Definition at line 65 of file SoView2D.h.
SoSFString SoView2D::interactionProviderID |
This field overrides the instanceName as providerID if specified.
Definition at line 68 of file SoView2D.h.
SoSFBool SoView2D::invertKeyPanningDirections |
invert panning by keyboard
Definition at line 244 of file SoView2D.h.
SoSFBool SoView2D::invertKeySlicingDirection |
invert slicing by keyboard
Definition at line 246 of file SoView2D.h.
SoSFBool SoView2D::keepSlicesInView |
if this is set, the slices are prevented from leaving the visible area.
This option can interefere with option enableViewingCenter
Definition at line 109 of file SoView2D.h.
SoSFVec2f SoView2D::lowerLeft |
restrict the rendering to a subpart of the viewer, in normalized coordinated
Definition at line 129 of file SoView2D.h.
SoSFEnum SoView2D::lutPrecision |
defines the precision of the LUT
Definition at line 95 of file SoView2D.h.
SoSFVec2f SoView2D::margin |
margin to the border of the viewer
Definition at line 121 of file SoView2D.h.
SoSFInt32 SoView2D::maxSlice |
the maximum slice number, read from the image
, used to restrict startSlice
Definition at line 106 of file SoView2D.h.
SoSFInt32 SoView2D::maxTimePoint |
the maximum timepoint, read from the image
, used to restrict timePoint
Definition at line 113 of file SoView2D.h.
SoSFFloat SoView2D::minSliceZoomKeyboard |
minimum slice zoom for keyboard modifications (always clamped by MIN_MIN_SLICE_ZOOM and 1.0)
Definition at line 167 of file SoView2D.h.
SoSFInt32 SoView2D::numSlices |
number of slices that are rendered
Definition at line 102 of file SoView2D.h.
SoSFInt32 SoView2D::numXSlices |
number of slices that are rendered in X
Definition at line 104 of file SoView2D.h.
SoSFBool SoView2D::overrideAspectRatio |
set if the aspect ratio should be overwritten by user aspect ratio
Definition at line 249 of file SoView2D.h.
SoSFFloat SoView2D::overrideAspectRatioValue |
user defined aspect ratio, is only used if overrideAspectRatio
is set to true
Definition at line 251 of file SoView2D.h.
SoSFBool SoView2D::passHandledFlagToInventor |
Set this true if following inventor nodes should not react to events that have been handled by a SoView2DExtension Depricated name: updateInventorEvent;.
Definition at line 146 of file SoView2D.h.
SoSFPlane SoView2D::plane |
plane representing the slice in world coordinates
Definition at line 126 of file SoView2D.h.
SoSFTrigger SoView2D::renderingDone |
output field is triggered from the inside when all rendering is done.
Definition at line 276 of file SoView2D.h.
SoSFBool SoView2D::reverseExtensionDrawingOrder |
Reverse drawing order of extensions.
Definition at line 149 of file SoView2D.h.
SoSFString SoView2D::seriesInstanceUID |
the DICOM seriesInstanceUID of the image currently displayed
Definition at line 266 of file SoView2D.h.
SoSFInt32 SoView2D::slab |
the slab that is rendered (1=only one slice)
Definition at line 115 of file SoView2D.h.
SoSFEnum SoView2D::sliceAlignX |
align the image inside of the slice if there is space left, default is VIEW2D_ALIGN_CENTER
Definition at line 233 of file SoView2D.h.
SoSFEnum SoView2D::sliceAlignY |
align the image inside of the slice if there is space left, default is VIEW2D_ALIGN_CENTER
Definition at line 235 of file SoView2D.h.
SoSFVec2f SoView2D::sliceOrigin |
the internal origin of the slice in voxels (for shifting inside of the view)
Definition at line 152 of file SoView2D.h.
SoSFInt32 SoView2D::sliceStep |
step to next rendered slice
Definition at line 100 of file SoView2D.h.
SoSFFloat SoView2D::sliceZoom |
the internal zoom of the slice (for zooming inside if the view)
Definition at line 154 of file SoView2D.h.
SoSFFloat SoView2D::sliceZoomSynchronized |
same as sliceZoom, except that changes to this member update the slice origin so that the viewing center remains in the center of the viewer
Definition at line 156 of file SoView2D.h.
SoSFBool SoView2D::snapToCenter |
if set, the viewer snaps to center of image on each input image change
Definition at line 134 of file SoView2D.h.
SoSFVec2f SoView2D::spacing |
spacing between slices
Definition at line 123 of file SoView2D.h.
SoSFBool SoView2D::standardKeys |
enable the keypad and 0-9 keys
Definition at line 137 of file SoView2D.h.
SoSFBool SoView2D::standardKeysNeedValidPosition |
set if the keys work anywhere or only if pressed with mouse inside of a slice (needed for SoOrthoView2D)
Definition at line 141 of file SoView2D.h.
SoSFBool SoView2D::standardKeysNumbers |
enable number keys 0-9, depends on standardKeys being enabled
Definition at line 139 of file SoView2D.h.
SoSFTrigger SoView2D::startCine |
start the cine mode
Definition at line 200 of file SoView2D.h.
SoSFInt32 SoView2D::startSlice |
current start slice
Definition at line 98 of file SoView2D.h.
SoSFString SoView2D::status |
status of current extension
Definition at line 263 of file SoView2D.h.
SoSFTrigger SoView2D::stopCine |
stop the cine mode
Definition at line 202 of file SoView2D.h.
SoSFInt32 SoView2D::timePoint |
the timepoint the viewers is currently showing
Definition at line 111 of file SoView2D.h.
SoSFTrigger SoView2D::unzoom |
sets sliceOrigin to (0,0) and sliceZoom to 1.0
Definition at line 170 of file SoView2D.h.
SoSFBool SoView2D::unzoomOnImageChange |
If enabled, the module unzooms automatically on an input image change.
Definition at line 117 of file SoView2D.h.
SoSFVec2f SoView2D::upperRight |
restrict the rendering to a subpart of the viewer, in normalized coordinated
Definition at line 131 of file SoView2D.h.
SoSFBool SoView2D::useManagedInteraction |
prefer to use managed interaction instead of classical event handling if a SoView2DExtension provides it
Definition at line 184 of file SoView2D.h.
SoSFBool SoView2D::useShaders |
if enabled, the SoView2D tries to emulate a hardware lut by using hardware shaders, only works on hardware that supports shaders and is ignored otherwise
Definition at line 91 of file SoView2D.h.
SoSFString SoView2D::viewerId |
id string, needs to be unique in a network if used
Definition at line 77 of file SoView2D.h.
Referenced by CSODrawView2DInfos::getViewerId().
SoSFVec3f SoView2D::viewingCenter |
world position of the current center of the viewer
Definition at line 161 of file SoView2D.h.
SoSFVec2f SoView2D::zoomCenter |
center of zoom/scale operation in normalized coordinates
Definition at line 158 of file SoView2D.h.
SoSFEnum SoView2D::zoomMode |
zoom mode that defines mapping to the viewer area
Definition at line 239 of file SoView2D.h.
SoSFFloat SoView2D::zoomModeParameter |
zoom mode parameter, depends on zoomMode
what its value means
Definition at line 241 of file SoView2D.h.