LibCarna Version 3.4.0
Loading...
Searching...
No Matches
MIPStage.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 MIPSTAGE_H_6014714286
16#define MIPSTAGE_H_6014714286
17
18#include <LibCarna/LibCarna.hpp>
21#include <memory>
22
28namespace LibCarna
29{
30
31namespace presets
32{
33
34
35
36// ----------------------------------------------------------------------------------
37// MIPStage
38// ----------------------------------------------------------------------------------
39
66class LIBCARNA MIPStage : public VolumeRenderingStage
67{
68
69 struct Details;
70 const std::unique_ptr< Details > pimpl;
71
72public:
73
78 const static unsigned int ROLE_INTENSITIES = 0;
79
83 explicit MIPStage( unsigned int geometryType, unsigned int colorMapResolution = base::ColorMap::DEFAULT_RESOLUTION );
84
88 virtual ~MIPStage();
89
94
95 virtual void reshape( base::FrameRenderer& fr, unsigned int width, unsigned int height ) override;
96
97 virtual void renderPass
98 ( const base::math::Matrix4f& viewTransform
100 , const base::Viewport& vp ) override;
101
102protected:
103
104 virtual unsigned int loadVideoResources() override;
105
106 virtual void createVolumeSamplers( const std::function< void( unsigned int, base::Sampler* ) >& registerSampler ) override;
107
108 virtual const base::ShaderProgram& acquireShader() override;
109
110 virtual const std::string& uniformName( unsigned int role ) const override;
111
115 virtual void configureShader() override;
116
120 virtual void configureShader( const base::Renderable& ) override;
121
122}; // MIPStage
123
124
125
126} // namespace LibCarna :: presets
127
128} // namespace LibCarna
129
130#endif // MIPSTAGE_H_6014714286
Defines LibCarna::base::ColorMap.
Contains forward-declarations.
Defines LibCarna::presets::VolumeRenderingStage.
Represents a mapping of intensity values to RGBA colors, that can be queried in a shader.
Definition ColorMap.hpp:45
Defines logic for rendering frames from given scenes.
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...
Maintains an OpenGL texture sampler object. This class realizes the RAII-idiom.
Definition Sampler.hpp:48
Maintains an OpenGL shader program. Realizes the RAII-idiom.
Defines a rendering viewport. The viewport is a property of the current OpenGL context.
Definition Viewport.hpp:52
Renders maximum intensity projections of volume geometries in the scene.
Definition MIPStage.hpp:67
virtual void reshape(base::FrameRenderer &fr, unsigned int width, unsigned int height) override
Orders this stage to reshape its buffers according to the specified width and height.
virtual void renderPass(const base::math::Matrix4f &viewTransform, base::RenderTask &rt, const base::Viewport &vp) override
Triggers the volume rendering.
virtual const base::ShaderProgram & acquireShader() override
Acquires the shader from the base::ShaderManager, that is to be used for rendering the slices.
virtual unsigned int loadVideoResources() override
Loads video resources when rendering is triggered for the first time. Override this method if you nee...
virtual const std::string & uniformName(unsigned int role) const override
Tells the name of the uniform variable, that the role texture is to be bound to. Use configureShader ...
base::ColorMap colorMap
The color map used for the rendering.
Definition MIPStage.hpp:93
virtual void createVolumeSamplers(const std::function< void(unsigned int, base::Sampler *) > &registerSampler) override
Creates texture samplers for volume textures and uses registerSampler to assign them to the roles tha...
virtual void configureShader() override
Does nothing.
MIPStage(unsigned int geometryType, unsigned int colorMapResolution=base::ColorMap::DEFAULT_RESOLUTION)
Instantiates.
virtual void configureShader(const base::Renderable &) override
Does nothing.
virtual ~MIPStage()
Deletes.
Defines abstract base class for rendering stages that render volume geometries in the scene.
Eigen::Matrix< float, 4, 4, Eigen::ColMajor > Matrix4f
Defines matrix.
Definition math.hpp:197