#include <SoView2D.h>
Public Member Functions | |
| SoView2D () | |
| constructor | |
| View2DSliceList * | getSliceList () |
| returns the slicelist that is used to manage the slices | |
| SbVec2f | getSliceSize () |
| get slice size x/y in millimeters (used by SoOrthoView2D) | |
| SoAction * | getAction () |
| get pointer to current action. | |
| virtual void | GLRender (SoGLRenderAction *action) |
| reimplemented Inventor method which renders the slices | |
| virtual void | handleEvent (SoHandleEventAction *action) |
| handle the mouse and keyboard events and send them to extensions | |
| virtual void | computeBBox (SoAction *action, SbBox3f &box, SbVec3f ¢er) |
| when rendering in 3D, calculate the bounding box of the drawn slice(s) | |
| virtual void | generatePrimitives (SoAction *action) |
| not implemented | |
| 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 relative location and the voxel position (extracted from handleEvent). | |
| int | currentContext () |
| get the current cache context (valid while rendering only) | |
| 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. | |
| SliceInitFunc | getSliceInitFunc (void) |
| Get slice position initialization callback. | |
| int | getCurrentCenterSlice () |
| returns the central of all currently visible slices (e.g. startSlice, if numSlices is 1) | |
| void | adjustSliceOriginToCenter (float newSliceZoom) |
| sets the new sliceZoom value and adjusts the sliceOrigin to zoom to the center of the ROI | |
| void | translateInnerSlice (float x, float y) |
| translates the inner slice x/y pixel on the screen | |
| void | getStatusString (SbString &string) |
| access status string | |
| ml::LUTFunction * | getDefaultLut () |
| get the default lut object (just a relative ramp from 0 to 1) | |
| ml::LUTFunction * | getLutFromScene (SoAction *action) |
| get the lut from the scene (default ramp if no lut is set) | |
| bool | updateLutData (ml::LUTFunction *lut, ml::LUTData< MLuint8 > *data, SoSFMLImage *img) |
| renders the lut data from the lut function according to the image data and the interactive state of the SoView2D (lut may be NULL, SoView2D will then use a default ramp) returns if the lut could be rendered or if the rendering failed. | |
| void | startCineMode () |
| start the cine mode | |
| void | stopCineMode () |
| stop the cine mode | |
| 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) | |
| int | getMaxStartSlice () |
| returns the highest sensible value for startSlice | |
Static Public Member Functions | |
| static void | initClass () |
| inventor runtime type system | |
| static View2DFont * | globalFont () |
| get the global font used for annotations etc. (only call this within a valid GL context!) | |
| static View2DFont * | globalFont (int) |
| DEPRECATED: cache context id is no longer needed. | |
| static View2DFont & | globalFontRef () |
| Always return an existing font singleton as from globalFont(); used for annotations etc. | |
Public Attributes | |
| SoSFTrigger | deleteSelected |
| delete current object in active SoView2DExtension | |
| SoSFTrigger | edit |
| set the extensions into edit mode | |
| SoSFString | status |
| status of current extension | |
| SoSFBool | deletingEnabled |
| enable/disable delete-events for SoView2D-Extensions | |
| SoSFMLImage | image |
| input ML image | |
| SoSFBool | drawImageData |
| if set to false, only the extensions of the SoView2D are drawn, not the images | |
| SoSFEnum | blendMode |
| blend mode for rendering | |
| SoSFEnum | filterMode |
| filter mode for rendering | |
| SoSFEnum | cacheMode |
| caching of slices | |
| SoSFFloat | alphaFactor |
| alpha factor for rendering | |
| SoSFColor | baseColor |
| base color in which the slices are drawn | |
| SoSFEnum | lutMode |
| mode of the Lookuptable precision | |
| 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 | |
| SoSFBool | applyLut |
| select if the View2d should apply the scene LUT to the slice data (default is true) | |
| SoSFInt32 | startSlice |
| current start slice | |
| SoSFInt32 | sliceStep |
| step to next rendered slice | |
| SoSFInt32 | numSlices |
| number of slices that are rendered | |
| SoSFInt32 | numXSlices |
| number of slices that are rendered in X | |
| SoSFInt32 | maxSlice |
the maximum slice number, read from the image, used to restrict startSlice | |
| SoSFBool | keepSlicesInView |
| if this is set, the slices are prevented from leaving the visible area. | |
| SoSFInt32 | timePoint |
| the timepoint the viewers is currently showing | |
| SoSFInt32 | maxTimePoint |
the maximum timepoint, read from the image, used to restrict timePoint | |
| SoSFInt32 | slab |
| the slab that is rendered (1=only one slice) | |
| SoSFBool | unzoomOnImageChange |
| If enabled, the module unzooms automatically on an input image change. | |
| SoSFVec2f | margin |
| margin to the border of the viewer | |
| SoSFVec2f | spacing |
| spacing between slices | |
| SoSFPlane | plane |
| plane representing the slice in world coordinates | |
| SoSFVec2f | lowerLeft |
| restrict the rendering to a subpart of the viewer, in normalized coordinated | |
| SoSFVec2f | upperRight |
| restrict the rendering to a subpart of the viewer, in normalized coordinated | |
| SoSFBool | snapToCenter |
| if set, the viewer snaps to center of image on each input image change | |
| SoSFBool | standardKeys |
| enable the keypad and 0-9 keys | |
| SoSFBool | standardKeysNumbers |
| enable number keys 0-9, depends on standardKeys being enabled | |
| SoSFBool | standardKeysNeedValidPosition |
| set if the keys work anywhere or only if pressed with mouse inside of a slice (needed for SoOrthoView2D) | |
| SoSFBool | passHandledFlagToInventor |
| Set this true if following inventor nodes should not react to events that have been handled by a SoView2DExtension Depricated name: updateInventorEvent;. | |
| SoSFBool | reverseExtensionDrawingOrder |
| Reverse drawing order of extensions. | |
| SoSFVec2f | sliceOrigin |
| the internal origin of the slice in voxels (for shifting inside of the view) | |
| SoSFFloat | sliceZoom |
| the internal zoom of the slice (for zooming inside if the view) | |
| 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 | |
| SoSFVec2f | zoomCenter |
| center of zoom/scale operation in normalized coordinates | |
| SoSFVec3f | viewingCenter |
| world position of the current center of the viewer | |
| SoSFBool | enableViewingCenter |
| If enabled, the viewing center is activated for reading and writing. | |
| SoSFFloat | minSliceZoomKeyboard |
| minimum slice zoom for keyboard modifications (always clamped by MIN_MIN_SLICE_ZOOM and 1.0) | |
| SoSFTrigger | unzoom |
| sets sliceOrigin to (0,0) and sliceZoom to 1.0 | |
| SoSFColor | backgroundColor |
| fill slice background with given color | |
| SoSFFloat | backgroundAlphaFactor |
| background alpha factor (0=background invisible) | |
| SoSFBool | handle2DEvents |
| handle events when rendering in 2D | |
| SoSFBool | handle3DEvents |
| handle events when rendering in 3D | |
| SoSFBool | enableZBuffer |
| use Z buffer in 3D rendering | |
| SoSFBool | enableZWrite |
| write Z buffer in 3D rendering | |
| SoSFFloat | devicePixelSize |
| size of a pixel in mm when rendering in 3D | |
| SoSFTrigger | startCine |
| start the cine mode | |
| SoSFTrigger | stopCine |
| stop the cine mode | |
| SoSFInt32 | cineCenterT |
| center of timepoint cine | |
| SoSFInt32 | cineIntervalT |
| interval of timepoint cine | |
| SoSFInt32 | cineCenterZ |
| center of z cine | |
| SoSFInt32 | cineIntervalZ |
| interval of z cine | |
| SoSFEnum | cineMode |
| mode of the Cinemode (Z,T,ZT) | |
| SoSFEnum | cineDirection |
| direction of Cinemode | |
| SoSFEnum | cineRepeat |
| flag to indicated if loop or ping-pong is used | |
| SoSFFloat | cineSpeed |
| speed of cine mode (in seconds), minimum cine speed is fixed to one repaint per image | |
| SoSFBool | cineFullRangeZ |
| flag if the full z range or the z interval is used | |
| SoSFBool | cineFullRangeT |
| flag if the full time range or the time interval is used | |
| SoSFBool | cineAlwaysReset |
| Always reset to start slice/time point and forward direction on start press (start with current position and direction otherwise). | |
| SoSFEnum | sliceAlignX |
| align the image inside of the slice if there is space left, default is VIEW2D_ALIGN_CENTER | |
| SoSFEnum | sliceAlignY |
| align the image inside of the slice if there is space left, default is VIEW2D_ALIGN_CENTER | |
| SoSFEnum | zoomMode |
| zoom mode that defines mapping to the viewer area | |
| SoSFFloat | zoomModeParameter |
zoom mode parameter, depends on zoomMode what its value means | |
| SoSFBool | invertKeyPanningDirections |
| invert panning by keyboard | |
| SoSFBool | overrideAspectRatio |
| set if the aspect ratio should be overwritten by user aspect ratio | |
| SoSFFloat | overrideAspectRatioValue |
user defined aspect ratio, is only used if overrideAspectRatio is set to true | |
Protected Member Functions | |
| virtual | ~SoView2D () |
| destructor | |
| 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 | |
| bool | isDeviceCoordInViewerArea (float dx, float dy, SoHandleEventAction *action) |
| returns if the event of the given action is located over the viewer area | |
| void | sendMouseOverUpdateEvent (const SoNodeList *extensions, SbViewportRegion vport) |
| special event for mouseover render updates | |
| void | imageChanged () |
| React on image changed. | |
| void | sliceUnzoomAction (void) |
| Reset slice zoom and translation. | |
| void | updateViewingCenter () |
| update viewing center from sliceOrigin and sliceNumber | |
| void | viewingCenterChanged () |
| sets slice origins of all viewers according to current viewing center if synchronizePanning is on | |
| void | sliceZoomChanged () |
| updates the member sliceZoomSynchronized | |
| 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 | |
| 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 | |
| void | cineTimerSensor () |
| timer sensor used for cine mode | |
| void | deleteSelectedObjectAction () |
| delete the selected object | |
| void | editObjectsAction () |
| switch extensions to edit mode | |
| void | startInteractiveTimer () |
| start timer for interactive mode of LUT | |
| void | stopInteractiveTimer () |
| stop timer for interactive mode of LUT | |
| void | interactiveTimerSensor () |
| handling of low quality and highquality lut rendering | |
| bool | isInteractive () |
| returns if View2D is currently interactivly changed (measured by timer) | |
| void | updateInteractiveMode (SoAction *action) |
| updates the interactive mode | |
| void | handleScheduledActions (const SoNodeList *primitives) |
| handle the actions given by deleteSelectedObject and editObjects | |
| int | getCineStartZ () |
| get the start z for cine mode | |
| int | getCineEndZ () |
| get the end z for cine mode | |
| int | getCineStartT () |
| get the start t for cine mode | |
| int | getCineEndT () |
| get the end t for cine mode | |
| void | getLutFromScene (SoAction *action, ml::LUTData< MLuint8 > *data) |
| render the lut into the given lut data object (according to current lut mode and interactive state) | |
| ml::LUTData< MLuint8 > * | getLutFromSceneInteractive (SoAction *action) |
| render correct lut data from scene and update interactive timer | |
| void | layoutSlices (int wx, int wy) |
| layout slices inside of the window area | |
| 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 | |
| bool | handleKeyboardEvent (int nKey, bool shift, bool alt, bool ctrl) |
| handle standard key, returns true if handles | |
Static Protected Member Functions | |
| static void | imageChangedCB (void *data, SoSensor *a) |
| callback that calls imageChanged(); | |
| static void | sliceUnzoomCB (void *data, SoSensor *a) |
| callback that calls sliceUnzoomAction(); | |
| static void | updateViewingCenterCB (void *data, SoSensor *a) |
| callback which forwards to updateViewingCenter() | |
| static void | enableViewingCenterChangedCB (void *data, SoSensor *a) |
| enable / disable viewing center usage. | |
| static void | viewingCenterChangedCB (void *data, SoSensor *a) |
| callback which forwards to viewingCenterChanged() | |
| static void | sliceZoomChangedCB (void *data, SoSensor *a) |
| callback witch forwards to sliceToomChanged | |
| static void | sliceZoomSynchronizedChangedCB (void *data, SoSensor *a) |
| callback witch forwards to sliceZoomSynchronizedChanged | |
| static void | keepSlicesInViewCB (void *data, SoSensor *a) |
| if keepSlicesInView is activated, set startSlice to a permitted value | |
| static void | minSliceZoomKeyboardCB (void *data, SoSensor *a) |
| callback for minimum slice zoom modification that performs clamping to value range | |
| static void | cineTimerSensorCB (void *data, SoSensor *a) |
| callback that calls cineTimerSensor(); | |
| static void | startCineModeCB (void *data, SoSensor *a) |
| callback that calls startCineMode(); | |
| static void | stopCineModeCB (void *data, SoSensor *a) |
| callback that calls stopCineMode(); | |
| static void | deleteSelectedObjectCB (void *data, SoSensor *a) |
| callback that calls deleteSelectedObjectAction(); | |
| static void | editObjectsCB (void *data, SoSensor *a) |
| callback that calls deleteSelectedObjectAction(); | |
| static void | interactiveTimerSensorCB (void *data, SoSensor *sensor) |
| callback that calls interactiveTimerSensor(); | |
Protected Attributes | |
| SoAction * | _action |
| pointer to current action | |
| View2DSliceList * | _sliceList |
| the internal slice list which stores and handles rendered slices | |
| ml::LUTFunction * | _localLut |
| an internal lut which is used if there is no lut in the scene | |
| ml::LUTData< MLuint8 > * | _lutData |
| the currently allocated lut data | |
| SbBool | _mouseButton [3] |
| state of the mouse buttons (kept up-to-date with the handleEvent method) | |
| SoTimerSensor * | _cineTimer |
| sensor for cine mode | |
| SoFieldSensor * | _imageSensor |
| sensor for changed image | |
| SoFieldSensor * | _startCine |
| sensor for cine start | |
| SoFieldSensor * | _stopCine |
| sensor for cine stop | |
| SoFieldSensor * | _sliceUnzoom |
| sensor for unzooming of slices | |
| SoFieldSensor * | _minSliceZoomKeyboardSensor |
| sensor for minSliceZoomKeyboard | |
| SoFieldSensor * | _editObjects |
| sensor for editing objects | |
| SoFieldSensor * | _deleteSelectedObject |
| sensor for deleting object | |
| SoFieldSensor * | _viewingCenterSensor |
| sensor for start slice | |
| SoFieldSensor * | _enableViewingCenterSensor |
| sensor for viewing center activation | |
| SoFieldSensor * | _sliceAlignXSensor |
| sensor for horizontal alignment | |
| SoFieldSensor * | _sliceAlignYSensor |
| sensor for vertical alignment | |
| SoFieldSensor * | _startSliceSensor |
| sensor for start slice | |
| SoFieldSensor * | _numSlicesSensor |
| sensor for numSlices | |
| SoFieldSensor * | _sliceStepSensor |
| sensor for sliceStep | |
| SoFieldSensor * | _keepSlicesInViewSensor |
| sensor for keepSlicesInView | |
| SoFieldSensor * | _sliceZoomSensor |
| sensor for slice zoom | |
| SoFieldSensor * | _sliceZoomSynchronizedSensor |
| SoFieldSensor * | _sliceOriginSensor |
| sensor for slice origin | |
| bool | _cineStep |
| flag for cinemode | |
| bool | _cineBackward |
| flag for cinemode | |
| SoAlarmSensor * | _interactiveTimer |
| single shot timer used for interactive lut update | |
| bool | _interactiveFired |
| flag if the alarm has fired | |
| bool | _interactiveHasChanged |
| flag if the something has changed | |
| bool | _editObjectsScheduled |
| flag if edit mode on extensions should be activated | |
| bool | _deleteSelectedObjectScheduled |
| flag if delete of object on extension should be activated | |
| View2DEvent | _lastPressEvent |
| stored previous event for double click events | |
| int | _grabbedSliceID |
| Index of slice at time of mouse press, is NO_SLICE_ID when no button is pressed. | |
| SliceInitFunc | _sliceInitFunc |
| external slice initialization callback | |
| void * | _sliceInitUser |
| user data for _sliceInitFunc | |
| unsigned int | _imageSerialNumber |
| last serial number of image | |
| int | _currentContext |
| the id of the current cache context (from Inventor action) | |
| int | _startSlice |
| int | _sliceStep |
| int | _numSlices |
| int | _numXSlices |
| int | _timePoint |
Static Protected Attributes | |
| static View2DFont * | _globalFont |
| static stored View2DFont that is valid in all SoView2D render contexts | |
| SoInteractionHandler * | _interactionHandler |
| Delegate that handles events for the new interaction scheme. | |
| SoInteractionProvider * | _interactionProvider |
| Delegate that provides the interaction objects from the SoView2DExtensions. | |
| class | View2DInteractionHandler |
| class | View2DInteractionProvider |
It is integrated into OpenInventor and provides event handling and drawing on slices by the use of the SoView2DExtension classes. For a detailed description of its usage, see the html documentation in MeVisLab.
Definition at line 103 of file SoView2D.h.
| SoView2D::SoView2D | ( | ) |
constructor
| virtual SoView2D::~SoView2D | ( | ) | [protected, virtual] |
destructor
| void SoView2D::adjustSliceOriginToCenter | ( | float | newSliceZoom | ) |
sets the new sliceZoom value and adjusts the sliceOrigin to zoom to the center of the ROI
| void SoView2D::cineTimerSensor | ( | ) | [protected] |
timer sensor used for cine mode
| static void SoView2D::cineTimerSensorCB | ( | void * | data, | |
| SoSensor * | a | |||
| ) | [static, protected] |
callback that calls cineTimerSensor();
| virtual void SoView2D::computeBBox | ( | SoAction * | action, | |
| SbBox3f & | box, | |||
| SbVec3f & | center | |||
| ) | [virtual] |
when rendering in 3D, calculate the bounding box of the drawn slice(s)
| int SoView2D::currentContext | ( | ) | [inline] |
get the current cache context (valid while rendering only)
Definition at line 346 of file SoView2D.h.
| void SoView2D::deleteSelectedObjectAction | ( | ) | [protected] |
delete the selected object
| static void SoView2D::deleteSelectedObjectCB | ( | void * | data, | |
| SoSensor * | a | |||
| ) | [static, protected] |
callback that calls deleteSelectedObjectAction();
| void SoView2D::editObjectsAction | ( | ) | [protected] |
switch extensions to edit mode
| static void SoView2D::editObjectsCB | ( | void * | data, | |
| SoSensor * | a | |||
| ) | [static, protected] |
callback that calls deleteSelectedObjectAction();
| static void SoView2D::enableViewingCenterChangedCB | ( | void * | data, | |
| SoSensor * | a | |||
| ) | [static, protected] |
enable / disable viewing center usage.
Can only be enabled if alignX and alignY are set to CENTER
| virtual void SoView2D::generatePrimitives | ( | SoAction * | action | ) | [virtual] |
not implemented
| SoAction* SoView2D::getAction | ( | ) | [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 312 of file SoView2D.h.
| int SoView2D::getCineEndT | ( | ) | [protected] |
get the end t for cine mode
| int SoView2D::getCineEndZ | ( | ) | [protected] |
get the end z for cine mode
| int SoView2D::getCineStartT | ( | ) | [protected] |
get the start t for cine mode
| int SoView2D::getCineStartZ | ( | ) | [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)
| ml::LUTFunction* SoView2D::getDefaultLut | ( | ) | [inline] |
get the default lut object (just a relative ramp from 0 to 1)
Definition at line 375 of file SoView2D.h.
| 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 relative 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.
| void SoView2D::getLutFromScene | ( | SoAction * | action, | |
| ml::LUTData< MLuint8 > * | data | |||
| ) | [protected] |
render the lut into the given lut data object (according to current lut mode and interactive state)
| ml::LUTFunction* SoView2D::getLutFromScene | ( | SoAction * | action | ) |
get the lut from the scene (default ramp if no lut is set)
| ml::LUTData<MLuint8>* SoView2D::getLutFromSceneInteractive | ( | SoAction * | action | ) | [protected] |
render correct lut data from scene and update interactive timer
| 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)
| SliceInitFunc SoView2D::getSliceInitFunc | ( | void | ) | [inline] |
| 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
| static View2DFont* SoView2D::globalFont | ( | int | ) | [inline, static] |
DEPRECATED: cache context id is no longer needed.
Definition at line 339 of file SoView2D.h.
References globalFont().
Referenced by globalFont().
| static View2DFont* SoView2D::globalFont | ( | ) | [static] |
get the global font used for annotations etc. (only call this within a valid GL context!)
| static View2DFont& SoView2D::globalFontRef | ( | ) | [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 void SoView2D::GLRender | ( | SoGLRenderAction * | action | ) | [virtual] |
reimplemented Inventor method which renders the slices
| virtual void SoView2D::handleEvent | ( | SoHandleEventAction * | action | ) | [virtual] |
handle the mouse and keyboard events and send them to extensions
| bool SoView2D::handleKeyboardEvent | ( | int | nKey, | |
| bool | shift, | |||
| bool | alt, | |||
| bool | ctrl | |||
| ) | [protected] |
handle standard key, returns true if handles
| void SoView2D::handleScheduledActions | ( | const SoNodeList * | primitives | ) | [protected] |
handle the actions given by deleteSelectedObject and editObjects
| void SoView2D::imageChanged | ( | ) | [protected] |
React on image changed.
| static void SoView2D::imageChangedCB | ( | void * | data, | |
| SoSensor * | a | |||
| ) | [static, protected] |
callback that calls imageChanged();
| static void SoView2D::initClass | ( | ) | [static] |
inventor runtime type system
| void SoView2D::interactiveTimerSensor | ( | ) | [protected] |
handling of low quality and highquality lut rendering
| static void SoView2D::interactiveTimerSensorCB | ( | void * | data, | |
| SoSensor * | sensor | |||
| ) | [static, protected] |
callback that calls interactiveTimerSensor();
| bool SoView2D::isDeviceCoordInViewerArea | ( | float | dx, | |
| float | dy, | |||
| SoHandleEventAction * | action | |||
| ) | [protected] |
returns if the event of the given action is located over the viewer area
| bool SoView2D::isInteractive | ( | ) | [protected] |
returns if View2D is currently interactivly changed (measured by timer)
| SbBool SoView2D::isMouseButtonPressed | ( | int | i | ) | [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
| static void SoView2D::keepSlicesInViewCB | ( | void * | data, | |
| SoSensor * | a | |||
| ) | [static, protected] |
if keepSlicesInView is activated, set startSlice to a permitted value
| void SoView2D::layoutSlices | ( | int | wx, | |
| int | wy | |||
| ) | [protected] |
layout slices inside of the window area
| static void SoView2D::minSliceZoomKeyboardCB | ( | void * | data, | |
| SoSensor * | a | |||
| ) | [static, protected] |
callback for minimum slice zoom modification that performs clamping to value range
| void SoView2D::sendMouseOverUpdateEvent | ( | const SoNodeList * | extensions, | |
| SbViewportRegion | vport | |||
| ) | [protected] |
special event for mouseover render updates
| void SoView2D::setSliceInitFunc | ( | SliceInitFunc | fn, | |
| void * | user | |||
| ) | [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 355 of file SoView2D.h.
| int SoView2D::setStartSlice | ( | int | slice, | |
| bool | keepInView = false, |
|||
| bool | noCB = false | |||
| ) | [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
| void SoView2D::sliceUnzoomAction | ( | void | ) | [protected] |
Reset slice zoom and translation.
| static void SoView2D::sliceUnzoomCB | ( | void * | data, | |
| SoSensor * | a | |||
| ) | [static, protected] |
callback that calls sliceUnzoomAction();
| void SoView2D::sliceZoomChanged | ( | ) | [protected] |
updates the member sliceZoomSynchronized
| static void SoView2D::sliceZoomChangedCB | ( | void * | data, | |
| SoSensor * | a | |||
| ) | [static, protected] |
callback witch forwards to sliceToomChanged
| void SoView2D::sliceZoomSynchronizedChanged | ( | ) | [protected] |
updates the sliceZoom and corrects the slice origin, so that the viewing center of the slice remains in thew center of the view
| static void SoView2D::sliceZoomSynchronizedChangedCB | ( | void * | data, | |
| SoSensor * | a | |||
| ) | [static, protected] |
callback witch forwards to sliceZoomSynchronizedChanged
| void SoView2D::startCineMode | ( | ) |
start the cine mode
| static void SoView2D::startCineModeCB | ( | void * | data, | |
| SoSensor * | a | |||
| ) | [static, protected] |
callback that calls startCineMode();
| void SoView2D::startInteractiveTimer | ( | ) | [protected] |
start timer for interactive mode of LUT
| void SoView2D::stopCineMode | ( | ) |
stop the cine mode
| static void SoView2D::stopCineModeCB | ( | void * | data, | |
| SoSensor * | a | |||
| ) | [static, protected] |
callback that calls stopCineMode();
| void SoView2D::stopInteractiveTimer | ( | ) | [protected] |
stop timer for interactive mode of LUT
| void SoView2D::translateInnerSlice | ( | float | x, | |
| float | y | |||
| ) |
translates the inner slice x/y pixel on the screen
| void SoView2D::updateInteractiveMode | ( | SoAction * | action | ) | [protected] |
updates the interactive mode
| void SoView2D::updateLayoutAndDraw | ( | int | originX, | |
| int | originY, | |||
| int | width, | |||
| int | height, | |||
| bool | updateLayoutOnly, | |||
| SoNodeList * | primitives = 0, |
|||
| int | sharedCacheContext = -1, |
|||
| bool | is3D = false, |
|||
| bool | reverse = false | |||
| ) | [protected] |
update layout and draw in 2D or 3D
| bool SoView2D::updateLutData | ( | ml::LUTFunction * | lut, | |
| ml::LUTData< MLuint8 > * | data, | |||
| SoSFMLImage * | img | |||
| ) |
renders the lut data from the lut function according to the image data and the interactive state of the SoView2D (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::updateViewingCenter | ( | ) | [protected] |
update viewing center from sliceOrigin and sliceNumber
| static void SoView2D::updateViewingCenterCB | ( | void * | data, | |
| SoSensor * | a | |||
| ) | [static, protected] |
callback which forwards to updateViewingCenter()
| void SoView2D::viewingCenterChanged | ( | ) | [protected] |
sets slice origins of all viewers according to current viewing center if synchronizePanning is on
| static void SoView2D::viewingCenterChangedCB | ( | void * | data, | |
| SoSensor * | a | |||
| ) | [static, protected] |
callback which forwards to viewingCenterChanged()
friend class View2DInteractionHandler [friend] |
Definition at line 626 of file SoView2D.h.
friend class View2DInteractionProvider [friend] |
Definition at line 627 of file SoView2D.h.
SoAction* SoView2D::_action [protected] |
bool SoView2D::_cineBackward [protected] |
bool SoView2D::_cineStep [protected] |
SoTimerSensor* SoView2D::_cineTimer [protected] |
int SoView2D::_currentContext [protected] |
the id of the current cache context (from Inventor action)
Definition at line 623 of file SoView2D.h.
SoFieldSensor* SoView2D::_deleteSelectedObject [protected] |
bool SoView2D::_deleteSelectedObjectScheduled [protected] |
flag if delete of object on extension should be activated
Definition at line 595 of file SoView2D.h.
SoFieldSensor* SoView2D::_editObjects [protected] |
bool SoView2D::_editObjectsScheduled [protected] |
SoFieldSensor* SoView2D::_enableViewingCenterSensor [protected] |
View2DFont* SoView2D::_globalFont [static, protected] |
static stored View2DFont that is valid in all SoView2D render contexts
Definition at line 621 of file SoView2D.h.
int SoView2D::_grabbedSliceID [protected] |
Index of slice at time of mouse press, is NO_SLICE_ID when no button is pressed.
This interprets mouse positions relative to the grabbed slice.
Definition at line 610 of file SoView2D.h.
SoFieldSensor* SoView2D::_imageSensor [protected] |
unsigned int SoView2D::_imageSerialNumber [protected] |
SoInteractionHandler* SoView2D::_interactionHandler [protected] |
Delegate that handles events for the new interaction scheme.
Definition at line 630 of file SoView2D.h.
SoInteractionProvider* SoView2D::_interactionProvider [protected] |
Delegate that provides the interaction objects from the SoView2DExtensions.
Definition at line 632 of file SoView2D.h.
bool SoView2D::_interactiveFired [protected] |
bool SoView2D::_interactiveHasChanged [protected] |
SoAlarmSensor* SoView2D::_interactiveTimer [protected] |
SoFieldSensor* SoView2D::_keepSlicesInViewSensor [protected] |
View2DEvent SoView2D::_lastPressEvent [protected] |
ml::LUTFunction* SoView2D::_localLut [protected] |
an internal lut which is used if there is no lut in the scene
Definition at line 529 of file SoView2D.h.
ml::LUTData<MLuint8>* SoView2D::_lutData [protected] |
SoFieldSensor* SoView2D::_minSliceZoomKeyboardSensor [protected] |
SbBool SoView2D::_mouseButton[3] [protected] |
state of the mouse buttons (kept up-to-date with the handleEvent method)
Definition at line 534 of file SoView2D.h.
int SoView2D::_numSlices [protected] |
Definition at line 603 of file SoView2D.h.
SoFieldSensor* SoView2D::_numSlicesSensor [protected] |
int SoView2D::_numXSlices [protected] |
Definition at line 604 of file SoView2D.h.
SoFieldSensor* SoView2D::_sliceAlignXSensor [protected] |
SoFieldSensor* SoView2D::_sliceAlignYSensor [protected] |
SliceInitFunc SoView2D::_sliceInitFunc [protected] |
void* SoView2D::_sliceInitUser [protected] |
View2DSliceList* SoView2D::_sliceList [protected] |
the internal slice list which stores and handles rendered slices
Definition at line 527 of file SoView2D.h.
SoFieldSensor* SoView2D::_sliceOriginSensor [protected] |
int SoView2D::_sliceStep [protected] |
Definition at line 602 of file SoView2D.h.
SoFieldSensor* SoView2D::_sliceStepSensor [protected] |
SoFieldSensor* SoView2D::_sliceUnzoom [protected] |
SoFieldSensor* SoView2D::_sliceZoomSensor [protected] |
SoFieldSensor* SoView2D::_sliceZoomSynchronizedSensor [protected] |
Definition at line 575 of file SoView2D.h.
SoFieldSensor* SoView2D::_startCine [protected] |
int SoView2D::_startSlice [protected] |
Definition at line 601 of file SoView2D.h.
SoFieldSensor* SoView2D::_startSliceSensor [protected] |
SoFieldSensor* SoView2D::_stopCine [protected] |
int SoView2D::_timePoint [protected] |
Definition at line 605 of file SoView2D.h.
SoFieldSensor* SoView2D::_viewingCenterSensor [protected] |
| SoSFFloat SoView2D::alphaFactor |
| SoSFBool SoView2D::applyLut |
select if the View2d should apply the scene LUT to the slice data (default is true)
Definition at line 132 of file SoView2D.h.
| SoSFFloat SoView2D::backgroundAlphaFactor |
| SoSFColor SoView2D::backgroundColor |
| SoSFColor SoView2D::baseColor |
| SoSFEnum SoView2D::blendMode |
| SoSFEnum SoView2D::cacheMode |
| 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 261 of file SoView2D.h.
| SoSFInt32 SoView2D::cineCenterT |
| SoSFInt32 SoView2D::cineCenterZ |
| SoSFEnum SoView2D::cineDirection |
| SoSFBool SoView2D::cineFullRangeT |
| SoSFBool SoView2D::cineFullRangeZ |
| SoSFInt32 SoView2D::cineIntervalT |
| SoSFInt32 SoView2D::cineIntervalZ |
| SoSFEnum SoView2D::cineMode |
| SoSFEnum SoView2D::cineRepeat |
| SoSFFloat SoView2D::cineSpeed |
speed of cine mode (in seconds), minimum cine speed is fixed to one repaint per image
Definition at line 252 of file SoView2D.h.
| SoSFTrigger SoView2D::deleteSelected |
| SoSFBool SoView2D::deletingEnabled |
| SoSFFloat SoView2D::devicePixelSize |
| SoSFBool SoView2D::drawImageData |
if set to false, only the extensions of the SoView2D are drawn, not the images
Definition at line 114 of file SoView2D.h.
| SoSFTrigger SoView2D::edit |
| SoSFBool SoView2D::enableViewingCenter |
If enabled, the viewing center is activated for reading and writing.
Definition at line 201 of file SoView2D.h.
| SoSFBool SoView2D::enableZBuffer |
| SoSFBool SoView2D::enableZWrite |
| SoSFEnum SoView2D::filterMode |
| SoSFBool SoView2D::handle2DEvents |
| SoSFBool SoView2D::handle3DEvents |
| SoSFBool SoView2D::invertKeyPanningDirections |
| 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 146 of file SoView2D.h.
| SoSFVec2f SoView2D::lowerLeft |
restrict the rendering to a subpart of the viewer, in normalized coordinated
Definition at line 166 of file SoView2D.h.
| SoSFEnum SoView2D::lutMode |
| SoSFVec2f SoView2D::margin |
| SoSFInt32 SoView2D::maxSlice |
the maximum slice number, read from the image, used to restrict startSlice
Definition at line 143 of file SoView2D.h.
| SoSFInt32 SoView2D::maxTimePoint |
the maximum timepoint, read from the image, used to restrict timePoint
Definition at line 150 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 204 of file SoView2D.h.
| SoSFInt32 SoView2D::numSlices |
| SoSFInt32 SoView2D::numXSlices |
| SoSFBool SoView2D::overrideAspectRatio |
set if the aspect ratio should be overwritten by user aspect ratio
Definition at line 278 of file SoView2D.h.
| SoSFFloat SoView2D::overrideAspectRatioValue |
user defined aspect ratio, is only used if overrideAspectRatio is set to true
Definition at line 280 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 183 of file SoView2D.h.
| SoSFPlane SoView2D::plane |
| SoSFInt32 SoView2D::slab |
| SoSFEnum SoView2D::sliceAlignX |
align the image inside of the slice if there is space left, default is VIEW2D_ALIGN_CENTER
Definition at line 264 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 266 of file SoView2D.h.
| SoSFVec2f SoView2D::sliceOrigin |
the internal origin of the slice in voxels (for shifting inside of the view)
Definition at line 189 of file SoView2D.h.
| SoSFInt32 SoView2D::sliceStep |
| SoSFFloat SoView2D::sliceZoom |
the internal zoom of the slice (for zooming inside if the view)
Definition at line 191 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 193 of file SoView2D.h.
| SoSFBool SoView2D::snapToCenter |
if set, the viewer snaps to center of image on each input image change
Definition at line 171 of file SoView2D.h.
| SoSFVec2f SoView2D::spacing |
| SoSFBool SoView2D::standardKeys |
set if the keys work anywhere or only if pressed with mouse inside of a slice (needed for SoOrthoView2D)
Definition at line 178 of file SoView2D.h.
| SoSFBool SoView2D::standardKeysNumbers |
enable number keys 0-9, depends on standardKeys being enabled
Definition at line 176 of file SoView2D.h.
| SoSFTrigger SoView2D::startCine |
| SoSFInt32 SoView2D::startSlice |
| SoSFString SoView2D::status |
| SoSFTrigger SoView2D::stopCine |
| SoSFInt32 SoView2D::timePoint |
| SoSFTrigger SoView2D::unzoom |
| SoSFBool SoView2D::unzoomOnImageChange |
If enabled, the module unzooms automatically on an input image change.
Definition at line 154 of file SoView2D.h.
| SoSFVec2f SoView2D::upperRight |
restrict the rendering to a subpart of the viewer, in normalized coordinated
Definition at line 168 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 130 of file SoView2D.h.
| SoSFVec3f SoView2D::viewingCenter |
| SoSFVec2f SoView2D::zoomCenter |
| SoSFEnum SoView2D::zoomMode |
| SoSFFloat SoView2D::zoomModeParameter |
zoom mode parameter, depends on zoomMode what its value means
Definition at line 272 of file SoView2D.h.
1.5.8