Carna Version 3.3.3
Loading...
Searching...
No Matches
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
17#include <Carna/Carna.h>
18
23namespace Carna
24{
25
26namespace presets
27{
28
29
30
31// ----------------------------------------------------------------------------------
32// CuttingPlanesStage
33// ----------------------------------------------------------------------------------
34
56class 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
65public:
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
85
86 CuttingPlanesStage* clone() const override;
87
88 virtual void renderPass
89 ( const base::math::Matrix4f& viewTransform
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
137protected:
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::GeometryStage.
Defines Carna::base::Renderable.
Partially implements a rendering stage that uses at least one render queue for rendering geometry fro...
Defines the inner node of a scene graph. Implements a spatial scene element that is allowed to have c...
Definition Node.h:45
Invokes the rendering stages of the frame renderer successively.
Definition RenderTask.h:41
Represents a Geometry object that has been queued into a RenderQueue. The object's model-view transfo...
Definition Renderable.h:46
Defines a rendering viewport. The viewport is a property of the current OpenGL context.
Definition Viewport.h:49
Renders cutting planes of volume geometries in the scene.
bool isRenderingInverse() const
Tells whether brightness is inversely proportional to the intensity.
float minimumIntensity() const
Tells the lower bound of the intensity window.
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.
virtual void renderPass(const base::math::Matrix4f &viewTransform, base::RenderTask &rt, const base::Viewport &vp) override
Called once per pass.
CuttingPlanesStage(unsigned int volumeGeometryType, unsigned int planeGeometryType)
Instantiates.
CuttingPlanesStage * clone() const override
Returns same RenderStage implementation with same configuration.
virtual ~CuttingPlanesStage()
Deletes.
float windowingWidth() const
Tells the windowing width.
static const float DEFAULT_WINDOWING_WIDTH
Holds the default value for setWindowingWidth.
void setWindowingWidth(float windowingWidth)
Sets windowing level to windowingWidth.
float windowingLevel() const
Tells the windowing level intensity.
void setWindowingWidth(unsigned int windowingWidth)
virtual void updateRenderQueues(const base::math::Matrix4f &viewTransform) override
Recomputes the model-view transforms of the renderables enqueued by this stage.
float maximumIntensity() const
Tells the upper bound of the intensity window.
virtual void render(const base::Renderable &) override
Renders the renderable.
virtual void buildRenderQueues(base::Node &root, const base::math::Matrix4f &viewTransform) override
Builds the rendering queues of this stage.
void setWindowingLevel(float windowingLevel)
Sets windowing level to windowingLevel.
virtual void rewindRenderQueues() override
Rewinds the rendering queues of this stage.
void setRenderingInverse(bool inverse)
Sets whether brightness shall be inversely proportional to the intensity.
Eigen::Matrix< float, 4, 4, Eigen::ColMajor > Matrix4f
Defines matrix.
Definition math.h:193