Carna  Version 3.0.1
CuttingPlanesStage.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010 - 2015 Leonid Kostrykin
3  *
4  * Chair of Medical Engineering (mediTEC)
5  * RWTH Aachen University
6  * Pauwelsstr. 20
7  * 52074 Aachen
8  * Germany
9  *
10  */
11 
12 #ifndef CUTTINGPLANESSTAGE_H_6014714286
13 #define CUTTINGPLANESSTAGE_H_6014714286
14 
16 #include <Carna/base/Renderable.h>
17 #include <Carna/Carna.h>
18 
23 namespace Carna
24 {
25 
26 namespace presets
27 {
28 
29 
30 
31 // ----------------------------------------------------------------------------------
32 // CuttingPlanesStage
33 // ----------------------------------------------------------------------------------
34 
56 class CARNA_LIB CuttingPlanesStage : public base::GeometryStage< void >
57 {
58 
59  struct Details;
60  const std::unique_ptr< Details > pimpl;
61 
62  struct VideoResources;
63  std::unique_ptr< VideoResources > vr;
64 
65 public:
66 
67  const static unsigned int DEFAULT_WINDOWING_WIDTH;
69 
74  const static unsigned int ROLE_HU_VOLUME;
75 
79  CuttingPlanesStage( unsigned int volumeGeometryType, unsigned int planeGeometryType );
80 
84  virtual ~CuttingPlanesStage();
85 
86  CuttingPlanesStage* clone() const override;
87 
88  virtual void renderPass
89  ( const base::math::Matrix4f& viewTransform
90  , base::RenderTask& rt
91  , const base::Viewport& vp ) override;
92 
96  void setWindowingLevel( base::HUV windowingLevel );
97 
101  void setWindowingWidth( unsigned int windowingWidth );
102 
106  void setRenderingInverse( bool inverse );
107 
111  base::HUV windowingLevel() const;
112 
116  unsigned int windowingWidth() const;
117 
121  base::HUV minimumHUV() const;
122 
126  base::HUV maximumHUV() const;
127 
131  bool isRenderingInverse() const;
132 
133 protected:
134 
135  virtual void buildRenderQueues( base::Node& root, const base::math::Matrix4f& viewTransform ) override;
136 
137  virtual void rewindRenderQueues() override;
138 
139  virtual void updateRenderQueues( const base::math::Matrix4f& viewTransform ) override;
140 
141  virtual void render( const base::Renderable& ) override;
142 
143 }; // CuttingPlanesStage
144 
145 
146 
147 } // namespace Carna :: presets
148 
149 } // namespace Carna
150 
151 #endif // CUTTINGPLANESSTAGE_H_6014714286
Defines Carna::base::Renderable.
Defines Carna::base::GeometryStage.
Partially implements a rendering stage that uses at least one render queue for rendering geometry fro...
Definition: GeometryStage.h:59
Defines the inner node of a scene graph. Implements a spatial scene element that is allowed to have c...
Definition: Node.h:44
Invokes the rendering stages of the frame renderer successively.
Definition: RenderTask.h:40
static const unsigned int DEFAULT_WINDOWING_WIDTH
Holds the default value for setWindowingWidth.
Renders cutting planes of volume geometries in the scene.
Eigen::Matrix< float, 4, 4, Eigen::ColMajor > Matrix4f
Defines matrix.
Definition: math.h:193
Defines a rendering viewport. The viewport is a property of the current OpenGL context.
Definition: Viewport.h:48
Represents a Geometry object that has been queued into a RenderQueue. The object's model-view transfo...
Definition: Renderable.h:45
signed short HUV
Represents values in .
Definition: Carna.h:56
static const base::HUV DEFAULT_WINDOWING_LEVEL
Holds the default value for setWindowingLevel.
static const unsigned int ROLE_HU_VOLUME
Holds the role that HU volume data is expected to take when attached to base::Geometry nodes...