MeVisLab Toolbox Reference
SoSlabRenderingElement.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2010, 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 #ifndef SO_SLAB_RENDERING_ELEMENT_H
14 #define SO_SLAB_RENDERING_ELEMENT_H
15 
16 
17 #include "SoUtilsSystem.h"
18 
19 #include <Inventor/elements/SoReplacedElement.h>
20 
25 };
26 
27 
30 {
31  public:
32 
33  bool enabled;
34 
35  SbPlane frontPlane;
36  SbPlane backPlane;
37 
40 
42 
44  enabled(false), samplingMode(EXACT_SLICE_SAMPLING)
45  {
46  }
47 };
48 
49 
51 class SOUTILS_EXPORT SoSlabRenderingElement : public SoReplacedElement
52 {
53  typedef SoReplacedElement inherited;
54 
55  SO_ELEMENT_HEADER(SoSlabRenderingElement);
56 
57  public:
58 
60  static void set(SoState *state, SoNode *node, const SbSlabRenderingProperties &props);
62  static const SbSlabRenderingProperties &get(SoState *state);
63 
64  SoINTERNAL public:
65 
67  static void initClass();
68 
69  protected:
70 
72 
75 };
76 
77 #endif // _SO_ML_IMAGE_ELEMENT_
SlabRenderingSamplingMode
Sampling mode for SbSlabRenderingProperties.
@ EXACT_SLICE_SAMPLING
If enabled, the renderer should render exactly the slice at worldPositionOnSlice and all other slices...
@ ALLOW_RESAMPLING
If enabled, the renderer should render the slice at worldPositionOnSlice but may render more subslice...
#define SOUTILS_EXPORT
System dependent includes. Disables some compiler/linker warnings.
Definition: SoUtilsSystem.h:31
Open Inventor element to store information about current slab mode.
SbVec3f worldPositionOnSlice
< A world position on one of the rendered slices that MUST be sliced by a renderer
bool enabled
< Flag that defines if the slab rendering is enabled and the parameters below should be used.
SbVec3f worldPositionOnNextSlice
< Another world position on the next slice to be rendered, this may be used by the renderer but is no...
SbPlane frontPlane
< The front plane of the slab in world coordinate system
SbPlane backPlane
< The back plane of the slab in world coordinate system
SlabRenderingSamplingMode samplingMode
< If this flag is enabled, the renderer should render slices at exactly worldPositionOnSlice and all ...
Inventor element storing SlabRendering properties in the Open Inventor state.
static void initClass()
Initialize class with runtime type system.
SbSlabRenderingProperties _props
static const SbSlabRenderingProperties & get(SoState *state)
Returns the current SbSlabRenderingProperties from the state.
~SoSlabRenderingElement() override
Destructor.
static void set(SoState *state, SoNode *node, const SbSlabRenderingProperties &props)
Sets the current SbSlabRenderingProperties in the state.