LibCarna Version 3.4.0
Loading...
Searching...
No Matches
CuttingPlanesStage.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010 - 2016 Leonid Kostrykin
3 *
4 * Chair of Medical Engineering (mediTEC)
5 * RWTH Aachen University
6 * Pauwelsstr. 20
7 * 52074 Aachen
8 * Germany
9 *
10 *
11 * Copyright (C) 2021 - 2025 Leonid Kostrykin
12 *
13 */
14
15#ifndef CUTTINGPLANESSTAGE_H_6014714286
16#define CUTTINGPLANESSTAGE_H_6014714286
17
21#include <LibCarna/LibCarna.hpp>
22
28namespace LibCarna
29{
30
31namespace presets
32{
33
34
35
36// ----------------------------------------------------------------------------------
37// CuttingPlanesStage
38// ----------------------------------------------------------------------------------
39
60class LIBCARNA CuttingPlanesStage : public base::GeometryStage< void >
61{
62
63 struct Details;
64 const std::unique_ptr< Details > pimpl;
65
66 struct VideoResources;
67 std::unique_ptr< VideoResources > vr;
68
69public:
70
71 const static float DEFAULT_WINDOWING_WIDTH;
72 const static float DEFAULT_WINDOWING_LEVEL;
73
78 const static unsigned int ROLE_INTENSITIES;
79
80 const unsigned int volumeGeometryType;
81
82 const unsigned int planeGeometryType;
83
87 CuttingPlanesStage( unsigned int volumeGeometryType, unsigned int planeGeometryType, unsigned int colorMapResolution = base::ColorMap::DEFAULT_RESOLUTION );
88
93
98
99 virtual void renderPass
100 ( const base::math::Matrix4f& viewTransform
101 , base::RenderTask& rt
102 , const base::Viewport& vp ) override;
103
107 void setWindowingLevel( float windowingLevel );
108
112 void setWindowingWidth( float windowingWidth );
113
116 void setWindowingWidth( unsigned int windowingWidth );
117
121 float windowingLevel() const;
122
126 float windowingWidth() const;
127
128protected:
129
130 virtual void buildRenderQueues( base::Node& root, const base::math::Matrix4f& viewTransform ) override;
131
132 virtual void rewindRenderQueues() override;
133
134 virtual void updateRenderQueues( const base::math::Matrix4f& viewTransform ) override;
135
136 virtual void render( const base::Renderable& ) override;
137
138}; // CuttingPlanesStage
139
140
141
142} // namespace LibCarna :: presets
143
144} // namespace LibCarna
145
146#endif // CUTTINGPLANESSTAGE_H_6014714286
Defines LibCarna::base::ColorMap.
Defines LibCarna::base::GeometryStage.
Contains forward-declarations.
Defines LibCarna::base::Renderable.
Represents a mapping of intensity values to RGBA colors, that can be queried in a shader.
Definition ColorMap.hpp:45
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.hpp:48
Invokes the rendering stages of the frame renderer successively.
Represents a Geometry object that has been queued into a RenderQueue. The object's model-view transfo...
Defines a rendering viewport. The viewport is a property of the current OpenGL context.
Definition Viewport.hpp:52
Renders cutting planes of volume geometries in the scene.
static const float DEFAULT_WINDOWING_WIDTH
Holds the default value for setWindowingWidth.
float windowingWidth() const
Tells the windowing width.
const unsigned int volumeGeometryType
Renders such volume geometries whose type equals this.
float windowingLevel() const
Tells the windowing level intensity.
void setWindowingWidth(float windowingWidth)
Sets windowing level to windowingWidth.
virtual void rewindRenderQueues() override
Rewinds the rendering queues of this stage.
static const unsigned int ROLE_INTENSITIES
Holds the role that intensity volume data is expected to take when attached to base::Geometry nodes.
CuttingPlanesStage(unsigned int volumeGeometryType, unsigned int planeGeometryType, unsigned int colorMapResolution=base::ColorMap::DEFAULT_RESOLUTION)
Instantiates.
virtual void updateRenderQueues(const base::math::Matrix4f &viewTransform) override
Recomputes the model-view transforms of the renderables enqueued by this stage.
base::ColorMap colorMap
The color map used for the rendering.
virtual void render(const base::Renderable &) override
Renders the renderable.
const unsigned int planeGeometryType
Renders such plane geometries whose type equals this.
void setWindowingWidth(unsigned int windowingWidth)
virtual void renderPass(const base::math::Matrix4f &viewTransform, base::RenderTask &rt, const base::Viewport &vp) override
Called once per pass.
void setWindowingLevel(float windowingLevel)
Sets windowing level to windowingLevel.
virtual void buildRenderQueues(base::Node &root, const base::math::Matrix4f &viewTransform) override
Builds the rendering queues of this stage.
static const float DEFAULT_WINDOWING_LEVEL
Holds the default value for setWindowingLevel.
Eigen::Matrix< float, 4, 4, Eigen::ColMajor > Matrix4f
Defines matrix.
Definition math.hpp:197