MeVisLab Toolbox Reference
SoView2D.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2007, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 
15 
16 #pragma once
17 
18 #include "SoSFMLImage.h"
19 #include "SoView2DSystem.h"
20 #include "SoView2DExtension.h"
21 
22 #include <Inventor/fields/SoFields.h>
23 #include <Inventor/nodes/SoSubNode.h>
24 #include <Inventor/nodes/SoShape.h>
25 #include <Inventor/sensors/SoTimerSensor.h>
26 #include <Inventor/sensors/SoAlarmSensor.h>
27 #include <Inventor/sensors/SoFieldSensor.h>
28 #include <Inventor/sensors/SoNodeSensor.h>
29 #include <Inventor/nodes/SoSubNode.h>
30 #include <Inventor/elements/SoCacheElement.h>
31 
32 #include <SoInteractionProvider.h>
33 
34 class View2DSliceList;
35 class View2DCine;
36 class View2DFont;
37 class View2DLut;
38 
40 
41 ML_START_NAMESPACE
42 
43  class LUTFunction;
44  template <typename T> class LUTData;
45 
46 ML_END_NAMESPACE
47 
49 typedef int (*SliceInitFunc) (const SoView2D *view2D, SoSFMLImage *image, void *user);
50 
51 
52 //=============================================================
54 
60 //=============================================================
61 class SOVIEW2D_API SoView2D : public SoShape, public SoInteractionOwner
62 {
63 
64  SO_NODE_HEADER(SoView2D);
65 
66 public:
68 
70  SoSFString instanceName;
71 
74 
77 
79  SoSFBool drawImageData;
80 
82  SoSFString viewerId;
83 
85  SoSFEnum blendMode;
87  SoSFEnum filterMode;
89  SoSFEnum cacheMode;
91  SoSFFloat alphaFactor;
93  SoSFColor baseColor;
96  SoSFBool useShaders;
98  SoSFBool applyLut;
100  SoSFEnum lutPrecision;
101 
103  SoSFInt32 startSlice;
105  SoSFInt32 sliceStep;
107  SoSFInt32 numSlices;
109  SoSFInt32 numXSlices;
111  SoSFInt32 maxSlice;
116  SoSFInt32 timePoint;
118  SoSFInt32 maxTimePoint;
120  SoSFInt32 slab;
123 
125  SoSFTrigger forceImageUpdate;
126 
128  SoSFVec2f margin;
130  SoSFVec2f spacing;
131 
133  SoSFPlane plane;
134 
136  SoSFVec2f lowerLeft;
138  SoSFVec2f upperRight;
139 
141  SoSFBool snapToCenter;
142 
144  SoSFBool standardKeys;
149 
154 
157 
159  SoSFVec2f sliceOrigin;
161  SoSFFloat sliceZoom;
165  SoSFVec2f zoomCenter;
166 
168  SoSFVec3f viewingCenter;
169 
172 
175 
177  SoSFTrigger unzoom;
178 
180  SoSFEnum sliceAlignX;
182  SoSFEnum sliceAlignY;
183 
184 
186  SoSFEnum zoomMode;
188  SoSFFloat zoomModeParameter;
189 
196 
201 
203  SoSFColor backgroundColor;
206 
209 
211  SoSFBool handle2DEvents;
212 
214  SoSFBool handle3DEvents;
215 
218 
220  SoSFBool enableZBuffer;
221 
223  SoSFBool enableZWrite;
224 
226  SoSFFloat devicePixelSize;
227 
229 
231 
233  SoSFTrigger startCine;
235  SoSFTrigger stopCine;
237  SoSFInt32 cineCenterT;
239  SoSFInt32 cineIntervalT;
241  SoSFInt32 cineCenterZ;
243  SoSFInt32 cineIntervalZ;
245  SoSFEnum cineMode;
247  SoSFEnum cineDirection;
249  SoSFEnum cineRepeat;
251  SoSFFloat cineSpeed;
252 
254  SoSFBool cineFullRangeZ;
256  SoSFBool cineFullRangeT;
257 
260  SoSFBool cineAlwaysReset;
261 
263  SoSFBool cineModeActive;
264 
266 
267 
269 
271  SoSFTrigger deleteSelected;
273  SoSFTrigger edit;
274 
276  SoSFString status;
277 
279  SoSFString seriesInstanceUID;
282 
284  SoSFBool deletingEnabled;
285 
287 
289  SoSFTrigger renderingDone;
290 
292  static void initClass();
293 
296 
298  SbString getViewerId() const { return viewerId.getValue(); }
301 
303  SbVec2f getSliceSize();
304 
307  SoAction *getAction() { return _action; }
308 
310  void GLRender(SoGLRenderAction *action) override;
311 
314 
316  void updateLayout(int viewportX, int viewportY, int viewportWidth, int viewportHeight, bool is3D = false);
317 
319  void handleEvent(SoHandleEventAction *action) override;
321  bool handleKeyboardEvent(int nKey, bool shift, bool alt, bool ctrl);
322 
324  void computeBBox(SoAction * action, SbBox3f &box, SbVec3f &center) override;
326  void generatePrimitives(SoAction *action) override;
328  void rayPick(SoRayPickAction * action) override;
329 
337  bool getEventLocation(SoHandleEventAction* action,
338  bool& hit, float& dx, float& dy, SbVec3f& voxelHit,
339  int& sliceID);
340 
341 
345 
347  static View2DFont* globalFont(int /*cacheContext*/) { return globalFont(); }
348 
352 
360  void setSliceInitFunc (SliceInitFunc fn, void *user)
361  { _sliceInitFunc = fn; _sliceInitUser = user; }
362 
364  SliceInitFunc getSliceInitFunc (void) { return _sliceInitFunc; }
365 
368 
371  void adjustSliceOriginToCenter(float newSliceZoom);
372 
374  void translateInnerSlice(float x, float y);
375 
377  void getStatusString(SbString& string);
378 
380  ml::LUTFunction* getDefaultLut() { return _localLut; }
381 
383  ml::LUTFunction* getLutFromScene(SoAction* action);
384 
390 
393 
395  void stopCineMode();
396 
399  SbVec2f getSingleSliceSize (int windowX, int windowY);
400 
403 
406  static std::string getDICOMTagValue(SoSFMLImage* image, const std::string& dicomTagName);
407 
410 
411 protected:
413  ~SoView2D() override;
414 
416 
418  void objRef() override { ref(); }
419  void objUnref() override { unref(); }
420 
422  std::string getID() const override;
424 
428 
429  void forceImageUpdateChangedCB(SoField* field = nullptr);
430 
434  SbBool isMouseButtonPressed(int i);
435 
438  bool isDeviceCoordInViewerArea (float dx, float dy, const SbVec2s& viewportSize) const;
439 
441  void imageChangedCB(SoField*);
443  void imageChanged();
444 
446  void sliceUnzoomCB(SoField*);
448  void sliceUnzoomAction (void);
449 
454 
458 
460  void viewingCenterChangedCB(SoField*);
464 
465  void updateSliceRepresentingPlane(const SbVec3f& worldCenter);
466 
468  void sliceZoomChangedCB(SoField*);
471 
476 
478  void keepSlicesInViewCB (SoField*);
479 
483  int setStartSlice (int slice, bool keepInView = false, bool noCB = false);
484 
486  void minSliceZoomKeyboardCB(SoField*);
487 
489  void startCineModeCB(SoField*);
491  void stopCineModeCB(SoField*);
492 
494  void cineParametersChangedCB(SoField*);
497 
499  void deleteSelectedObjectCB(SoField*);
503  void editObjectsCB(SoField*);
506 
508  void handleScheduledActions(const SoNodeList* primitives);
509 
511  void getLutFromScene(SoAction* action, View2DLut* data);
512 
514  void layoutSlices(int wx, int wy);
515 
517  void updateLayoutAndDraw(int originX, int originY, int width, int height, bool updateLayoutOnly,
518  SoNodeList* primitives=nullptr,int sharedCacheContext=-1, bool is3D = false, bool reverse = false);
519 
521  SoAction *_action;
522 
529 
536 
538 
540  SbBool _mouseButton[3];
541 
543  SoFieldSensor *_viewingCenterSensor;
544 
546  SoFieldSensor *_startSliceSensor;
547 
549 
551  SoFieldSensor *_sliceOriginSensor;
552 
557 
559  bool _dragging;
562 
567 
569  unsigned int _imageSerialNumber;
570 
574 
580 
585 
588 };
View2DLutPrecision
allows to set the precision of the LUT
#define SOVIEW2D_API
File to resolve system dependencies in View2D library.
int(* SliceInitFunc)(const SoView2D *view2D, SoSFMLImage *image, void *user)
Callback function type for external specification of initial slice position.
Definition: SoView2D.h:49
SoInteractionHandler is a mix-in class for instances of SoNode to handle the interactions it provides...
SoInteractionOwner is a mix-in class for instances of SoNode that should have interaction objects.
SoInteractionProvider is an abstract interface class that provides interactions to the SoInteractionC...
The SoSFMLImage field is the interface used by Inventor Nodes to access image data (in the current im...
Definition: SoSFMLImage.h:70
SoView2D is a 2D viewer for image data.
Definition: SoView2D.h:62
View2DLut * _lutData
the currently allocated lut data
Definition: SoView2D.h:528
SoSFTrigger renderingDone
output field is triggered from the inside when all rendering is done.
Definition: SoView2D.h:289
void updateViewingCenterAndPlane()
update viewing center from sliceOrigin and sliceNumber
SoSFVec2f sliceOrigin
the internal origin of the slice in voxels (for shifting inside of the view)
Definition: SoView2D.h:159
SbBool isMouseButtonPressed(int i)
returns if given mousebutton (0-2) is currently pressed this is handles by the View2D,...
SoAction * _action
pointer to current action
Definition: SoView2D.h:521
SliceInitFunc getSliceInitFunc(void)
Get slice position initialization callback.
Definition: SoView2D.h:364
SoSFEnum blendMode
blend mode for rendering
Definition: SoView2D.h:85
void stopCineMode()
stop the cine mode
SoSFBool clipBackgroundToImage
clip background to image rect
Definition: SoView2D.h:208
SoSFBool deletingEnabled
enable/disable delete-events for SoView2D-Extensions
Definition: SoView2D.h:284
SoSFFloat minSliceZoomKeyboard
minimum slice zoom for keyboard modifications (always clamped by MIN_MIN_SLICE_ZOOM and 1....
Definition: SoView2D.h:174
SoSFVec2f upperRight
restrict the rendering to a subpart of the viewer, in normalized coordinated
Definition: SoView2D.h:138
void minSliceZoomKeyboardCB(SoField *)
callback for minimum slice zoom modification that performs clamping to value range
SoSFBool passHandledFlagToInventor
Set this true if following inventor nodes should not react to events that have been handled by a SoVi...
Definition: SoView2D.h:153
SoFieldSensor * _viewingCenterSensor
sensor for start slice
Definition: SoView2D.h:543
SoSFFloat cineSpeed
speed of cine mode (in seconds), minimum cine speed is fixed to one repaint per image
Definition: SoView2D.h:251
SbVec2f getSliceSize()
get slice size x/y in millimeters (used by SoOrthoView2D)
SoSFBool handle3DEvents
handle events when rendering in 3D
Definition: SoView2D.h:214
SoSFEnum lutPrecision
defines the precision of the LUT
Definition: SoView2D.h:100
SoSFEnum cineMode
mode of the Cinemode (Z,T,ZT)
Definition: SoView2D.h:245
SoSFString viewerId
id string, needs to be unique in a network if used
Definition: SoView2D.h:82
SoSFBool cineModeActive
read-only flag indicating whether cine mode is active or not
Definition: SoView2D.h:263
SoSFInt32 numSlices
number of slices that are rendered
Definition: SoView2D.h:107
SoSFInt32 cineCenterT
center of timepoint cine
Definition: SoView2D.h:237
SoSFInt32 sliceStep
step to next rendered slice
Definition: SoView2D.h:105
bool _mouseOverViewer
remember if the mouse cursor is over the viewer area
Definition: SoView2D.h:561
SoSFTrigger startCine
Cinemode fields.
Definition: SoView2D.h:233
void updateLayoutAndDraw(int originX, int originY, int width, int height, bool updateLayoutOnly, SoNodeList *primitives=nullptr, int sharedCacheContext=-1, bool is3D=false, bool reverse=false)
update layout and draw in 2D or 3D
void viewingCenterChanged()
sets slice origins of all viewers according to current viewing center if synchronizePanning is on
void editObjectsAction()
switch extensions to edit mode
void generatePrimitives(SoAction *action) override
used for 3D picking
SoSFBool handle2DEvents
handle events when rendering in 2D
Definition: SoView2D.h:211
int getMaxStartSlice()
returns the highest sensible value for startSlice
SoSFInt32 cineCenterZ
center of z cine
Definition: SoView2D.h:241
SoSFInt32 timePoint
the timepoint the viewers is currently showing
Definition: SoView2D.h:116
SoSFPlane plane
plane representing the slice in world coordinates
Definition: SoView2D.h:133
SoSFFloat sliceZoom
the internal zoom of the slice (for zooming inside if the view)
Definition: SoView2D.h:161
void updateViewingCenterAndPlaneCB(SoField *)
callback which forwards to updateViewingCenterAndPlane()
SoSFString frameOfReferenceUID
the DICOM frameOfReferenceUID of the image currently displayed.
Definition: SoView2D.h:281
void handleEvent(SoHandleEventAction *action) override
handle the mouse and keyboard events and send them to extensions
int getCurrentCenterSlice()
returns the central of all currently visible slices (e.g. startSlice, if numSlices is 1)
SoSFFloat zoomModeParameter
zoom mode parameter, depends on zoomMode what its value means
Definition: SoView2D.h:188
void sliceUnzoomAction(void)
Reset slice zoom and translation.
bool _dragging
remember if we are during a drag operation
Definition: SoView2D.h:559
SoSFBool enableZBuffer
use Z buffer in 3D rendering
Definition: SoView2D.h:220
View2DSliceList * getSliceList()
returns the slicelist that is used to manage the slices
SoSFVec2f lowerLeft
restrict the rendering to a subpart of the viewer, in normalized coordinated
Definition: SoView2D.h:136
SoSFBool applyLut
select if the View2d should apply the scene LUT to the slice data (default is true)
Definition: SoView2D.h:98
void updateSliceListOnImageChange()
update the slice list if the image has changed
void updateKeyboardActionEnabledStateCB(SoField *)
update enabled state of the keyboard actions
SoSFBool standardKeysNumbers
enable number keys 0-9, depends on standardKeys being enabled
Definition: SoView2D.h:146
SoSFVec2f spacing
spacing between slices
Definition: SoView2D.h:130
SoSFEnum cineRepeat
flag to indicated if loop or ping-pong is used
Definition: SoView2D.h:249
void handleScheduledActions(const SoNodeList *primitives)
handle the actions given by deleteSelectedObject and editObjects
SoSFBool enableZWrite
write Z buffer in 3D rendering
Definition: SoView2D.h:223
SoFieldSensor * _startSliceSensor
sensor for start slice
Definition: SoView2D.h:546
SoSFBool enableViewingCenter
If enabled, the viewing center is activated for reading and writing.
Definition: SoView2D.h:171
SoSFInt32 cineIntervalT
interval of timepoint cine
Definition: SoView2D.h:239
void startCineModeCB(SoField *)
callback that calls startCineMode();
void adjustSliceOriginToCenter(float newSliceZoom)
sets the new sliceZoom value and adjusts the sliceOrigin to zoom to the center of the ROI
bool _editObjectsScheduled
flag if edit mode on extensions should be activated
Definition: SoView2D.h:554
void objRef() override
Overriding SoInteractionProvider methods:
Definition: SoView2D.h:418
void * _sliceInitUser
user data for _sliceInitFunc
Definition: SoView2D.h:566
double _currentLUTImageMax
Definition: SoView2D.h:533
bool _useHighColorDepth
Definition: SoView2D.h:586
void imageChangedCB(SoField *)
callback that calls imageChanged();
void getLutFromScene(SoAction *action, View2DLut *data)
render the lut into the given lut data object
void updateSliceRepresentingPlane(const SbVec3f &worldCenter)
SoSFInt32 slab
the slab that is rendered (1=only one slice)
Definition: SoView2D.h:120
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 n...
std::string getID() const override
Returns the id string for identifying the provider (and its actions)
SoFieldSensor * _sliceOriginSensor
sensor for slice origin
Definition: SoView2D.h:551
void stopCineModeCB(SoField *)
callback that calls stopCineMode();
View2DSliceList * _sliceList
the internal slice list which stores and handles rendered slices
Definition: SoView2D.h:524
SoSFFloat devicePixelSize
size of a pixel in mm when rendering in 3D
Definition: SoView2D.h:226
SoInteractionHandler * _interactionHandler
Delegate that handles events for the new interaction scheme.
Definition: SoView2D.h:576
void deleteSelectedObjectCB(SoField *)
callback that calls deleteSelectedObjectAction();
SoSFEnum sliceAlignY
align the image inside of the slice if there is space left, default is VIEW2D_ALIGN_CENTER
Definition: SoView2D.h:182
void deleteSelectedObjectAction()
delete the selected object
bool _deleteSelectedObjectScheduled
flag if delete of object on extension should be activated
Definition: SoView2D.h:556
void translateInnerSlice(float x, float y)
translates the inner slice x/y pixel on the screen
SoSFInt32 maxSlice
the maximum slice number, read from the image, used to restrict startSlice
Definition: SoView2D.h:111
SoSFString instanceName
Fields.
Definition: SoView2D.h:70
void editObjectsCB(SoField *)
callback that calls deleteSelectedObjectAction();
bool isDeviceCoordInViewerArea(float dx, float dy, const SbVec2s &viewportSize) const
Returns if the event of the given action is located over the viewer area for a given viewportSize The...
SoSFInt32 numXSlices
number of slices that are rendered in X
Definition: SoView2D.h:109
SoSFBool reverseExtensionDrawingOrder
Reverse drawing order of extensions.
Definition: SoView2D.h:156
SoSFString seriesInstanceUID
the DICOM seriesInstanceUID of the image currently displayed
Definition: SoView2D.h:279
SoSFBool cineFullRangeZ
flag if the full z range or the z interval is used
Definition: SoView2D.h:254
void sliceUnzoomCB(SoField *)
callback that calls sliceUnzoomAction();
SoSFString interactionProviderID
This field overrides the instanceName as providerID if specified.
Definition: SoView2D.h:73
SoSFBool invertKeyPanningDirections
invert panning by keyboard
Definition: SoView2D.h:191
unsigned int _imageSerialNumber
last serial number of image
Definition: SoView2D.h:569
int setStartSlice(int slice, bool keepInView=false, bool noCB=false)
set start slice, but obey possible restrictions (returns effective value) if keepInView is set,...
void updateKeyboardActionEnabledState()
void sliceZoomChangedCB(SoField *)
callback which forwards to sliceToomChanged
SoSFBool drawImageData
if set to false, only the extensions of the SoView2D are drawn, not the images
Definition: SoView2D.h:79
MLDataType _currentLUTImageDataType
current LUT settings
Definition: SoView2D.h:531
SoSFVec3f viewingCenter
world position of the current center of the viewer
Definition: SoView2D.h:168
SliceInitFunc _sliceInitFunc
external slice initialization callback
Definition: SoView2D.h:564
ml::LUTFunction * getDefaultLut()
get the default lut object (just a relative ramp from 0 to 1)
Definition: SoView2D.h:380
void keepSlicesInViewCB(SoField *)
if keepSlicesInView is activated, set startSlice to a permitted value
SoSFBool useManagedInteraction
prefer to use managed interaction instead of classical event handling if a SoView2DExtension provides...
Definition: SoView2D.h:217
SoSFFloat overrideAspectRatioValue
user defined aspect ratio, is only used if overrideAspectRatio is set to true
Definition: SoView2D.h:200
static View2DFont & globalFontRef()
Always return an existing font singleton as from globalFont(); used for annotations etc.
void enableViewingCenterChangedCB(SoField *)
enable / disable viewing center usage.
SoSFBool cineFullRangeT
flag if the full time range or the time interval is used
Definition: SoView2D.h:256
ml::LUTFunction * getLutFromScene(SoAction *action)
get the lut from the scene (default ramp if no lut is set)
SoSFBool overrideAspectRatio
set if the aspect ratio should be overwritten by user aspect ratio
Definition: SoView2D.h:198
SoSFVec2f margin
margin to the border of the viewer
Definition: SoView2D.h:128
SoSFColor baseColor
base color in which the slices are drawn
Definition: SoView2D.h:93
SoSFMLImage image
input ML image
Definition: SoView2D.h:76
SoSFTrigger edit
set the extensions into edit mode
Definition: SoView2D.h:273
SoFieldSensor * _sliceZoomSynchronizedSensor
Definition: SoView2D.h:548
void forceImageUpdateChangedCB(SoField *field=nullptr)
void computeBBox(SoAction *action, SbBox3f &box, SbVec3f &center) override
when rendering in 3D, calculate the bounding box of the drawn slice(s)
static View2DFont * globalFont()
get the global font used for annotations etc.
SoSFEnum zoomMode
zoom mode that defines mapping to the viewer area
Definition: SoView2D.h:186
void getStatusString(SbString &string)
access status string
SoSFInt32 cineIntervalZ
interval of z cine
Definition: SoView2D.h:243
SoSFFloat backgroundAlphaFactor
background alpha factor (0=background invisible)
Definition: SoView2D.h:205
SoSFEnum cineDirection
direction of Cinemode
Definition: SoView2D.h:247
void viewingCenterChangedCB(SoField *)
callback which forwards to viewingCenterChanged()
void setSliceInitFunc(SliceInitFunc fn, void *user)
Set slice position initialization callback The callback function set by this method is called when th...
Definition: SoView2D.h:360
SoSFBool standardKeys
enable the keypad and 0-9 keys
Definition: SoView2D.h:144
bool handleKeyboardEvent(int nKey, bool shift, bool alt, bool ctrl)
handle standard key, returns true if handles
void sliceZoomSynchronizedChanged()
updates the sliceZoom and corrects the slice origin, so that the viewing center of the slice remains ...
SoSFString status
status of current extension
Definition: SoView2D.h:276
SoSFBool wrapAroundTimePointScrolling
wrap-around timepoint scrolling
Definition: SoView2D.h:195
SoSFBool keepSlicesInView
if this is set, the slices are prevented from leaving the visible area.
Definition: SoView2D.h:114
bool updateLutData(ml::LUTFunction *lut, View2DLut *data, SoSFMLImage *img, View2DLutPrecision precision)
renders the lut data from the lut function according to the image data (lut may be NULL,...
SoAction * getAction()
get pointer to current action.
Definition: SoView2D.h:307
void cineParametersChangedCB(SoField *)
callback that calls updateCineParameters()
SoInteractionProvider * _interactionProvider
Delegate that provides the interaction objects from the SoView2DExtensions.
Definition: SoView2D.h:578
SoSFEnum filterMode
filter mode for rendering
Definition: SoView2D.h:87
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 acr...
static SoInteractionProvider * getInteractionProvider(SoNode *node)
static method to register with SoInteractionProvider for this class
SoSFBool cineAlwaysReset
Always reset to start slice/time point and forward direction on start press (start with current posit...
Definition: SoView2D.h:260
SoSFFloat alphaFactor
alpha factor for rendering
Definition: SoView2D.h:91
SoSFInt32 maxTimePoint
the maximum timepoint, read from the image, used to restrict timePoint
Definition: SoView2D.h:118
void updateHighColorDepthFlag()
Checks if the current GL context has a bigger bit depth than 8 per channel and if so upgrades the fla...
void imageChanged()
React on image changed.
static void initClass()
inventor runtime type system
SoSFFloat sliceZoomSynchronized
same as sliceZoom, except that changes to this member update the slice origin so that the viewing cen...
Definition: SoView2D.h:163
void rayPick(SoRayPickAction *action) override
implements 3D picking
double _currentLUTImageMin
Definition: SoView2D.h:532
void updateLayout(int viewportX, int viewportY, int viewportWidth, int viewportHeight, bool is3D=false)
Update layout for given viewport size.
SoSFTrigger deleteSelected
Interaction fields for extensions.
Definition: SoView2D.h:271
int _currentLUTImageNumChannels
Definition: SoView2D.h:534
bool _allowHighColorDepthUpgrade
Definition: SoView2D.h:587
SoSFTrigger unzoom
sets sliceOrigin to (0,0) and sliceZoom to 1.0
Definition: SoView2D.h:177
void layoutSlices(int wx, int wy)
layout slices inside of the window area
SoSFEnum sliceAlignX
align the image inside of the slice if there is space left, default is VIEW2D_ALIGN_CENTER
Definition: SoView2D.h:180
SoSFBool useShaders
if enabled, the SoView2D tries to emulate a hardware lut by using hardware shaders,...
Definition: SoView2D.h:96
SoSFBool snapToCenter
if set, the viewer snaps to center of image on each input image change
Definition: SoView2D.h:141
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...
SoSFBool standardKeysNeedValidPosition
set if the keys work anywhere or only if pressed with mouse inside of a slice (needed for SoOrthoView...
Definition: SoView2D.h:148
SoSFBool invertKeySlicingDirection
invert slicing by keyboard
Definition: SoView2D.h:193
SoSFTrigger stopCine
stop the cine mode
Definition: SoView2D.h:235
SoSFTrigger forceImageUpdate
Forces an immediate update of all fields that depend on the input image.
Definition: SoView2D.h:125
void objUnref() override
Definition: SoView2D.h:419
SoView2D()
constructor
void GLRender(SoGLRenderAction *action) override
reimplemented Inventor method which renders the slices
void startCineMode()
start the cine mode
~SoView2D() override
destructor
SoSFColor backgroundColor
fill slice background with given color
Definition: SoView2D.h:203
SoSFBool unzoomOnImageChange
If enabled, the module unzooms automatically on an input image change.
Definition: SoView2D.h:122
void sliceZoomSynchronizedChangedCB(SoField *)
callback which forwards to sliceZoomSynchronizedChanged
void sliceZoomChanged()
updates the member sliceZoomSynchronized
SoSFVec2f zoomCenter
center of zoom/scale operation in normalized coordinates
Definition: SoView2D.h:165
View2DCine * _cine
Definition: SoView2D.h:537
void updateCineParameters()
updates the cine parameters to the current field values
static View2DFont * globalFont(int)
DEPRECATED: cache context id is no longer needed.
Definition: SoView2D.h:347
SoSFEnum cacheMode
caching of slices
Definition: SoView2D.h:89
static ml::LUTFunction * _localLut
an internal lut which is used if there is no lut in the scene
Definition: SoView2D.h:526
SbString getViewerId() const
returns the viewer id of this viewer
Definition: SoView2D.h:298
SoSFInt32 startSlice
current start slice
Definition: SoView2D.h:103
Abstract GL font drawing using FTGL.
Definition: View2DFont.h:30
View2DInteractionHandler is derived from SoInteractionHandler mainly to provide additional SoView2D i...
The View2DInteractionProvider extracts the interactions from the SoView2DExtensions.
A small wrapper class for the LUT data.
Definition: View2DLut.h:23
a list that holds all View2DSlice objects (lazily created) of a SoView2D
Common base class for lookup tables.
Definition: mlLUTFunction.h:55
MLint32 MLDataType
MLDataType.
Definition: mlTypeDefs.h:684