Carna  Version 3.3.2
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 float DEFAULT_WINDOWING_WIDTH;
68  const static float DEFAULT_WINDOWING_LEVEL;
69 
74  const static unsigned int ROLE_INTENSITIES;
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( float windowingLevel );
97 
101  void setWindowingWidth( float windowingWidth );
102 
105  void setWindowingWidth( unsigned int windowingWidth );
106 
110  void setRenderingInverse( bool inverse );
111 
115  float windowingLevel() const;
116 
120  float windowingWidth() const;
121 
125  float minimumIntensity() const;
126 
130  float maximumIntensity() const;
131 
135  bool isRenderingInverse() const;
136 
137 protected:
138 
139  virtual void buildRenderQueues( base::Node& root, const base::math::Matrix4f& viewTransform ) override;
140 
141  virtual void rewindRenderQueues() override;
142 
143  virtual void updateRenderQueues( const base::math::Matrix4f& viewTransform ) override;
144 
145  virtual void render( const base::Renderable& ) override;
146 
147 }; // CuttingPlanesStage
148 
149 
150 
151 } // namespace Carna :: presets
152 
153 } // namespace Carna
154 
155 #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
static const unsigned int ROLE_INTENSITIES
Holds the role that intensity volume data is expected to take when attached to base::Geometry nodes...
static const float DEFAULT_WINDOWING_LEVEL
Holds the default value for setWindowingLevel.
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
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&#39;s model-view transfo...
Definition: Renderable.h:45
static const float DEFAULT_WINDOWING_WIDTH
Holds the default value for setWindowingWidth.