diff --git a/docs/html/CuttingPlanesStage_8h_source.html b/docs/html/CuttingPlanesStage_8h_source.html index ac298d49..0cff8734 100644 --- a/docs/html/CuttingPlanesStage_8h_source.html +++ b/docs/html/CuttingPlanesStage_8h_source.html @@ -74,9 +74,10 @@
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_INTENSITY_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( 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.
+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
@@ -85,7 +86,6 @@
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 unsigned int ROLE_INTENSITY_VOLUME
Holds the role that intensity volume data is expected to take when attached to base::Geometry nodes...
static const float DEFAULT_WINDOWING_WIDTH
Holds the default value for setWindowingWidth.
diff --git a/docs/html/DRRStage_8h_source.html b/docs/html/DRRStage_8h_source.html index 5370c892..1facab39 100644 --- a/docs/html/DRRStage_8h_source.html +++ b/docs/html/DRRStage_8h_source.html @@ -74,7 +74,7 @@
DRRStage.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 DRRSTAGE_H_6014714286
13 #define DRRSTAGE_H_6014714286
14 
16 #include <Carna/Carna.h>
17 #include <Carna/base/HUV.h>
18 #include <memory>
19 
24 namespace Carna
25 {
26 
27 namespace presets
28 {
29 
30 
31 
32 // ----------------------------------------------------------------------------------
33 // DRRStage
34 // ----------------------------------------------------------------------------------
35 
106 class CARNA_LIB DRRStage : public VolumeRenderingStage
107 {
108 
109  struct Details;
110  const std::unique_ptr< Details > pimpl;
111 
112 public:
113 
114  const static float DEFAULT_WATER_ATTENUATION;
115  const static float DEFAULT_BASE_INTENSITY;
118  const static float DEFAULT_UPPER_MULTIPLIER;
119  const static bool DEFAULT_RENDER_INVERSE;
120 
125  const static unsigned int ROLE_INTENSITY_VOLUME = 0;
126 
131  explicit DRRStage( unsigned int geometryType );
132 
136  virtual ~DRRStage();
137 
138  DRRStage* clone() const override;
139 
140  virtual void reshape( base::FrameRenderer& fr, unsigned int width, unsigned int height ) override;
141 
146  virtual void renderPass
147  ( const base::math::Matrix4f& viewTransform
148  , base::RenderTask& rt
149  , const base::Viewport& vp ) override;
150 
155  float waterAttenuation() const;
156 
160  float baseIntensity() const;
161 
166  base::HUV lowerThreshold() const;
167 
172  base::HUV upperThreshold() const;
173 
178  float upperMultiplier() const;
179 
184  bool isRenderingInverse() const;
185 
190  void setWaterAttenuation( float muWater );
191 
196  void setBaseIntensity( float baseIntensity );
197 
202  void setLowerThreshold( base::HUV lower );
203 
208  void setUpperThreshold( base::HUV upper );
209 
214  void setUpperMultiplier( float multiplier );
215 
227  void setRenderingInverse( bool inverse );
228 
229 protected:
230 
231  virtual unsigned int loadVideoResources() override;
232 
233  virtual void createVolumeSamplers( const std::function< void( unsigned int, base::Sampler* ) >& registerSampler ) override;
234 
238  virtual const base::ShaderProgram& acquireShader() override;
239 
243  virtual const std::string& uniformName( unsigned int role ) const override;
244 
248  virtual void configureShader() override;
249 
253  virtual void configureShader( const base::Renderable& ) override;
254 
255 }; // DRRStage
256 
257 
258 
259 } // namespace Carna :: presets
260 
261 } // namespace Carna
262 
263 #endif // DRRSTAGE_H_6014714286
Renders digital radiograph reconstructs of volume geometries in the scene.
Definition: DRRStage.h:106
+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 DRRSTAGE_H_6014714286
13 #define DRRSTAGE_H_6014714286
14 
16 #include <Carna/Carna.h>
17 #include <Carna/base/HUV.h>
18 #include <memory>
19 
24 namespace Carna
25 {
26 
27 namespace presets
28 {
29 
30 
31 
32 // ----------------------------------------------------------------------------------
33 // DRRStage
34 // ----------------------------------------------------------------------------------
35 
106 class CARNA_LIB DRRStage : public VolumeRenderingStage
107 {
108 
109  struct Details;
110  const std::unique_ptr< Details > pimpl;
111 
112 public:
113 
114  const static float DEFAULT_WATER_ATTENUATION;
115  const static float DEFAULT_BASE_INTENSITY;
118  const static float DEFAULT_UPPER_MULTIPLIER;
119  const static bool DEFAULT_RENDER_INVERSE;
120 
125  const static unsigned int ROLE_INTENSITIES = 0;
126 
131  explicit DRRStage( unsigned int geometryType );
132 
136  virtual ~DRRStage();
137 
138  DRRStage* clone() const override;
139 
140  virtual void reshape( base::FrameRenderer& fr, unsigned int width, unsigned int height ) override;
141 
146  virtual void renderPass
147  ( const base::math::Matrix4f& viewTransform
148  , base::RenderTask& rt
149  , const base::Viewport& vp ) override;
150 
155  float waterAttenuation() const;
156 
160  float baseIntensity() const;
161 
166  base::HUV lowerThreshold() const;
167 
172  base::HUV upperThreshold() const;
173 
178  float upperMultiplier() const;
179 
184  bool isRenderingInverse() const;
185 
190  void setWaterAttenuation( float muWater );
191 
196  void setBaseIntensity( float baseIntensity );
197 
202  void setLowerThreshold( base::HUV lower );
203 
208  void setUpperThreshold( base::HUV upper );
209 
214  void setUpperMultiplier( float multiplier );
215 
227  void setRenderingInverse( bool inverse );
228 
229 protected:
230 
231  virtual unsigned int loadVideoResources() override;
232 
233  virtual void createVolumeSamplers( const std::function< void( unsigned int, base::Sampler* ) >& registerSampler ) override;
234 
238  virtual const base::ShaderProgram& acquireShader() override;
239 
243  virtual const std::string& uniformName( unsigned int role ) const override;
244 
248  virtual void configureShader() override;
249 
253  virtual void configureShader( const base::Renderable& ) override;
254 
255 }; // DRRStage
256 
257 
258 
259 } // namespace Carna :: presets
260 
261 } // namespace Carna
262 
263 #endif // DRRSTAGE_H_6014714286
Renders digital radiograph reconstructs of volume geometries in the scene.
Definition: DRRStage.h:106
Defines Carna::base::HUV.
static const base::HUV DEFAULT_LOWER_THRESHOLD
Holds default value for .
Definition: DRRStage.h:116
Defines logic for rendering frames from given scenes.
Definition: FrameRenderer.h:69
diff --git a/docs/html/DVRStage_8h_source.html b/docs/html/DVRStage_8h_source.html index 9f6ff4ae..61ba7b6e 100644 --- a/docs/html/DVRStage_8h_source.html +++ b/docs/html/DVRStage_8h_source.html @@ -74,7 +74,7 @@
DVRStage.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 DVRSTAGE_H_6014714286
13 #define DVRSTAGE_H_6014714286
14 
16 #include <Carna/Carna.h>
17 #include <memory>
18 
23 namespace Carna
24 {
25 
26 namespace presets
27 {
28 
29 
30 
31 // ----------------------------------------------------------------------------------
32 // DVRStage
33 // ----------------------------------------------------------------------------------
34 
101 class CARNA_LIB DVRStage : public VolumeRenderingStage
102 {
103 
104  struct Details;
105  const std::unique_ptr< Details > pimpl;
106 
107 public:
108 
113  const static unsigned int ROLE_INTENSITY_VOLUME = 0;
114 
119  const static unsigned int ROLE_NORMALS = 1;
120 
124  const static float DEFAULT_TRANSLUCENCE;
125 
130  const static float DEFAULT_DIFFUSE_LIGHT;
131 
140  explicit DVRStage( unsigned int geometryType, unsigned int colorMapResolution = ( 1 << 12 ) );
141 
145  virtual ~DVRStage();
146 
147  DVRStage* clone() const override;
148 
149  virtual void reshape( base::FrameRenderer& fr, unsigned int width, unsigned int height ) override;
150 
151  virtual void renderPass
152  ( const base::math::Matrix4f& viewTransform
153  , base::RenderTask& rt
154  , const base::Viewport& vp ) override;
155 
160  void clearColorMap();
161 
174  void writeColorMap( const base::math::Span< float >& intensityRange, const base::math::Span< base::Color > colorRange );
175 
178  void writeColorMap( float intensityFirst, float intensityLast, const base::Color& colorFirst, const base::Color& colorLast );
179 
183  void setTranslucence( float translucence );
184 
188  float translucence() const;
189 
199  void setDiffuseLight( float diffuseLight );
200 
205  float diffuseLight() const;
206 
211  bool isLightingUsed() const;
212 
213 protected:
214 
215  virtual unsigned int loadVideoResources() override;
216 
217  virtual void createVolumeSamplers( const std::function< void( unsigned int, base::Sampler* ) >& registerSampler ) override;
218 
222  virtual const base::ShaderProgram& acquireShader() override;
223 
227  virtual const std::string& uniformName( unsigned int role ) const override;
228 
229  virtual void configureShader() override;
230 
234  virtual void configureShader( const base::Renderable& ) override;
235 
236 }; // DVRStage
237 
238 
239 
240 } // namespace Carna :: presets
241 
242 } // namespace Carna
243 
244 #endif // DVRSTAGE_H_6014714286
static const float DEFAULT_DIFFUSE_LIGHT
Holds the default diffuse light amount. The ambient light amount is always one minus the diffuse ligh...
Definition: DVRStage.h:130
+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 DVRSTAGE_H_6014714286
13 #define DVRSTAGE_H_6014714286
14 
16 #include <Carna/Carna.h>
17 #include <memory>
18 
23 namespace Carna
24 {
25 
26 namespace presets
27 {
28 
29 
30 
31 // ----------------------------------------------------------------------------------
32 // DVRStage
33 // ----------------------------------------------------------------------------------
34 
101 class CARNA_LIB DVRStage : public VolumeRenderingStage
102 {
103 
104  struct Details;
105  const std::unique_ptr< Details > pimpl;
106 
107 public:
108 
113  const static unsigned int ROLE_INTENSITIES = 0;
114 
119  const static unsigned int ROLE_NORMALS = 1;
120 
124  const static float DEFAULT_TRANSLUCENCE;
125 
130  const static float DEFAULT_DIFFUSE_LIGHT;
131 
140  explicit DVRStage( unsigned int geometryType, unsigned int colorMapResolution = ( 1 << 12 ) );
141 
145  virtual ~DVRStage();
146 
147  DVRStage* clone() const override;
148 
149  virtual void reshape( base::FrameRenderer& fr, unsigned int width, unsigned int height ) override;
150 
151  virtual void renderPass
152  ( const base::math::Matrix4f& viewTransform
153  , base::RenderTask& rt
154  , const base::Viewport& vp ) override;
155 
160  void clearColorMap();
161 
174  void writeColorMap( const base::math::Span< float >& intensityRange, const base::math::Span< base::Color > colorRange );
175 
178  void writeColorMap( float intensityFirst, float intensityLast, const base::Color& colorFirst, const base::Color& colorLast );
179 
183  void setTranslucence( float translucence );
184 
188  float translucence() const;
189 
199  void setDiffuseLight( float diffuseLight );
200 
205  float diffuseLight() const;
206 
211  bool isLightingUsed() const;
212 
213 protected:
214 
215  virtual unsigned int loadVideoResources() override;
216 
217  virtual void createVolumeSamplers( const std::function< void( unsigned int, base::Sampler* ) >& registerSampler ) override;
218 
222  virtual const base::ShaderProgram& acquireShader() override;
223 
227  virtual const std::string& uniformName( unsigned int role ) const override;
228 
229  virtual void configureShader() override;
230 
234  virtual void configureShader( const base::Renderable& ) override;
235 
236 }; // DVRStage
237 
238 
239 
240 } // namespace Carna :: presets
241 
242 } // namespace Carna
243 
244 #endif // DVRSTAGE_H_6014714286
static const float DEFAULT_DIFFUSE_LIGHT
Holds the default diffuse light amount. The ambient light amount is always one minus the diffuse ligh...
Definition: DVRStage.h:130
static const float DEFAULT_TRANSLUCENCE
Holds the default translucence.
Definition: DVRStage.h:124
Defines logic for rendering frames from given scenes.
Definition: FrameRenderer.h:69
Maintains an OpenGL shader program. Realizes the RAII-idiom.
Definition: ShaderProgram.h:47
diff --git a/docs/html/MIPStage_8h_source.html b/docs/html/MIPStage_8h_source.html index 94af1521..9f43b05f 100644 --- a/docs/html/MIPStage_8h_source.html +++ b/docs/html/MIPStage_8h_source.html @@ -74,7 +74,7 @@
MIPStage.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 MIPSTAGE_H_6014714286
13 #define MIPSTAGE_H_6014714286
14 
16 #include <Carna/Carna.h>
17 #include <memory>
18 
23 namespace Carna
24 {
25 
26 namespace presets
27 {
28 
29 
30 
31 // ----------------------------------------------------------------------------------
32 // MIPStage
33 // ----------------------------------------------------------------------------------
34 
64 class CARNA_LIB MIPStage : public VolumeRenderingStage
65 {
66 
67  struct Details;
68  const std::unique_ptr< Details > pimpl;
69 
70 public:
71 
76  const static unsigned int ROLE_INTENSITY_VOLUME = 0;
77 
81  explicit MIPStage( unsigned int geometryType );
82 
86  virtual ~MIPStage();
87 
88  MIPStage* clone() const override;
89 
90  virtual void reshape( base::FrameRenderer& fr, unsigned int width, unsigned int height ) override;
91 
92  virtual void renderPass
93  ( const base::math::Matrix4f& viewTransform
94  , base::RenderTask& rt
95  , const base::Viewport& vp ) override;
96 
100  void ascendLayer( const MIPLayer& layer );
101 
105  void appendLayer( MIPLayer* layer );
106 
111  MIPLayer* removeLayer( const MIPLayer& layer );
112 
116  std::size_t layersCount() const;
117 
121  MIPLayer& layer( std::size_t layerIndex );
122 
125  const MIPLayer& layer( std::size_t layerIndex ) const;
126 
130  void clearLayers();
131 
132 protected:
133 
134  virtual void createVolumeSamplers( const std::function< void( unsigned int, base::Sampler* ) >& registerSampler ) override;
135 
136  virtual const base::ShaderProgram& acquireShader() override;
137 
138  virtual const std::string& uniformName( unsigned int role ) const override;
139 
140  virtual void configureShader() override;
141 
145  virtual void configureShader( const base::Renderable& ) override;
146 
147 }; // MIPStage
148 
149 
150 
151 } // namespace Carna :: presets
152 
153 } // namespace Carna
154 
155 #endif // MIPSTAGE_H_6014714286
Defines logic for rendering frames from given scenes.
Definition: FrameRenderer.h:69
+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 MIPSTAGE_H_6014714286
13 #define MIPSTAGE_H_6014714286
14 
16 #include <Carna/Carna.h>
17 #include <memory>
18 
23 namespace Carna
24 {
25 
26 namespace presets
27 {
28 
29 
30 
31 // ----------------------------------------------------------------------------------
32 // MIPStage
33 // ----------------------------------------------------------------------------------
34 
64 class CARNA_LIB MIPStage : public VolumeRenderingStage
65 {
66 
67  struct Details;
68  const std::unique_ptr< Details > pimpl;
69 
70 public:
71 
76  const static unsigned int ROLE_INTENSITIES = 0;
77 
81  explicit MIPStage( unsigned int geometryType );
82 
86  virtual ~MIPStage();
87 
88  MIPStage* clone() const override;
89 
90  virtual void reshape( base::FrameRenderer& fr, unsigned int width, unsigned int height ) override;
91 
92  virtual void renderPass
93  ( const base::math::Matrix4f& viewTransform
94  , base::RenderTask& rt
95  , const base::Viewport& vp ) override;
96 
100  void ascendLayer( const MIPLayer& layer );
101 
105  void appendLayer( MIPLayer* layer );
106 
111  MIPLayer* removeLayer( const MIPLayer& layer );
112 
116  std::size_t layersCount() const;
117 
121  MIPLayer& layer( std::size_t layerIndex );
122 
125  const MIPLayer& layer( std::size_t layerIndex ) const;
126 
130  void clearLayers();
131 
132 protected:
133 
134  virtual void createVolumeSamplers( const std::function< void( unsigned int, base::Sampler* ) >& registerSampler ) override;
135 
136  virtual const base::ShaderProgram& acquireShader() override;
137 
138  virtual const std::string& uniformName( unsigned int role ) const override;
139 
140  virtual void configureShader() override;
141 
145  virtual void configureShader( const base::Renderable& ) override;
146 
147 }; // MIPStage
148 
149 
150 
151 } // namespace Carna :: presets
152 
153 } // namespace Carna
154 
155 #endif // MIPSTAGE_H_6014714286
Defines logic for rendering frames from given scenes.
Definition: FrameRenderer.h:69
Maintains an OpenGL shader program. Realizes the RAII-idiom.
Definition: ShaderProgram.h:47
Invokes the rendering stages of the frame renderer successively.
Definition: RenderTask.h:40
Renders maximum intensity projections of volume geometries in the scene.
Definition: MIPStage.h:64
diff --git a/docs/html/MaskRenderingStage_8h_source.html b/docs/html/MaskRenderingStage_8h_source.html index 01ec154e..31848913 100644 --- a/docs/html/MaskRenderingStage_8h_source.html +++ b/docs/html/MaskRenderingStage_8h_source.html @@ -74,21 +74,21 @@
MaskRenderingStage.h
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 Leonid Kostrykin
3  *
4  */
5 
6 #ifndef MASKRENDERINGSTAGE_H_6014714286
7 #define MASKRENDERINGSTAGE_H_6014714286
8 
10 #include <Carna/Carna.h>
11 #include <memory>
12 
17 namespace Carna
18 {
19 
20 namespace presets
21 {
22 
23 
24 
25 // ----------------------------------------------------------------------------------
26 // MaskRenderingStage
27 // ----------------------------------------------------------------------------------
28 
59 class CARNA_LIB MaskRenderingStage : public VolumeRenderingStage
60 {
61 
62  struct Details;
63  const std::unique_ptr< Details > pimpl;
64 
65 public:
66 
67  const static base::Color DEFAULT_COLOR;
68  const static unsigned int ROLE_DEFAULT_MASK;
69 
74  const unsigned int maskRole;
75 
83  explicit MaskRenderingStage( unsigned int geometryType, unsigned int maskRole = ROLE_DEFAULT_MASK );
84 
88  virtual ~MaskRenderingStage();
89 
90  MaskRenderingStage* clone() const override;
91 
92  virtual void reshape( base::FrameRenderer& fr, unsigned int width, unsigned int height ) override;
93 
97  virtual void renderPass
98  ( const base::math::Matrix4f& viewTransform
99  , base::RenderTask& rt
100  , const base::Viewport& vp ) override;
101 
105  const base::Color& color() const;
106 
110  void setColor( const base::Color& color );
111 
115  bool renderBorders() const;
116 
120  void setRenderBorders( bool borders );
121 
122 protected:
123 
124  virtual unsigned int loadVideoResources() override;
125 
126  virtual void createVolumeSamplers( const std::function< void( unsigned int, base::Sampler* ) >& registerSampler ) override;
127 
131  virtual const base::ShaderProgram& acquireShader() override;
132 
136  virtual const std::string& uniformName( unsigned int role ) const override;
137 
141  virtual void configureShader() override;
142 
146  virtual void configureShader( const base::Renderable& ) override;
147 
148 }; // DRRStage
149 
150 
151 
152 } // namespace Carna :: presets
153 
154 } // namespace Carna
155 
156 #endif // MASKRENDERINGSTAGE_H_6014714286
Defines logic for rendering frames from given scenes.
Definition: FrameRenderer.h:69
+Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 Leonid Kostrykin
3  *
4  */
5 
6 #ifndef MASKRENDERINGSTAGE_H_6014714286
7 #define MASKRENDERINGSTAGE_H_6014714286
8 
10 #include <Carna/Carna.h>
11 #include <memory>
12 
17 namespace Carna
18 {
19 
20 namespace presets
21 {
22 
23 
24 
25 // ----------------------------------------------------------------------------------
26 // MaskRenderingStage
27 // ----------------------------------------------------------------------------------
28 
59 class CARNA_LIB MaskRenderingStage : public VolumeRenderingStage
60 {
61 
62  struct Details;
63  const std::unique_ptr< Details > pimpl;
64 
65 public:
66 
67  const static base::Color DEFAULT_COLOR;
68  const static unsigned int DEFAULT_ROLE_MASK;
69 
74  const unsigned int roleMask;
75 
83  explicit MaskRenderingStage( unsigned int geometryType, unsigned int roleMask = DEFAULT_ROLE_MASK );
84 
88  virtual ~MaskRenderingStage();
89 
90  MaskRenderingStage* clone() const override;
91 
92  virtual void reshape( base::FrameRenderer& fr, unsigned int width, unsigned int height ) override;
93 
97  virtual void renderPass
98  ( const base::math::Matrix4f& viewTransform
99  , base::RenderTask& rt
100  , const base::Viewport& vp ) override;
101 
105  const base::Color& color() const;
106 
110  void setColor( const base::Color& color );
111 
115  bool renderBorders() const;
116 
120  void setRenderBorders( bool borders );
121 
122 protected:
123 
124  virtual unsigned int loadVideoResources() override;
125 
126  virtual void createVolumeSamplers( const std::function< void( unsigned int, base::Sampler* ) >& registerSampler ) override;
127 
131  virtual const base::ShaderProgram& acquireShader() override;
132 
136  virtual const std::string& uniformName( unsigned int role ) const override;
137 
141  virtual void configureShader() override;
142 
146  virtual void configureShader( const base::Renderable& ) override;
147 
148 }; // DRRStage
149 
150 
151 
152 } // namespace Carna :: presets
153 
154 } // namespace Carna
155 
156 #endif // MASKRENDERINGSTAGE_H_6014714286
Defines logic for rendering frames from given scenes.
Definition: FrameRenderer.h:69
Maintains an OpenGL shader program. Realizes the RAII-idiom.
Definition: ShaderProgram.h:47
Invokes the rendering stages of the frame renderer successively.
Definition: RenderTask.h:40
Maintains an OpenGL texture sampler object. This class realizes the RAII-idiom.
Definition: Sampler.h:44
Defines abstract base class for rendering stages that render volume geometries in the scene...
+
const unsigned int roleMask
Holds the role that mask volume data is expected to take when attached to base::Geometry nodes...
Represents a color. Objects from this class are copyable and assignable.
Definition: Color.h:41
Eigen::Matrix< float, 4, 4, Eigen::ColMajor > Matrix4f
Defines matrix.
Definition: math.h:193
static const base::Color DEFAULT_COLOR
Holds the default rendering color.
-
const unsigned int maskRole
Holds the role that mask volume data is expected to take when attached to base::Geometry nodes...
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
Defines Carna::presets::VolumeRenderingStage.
-
static const unsigned int ROLE_DEFAULT_MASK
Holds the default value of maskRole.
+
static const unsigned int DEFAULT_ROLE_MASK
Holds the default value of roleMask.
diff --git a/docs/html/VolumeGridHelperDetails_8h.html b/docs/html/VolumeGridHelperDetails_8h.html index 96904c5a..b542b659 100644 --- a/docs/html/VolumeGridHelperDetails_8h.html +++ b/docs/html/VolumeGridHelperDetails_8h.html @@ -138,7 +138,7 @@

Classes

struct  Carna::helpers::details::VolumeGridHelper::IntensityTextureFactory< SegmentIntensityVolumeType, SegmentNormalsVolumeType > - Creates textures that represents base::VolumeSegment::intensityVolume in video memory. More...
+ Creates textures that represents base::VolumeSegment::intensities in video memory. More...
  struct  Carna::helpers::details::VolumeGridHelper::NormalsTextureFactory< SegmentIntensityVolumeType, SegmentNormalsVolumeType >  Creates textures that represents base::VolumeSegmentNormalsComponent::normals in video memory. More...
diff --git a/docs/html/VolumeGridHelperDetails_8h_source.html b/docs/html/VolumeGridHelperDetails_8h_source.html index 86e11a88..f6835fb0 100644 --- a/docs/html/VolumeGridHelperDetails_8h_source.html +++ b/docs/html/VolumeGridHelperDetails_8h_source.html @@ -74,7 +74,7 @@
VolumeGridHelperDetails.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 VOLUMEGRIDHELPERDETAILS_H_6014714286
13 #define VOLUMEGRIDHELPERDETAILS_H_6014714286
14 
15 #include <Carna/Carna.h>
16 #include <Carna/base/VolumeGrid.h>
20 #include <Carna/base/Geometry.h>
21 #include <Carna/base/Log.h>
22 #include <Carna/base/Stopwatch.h>
23 #include <Carna/base/text.h>
24 #include <map>
25 
30 namespace Carna
31 {
32 
33 namespace helpers
34 {
35 
36 namespace details
37 {
38 
43 {
44 
45 
46 
47 // ----------------------------------------------------------------------------------
48 // IntensityTextureFactory< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
49 // ----------------------------------------------------------------------------------
50 
58 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
60 {
64  typedef SegmentIntensityVolumeType SegmentIntensityVolume;
65 
69  typedef SegmentNormalsVolumeType SegmentNormalsVolume;
70 
77 };
78 
79 
80 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
83 {
85 }
86 
87 
88 
89 // ----------------------------------------------------------------------------------
90 // NormalsTextureFactory< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
91 // ----------------------------------------------------------------------------------
92 
100 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
102 {
106  typedef SegmentIntensityVolumeType SegmentIntensityVolume;
107 
111  typedef SegmentNormalsVolumeType SegmentNormalsVolume;
112 
120 };
121 
122 
123 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
126 {
128 }
129 
130 
131 
132 // ----------------------------------------------------------------------------------
133 // TextureManager< TextureFactory >
134 // ----------------------------------------------------------------------------------
135 
144 template< typename TextureFactory >
146 {
147 
149 
150  mutable std::map
151  < const base::VolumeSegment
152  < typename TextureFactory::SegmentIntensityVolume
153  , typename TextureFactory::SegmentNormalsVolume >*
154  , base::ManagedTexture3D* > textures;
155 
156 public:
157 
161  virtual ~TextureManager();
162 
166  void releaseGeometryFeatures();
167 
168 protected:
169 
174  void attachTexture
175  ( base::Geometry& geometry
176  , unsigned int role
177  , const base::VolumeSegment
178  < typename TextureFactory::SegmentIntensityVolume
179  , typename TextureFactory::SegmentNormalsVolume >& segment ) const;
180 
181 private:
182 
183  base::ManagedTexture3D& getTexture
184  ( const base::VolumeSegment
185  < typename TextureFactory::SegmentIntensityVolume
186  , typename TextureFactory::SegmentNormalsVolume >& segment ) const;
187 
188 }; // TextureManager
189 
190 
191 template< typename TextureFactory >
193 {
194  releaseGeometryFeatures();
195 }
196 
197 
198 template< typename TextureFactory >
200 {
201  for( auto itr = textures.begin(); itr != textures.end(); ++itr )
202  {
203  base::ManagedTexture3D& texture = *itr->second;
204  texture.release();
205  }
206  textures.clear();
207 }
208 
209 
210 template< typename TextureFactory >
212  ( base::Geometry& geometry
213  , unsigned int role
214  , const base::VolumeSegment
215  < typename TextureFactory::SegmentIntensityVolume
216  , typename TextureFactory::SegmentNormalsVolume >& segment ) const
217 {
218  base::ManagedTexture3D& texture = getTexture( segment );
219  geometry.putFeature( role, texture );
220 }
221 
222 
223 template< typename TextureFactory >
225  ( const base::VolumeSegment
226  < typename TextureFactory::SegmentIntensityVolume
227  , typename TextureFactory::SegmentNormalsVolume >& segment ) const
228 {
229  auto textureItr = textures.find( &segment );
230  if( textureItr == textures.end() )
231  {
232  /* Create the texture.
233  */
234  base::ManagedTexture3D& texture = TextureFactory::createTexture( segment );
235  textures[ &segment ] = &texture;
236  return texture;
237  }
238  else
239  {
240  /* Use previously created texture.
241  */
242  return *textureItr->second;
243  }
244 }
245 
246 
247 
248 // ----------------------------------------------------------------------------------
249 // IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
250 // ----------------------------------------------------------------------------------
251 
259 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
260 class IntensityComponent : public TextureManager< IntensityTextureFactory< SegmentIntensityVolumeType, SegmentNormalsVolumeType > >
261 {
262 
263  unsigned int role;
264 
265 public:
266 
271  const static unsigned int DEFAULT_ROLE_INTENSITY_VOLUME = 0;
272 
279 
284  void setIntensityVolumeRole( unsigned int role );
285 
290  unsigned int intensityVolumeRole() const;
291 
292 protected:
293 
299  void attachTexture
300  ( base::Geometry& geometry
302 
306  void initializeSegment
308  , const base::math::Vector3ui& size ) const;
309 
310 }; // IntensityComponent
311 
312 
313 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
315  : role( DEFAULT_ROLE_INTENSITY_VOLUME )
316 {
317 }
318 
319 
320 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
322 {
323  this->role = role;
324 }
325 
326 
327 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
329 {
330  return role;
331 }
332 
333 
334 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
336  ( base::Geometry& geometry
338 {
340  ::attachTexture( geometry, role, segment );
341 }
342 
343 
344 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
347  , const base::math::Vector3ui& size ) const
348 {
349  SegmentIntensityVolumeType* const intensityVolume = new SegmentIntensityVolumeType( size );
351 }
352 
353 
354 
355 // ----------------------------------------------------------------------------------
356 // NormalsComponentBase
357 // ----------------------------------------------------------------------------------
358 
366 class CARNA_LIB NormalsComponentBase
367 {
368 
369 public:
370 
374  virtual ~NormalsComponentBase();
375 
376 protected:
377 
381  virtual base::math::Vector3ui gridResolution() const = 0;
382 
383 }; // NormalsComponentBase
384 
385 
386 
387 // ----------------------------------------------------------------------------------
388 // NormalsComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
389 // ----------------------------------------------------------------------------------
390 
398 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
400  : public TextureManager< NormalsTextureFactory< SegmentIntensityVolumeType, SegmentNormalsVolumeType > >
401  , public NormalsComponentBase
402 {
403 
404  unsigned int role;
406 
407 public:
408 
413  const static unsigned int DEFAULT_ROLE_NORMALS = 1;
414 
421 
426  void setNormalsRole( unsigned int role );
427 
432  unsigned int normalsRole() const;
433 
437  void computeNormals();
438 
439 protected:
440 
445 
451  void attachTexture
452  ( base::Geometry& geometry
454 
459  void initializeSegment
461  , const base::math::Vector3ui& size ) const;
462 
463 }; // NormalsComponent
464 
465 
466 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
468  : role( DEFAULT_ROLE_NORMALS )
469 {
470 }
471 
472 
473 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
475 {
476  this->role = role;
477 }
478 
479 
480 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
482 {
483  return role;
484 }
485 
486 
487 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
489 {
490  typedef typename base::VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >:: NormalSelector NormalSelector;
492 
493  using base::math::Vector3ui;
494  using base::math::Vector3i;
495  using base::math::Vector3f;
496 
497  const base::Stopwatch stopwatch;
498  const Vector3ui resolution = gridResolution();
499 
500  /* Lets start with the normals for the edge faces of the volume, that do require
501  * an ad-hoc processing.
502  */
503  for( unsigned int dim0 = 0; dim0 < 3; ++dim0 )
504  {
505  for( signed int sign = -1; sign <= +1; sign += 2 )
506  {
507  /* Construct the normal vector along dimension 'dim0' signed with 'sign'.
508  */
509  Vector3f normal( 0, 0, 0 );
510  normal( dim0 ) = sign;
511 
512  /* Write the normal vector to the whole face.
513  */
514  const unsigned int dim1 = ( dim0 + 1 ) % 3;
515  const unsigned int dim2 = ( dim0 + 2 ) % 3;
516 
517  Vector3ui coord;
518  coord( dim0 ) = sign < 0 ? 0 : resolution( dim0 ) - 1;
519 
520  for( coord( dim1 ) = 0; coord( dim1 ) < resolution( dim1 ); ++coord( dim1 ) )
521  for( coord( dim2 ) = 0; coord( dim2 ) < resolution( dim2 ); ++coord( dim2 ) )
522  {
523  grid->template setVoxel< NormalSelector >( coord, normal );
524  }
525  }
526  }
527 
528  /* Now we can process all the inner voxels regularly.
529  */
530  const Vector3ui coordLowerBound = Vector3ui( 1, 1, 1 );
531  const Vector3ui coordUpperBound = ( resolution.cast< int >() - Vector3i( 1, 1, 1 ) ).cast< unsigned int >();
532  CARNA_FOR_VECTOR3UI_EX( coord, coordUpperBound, coordLowerBound )
533  {
534  /* Compute the gradient vector.
535  */
537  [this, &coord]( unsigned int dx, unsigned int dy, unsigned int dz )
538  {
539  return grid->template getVoxel< IntensitySelector >( Vector3ui( coord.x() + dx, coord.y() + dy, coord.z() + dz ) );
540  }
541  );
542 
543  /* The normal vector points to the *reverse* direction of the gradient, i.e.
544  * away from the steepest ascent.
545  */
546  Vector3f normal = -gradient;
547  if( normal.squaredNorm() > 1e-12 )
548  {
549  normal.normalize();
550  }
551  else
552  {
553  normal = Vector3f( 0, 0, 0 );
554  }
555  grid->template setVoxel< NormalSelector >( coord, normal );
556  }
557 
558  /* Log how long it took to compute the normals.
559  */
560  const unsigned int seconds = base::math::round_ui( stopwatch.result() );
562  , "VolumeGridHelper finished normals computation in "
563  + base::text::lexical_cast< std::string >( seconds )
564  + " seconds." );
565 }
566 
567 
568 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
571 {
572  this->grid = &grid;
573 }
574 
575 
576 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
578  ( base::Geometry& geometry
580 {
582  ::attachTexture( geometry, role, segment );
583 }
584 
585 
586 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
589  , const base::math::Vector3ui& size ) const
590 {
591  SegmentNormalsVolumeType* const normals = new SegmentNormalsVolumeType( size );
593 }
594 
595 
596 
597 // ----------------------------------------------------------------------------------
598 // NormalsComponent< SegmentIntensityVolumeType, void >
599 // ----------------------------------------------------------------------------------
600 
607 template< typename SegmentIntensityVolumeType >
608 class NormalsComponent< SegmentIntensityVolumeType, void > : public NormalsComponentBase
609 {
610 
611 public:
612 
617 
618 protected:
619 
623  void computeNormals();
624 
629 
633  void attachTexture
634  ( base::Geometry& geometry
636 
640  void initializeSegment
642  , const base::math::Vector3ui& size ) const;
643 
644 }; // NormalsComponent
645 
646 
647 template< typename SegmentIntensityVolumeType >
649 {
650 }
651 
652 
653 template< typename SegmentIntensityVolumeType >
655 {
656 }
657 
658 
659 template< typename SegmentIntensityVolumeType >
662 {
663 }
664 
665 
666 template< typename SegmentIntensityVolumeType >
668  ( base::Geometry& geometry
670 {
671 }
672 
673 
674 template< typename SegmentIntensityVolumeType >
677  , const base::math::Vector3ui& size ) const
678 {
679 }
680 
681 
682 
683 // ----------------------------------------------------------------------------------
684 // Partionining
685 // ----------------------------------------------------------------------------------
686 
694 {
702  Partionining( std::size_t nativeSize, std::size_t regularPartitionSize )
703  : regularPartitionSize( regularPartitionSize )
704  , regularPartitionsCount( nativeSize / regularPartitionSize )
705  , tailSize( base::math::makeEven( nativeSize % regularPartitionSize, +1 ) )
706  {
707  CARNA_ASSERT_EX( regularPartitionSize % 2 == 1, "Effective regular partition size must be odd!" );
708  }
709 
713  std::size_t regularPartitionSize;
714 
720 
724  std::size_t tailSize;
725 
729  std::size_t totalSize() const
730  {
731  return tailSize + regularPartitionsCount * regularPartitionSize;
732  }
733 
737  std::size_t partitionsCount() const
738  {
739  return regularPartitionsCount + ( tailSize > 0 ? 1 : 0 );
740  }
741 };
742 
743 
744 
745 } // namespace VolumeGridHelper
746 
747 } // namespace details
748 
749 } // namespace Carna :: helpers
750 
751 } // namespace Carna
752 
753 #endif // VOLUMEGRIDHELPERDETAILS_H_6014714286
base::math::Vector3f computeFastGradient3f(Sampler func)
Computes fast approximation of the gradient at the origin of the scalar field func.
Definition: math.h:580
+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 VOLUMEGRIDHELPERDETAILS_H_6014714286
13 #define VOLUMEGRIDHELPERDETAILS_H_6014714286
14 
15 #include <Carna/Carna.h>
16 #include <Carna/base/VolumeGrid.h>
20 #include <Carna/base/Geometry.h>
21 #include <Carna/base/Log.h>
22 #include <Carna/base/Stopwatch.h>
23 #include <Carna/base/text.h>
24 #include <map>
25 
30 namespace Carna
31 {
32 
33 namespace helpers
34 {
35 
36 namespace details
37 {
38 
43 {
44 
45 
46 
47 // ----------------------------------------------------------------------------------
48 // IntensityTextureFactory< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
49 // ----------------------------------------------------------------------------------
50 
58 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
60 {
64  typedef SegmentIntensityVolumeType SegmentIntensityVolume;
65 
69  typedef SegmentNormalsVolumeType SegmentNormalsVolume;
70 
77 };
78 
79 
80 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
83 {
85 }
86 
87 
88 
89 // ----------------------------------------------------------------------------------
90 // NormalsTextureFactory< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
91 // ----------------------------------------------------------------------------------
92 
100 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
102 {
106  typedef SegmentIntensityVolumeType SegmentIntensityVolume;
107 
111  typedef SegmentNormalsVolumeType SegmentNormalsVolume;
112 
120 };
121 
122 
123 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
126 {
128 }
129 
130 
131 
132 // ----------------------------------------------------------------------------------
133 // TextureManager< TextureFactory >
134 // ----------------------------------------------------------------------------------
135 
144 template< typename TextureFactory >
146 {
147 
149 
150  mutable std::map
151  < const base::VolumeSegment
152  < typename TextureFactory::SegmentIntensityVolume
153  , typename TextureFactory::SegmentNormalsVolume >*
154  , base::ManagedTexture3D* > textures;
155 
156 public:
157 
161  virtual ~TextureManager();
162 
166  void releaseGeometryFeatures();
167 
168 protected:
169 
174  void attachTexture
175  ( base::Geometry& geometry
176  , unsigned int role
177  , const base::VolumeSegment
178  < typename TextureFactory::SegmentIntensityVolume
179  , typename TextureFactory::SegmentNormalsVolume >& segment ) const;
180 
181 private:
182 
183  base::ManagedTexture3D& getTexture
184  ( const base::VolumeSegment
185  < typename TextureFactory::SegmentIntensityVolume
186  , typename TextureFactory::SegmentNormalsVolume >& segment ) const;
187 
188 }; // TextureManager
189 
190 
191 template< typename TextureFactory >
193 {
194  releaseGeometryFeatures();
195 }
196 
197 
198 template< typename TextureFactory >
200 {
201  for( auto itr = textures.begin(); itr != textures.end(); ++itr )
202  {
203  base::ManagedTexture3D& texture = *itr->second;
204  texture.release();
205  }
206  textures.clear();
207 }
208 
209 
210 template< typename TextureFactory >
212  ( base::Geometry& geometry
213  , unsigned int role
214  , const base::VolumeSegment
215  < typename TextureFactory::SegmentIntensityVolume
216  , typename TextureFactory::SegmentNormalsVolume >& segment ) const
217 {
218  base::ManagedTexture3D& texture = getTexture( segment );
219  geometry.putFeature( role, texture );
220 }
221 
222 
223 template< typename TextureFactory >
225  ( const base::VolumeSegment
226  < typename TextureFactory::SegmentIntensityVolume
227  , typename TextureFactory::SegmentNormalsVolume >& segment ) const
228 {
229  auto textureItr = textures.find( &segment );
230  if( textureItr == textures.end() )
231  {
232  /* Create the texture.
233  */
234  base::ManagedTexture3D& texture = TextureFactory::createTexture( segment );
235  textures[ &segment ] = &texture;
236  return texture;
237  }
238  else
239  {
240  /* Use previously created texture.
241  */
242  return *textureItr->second;
243  }
244 }
245 
246 
247 
248 // ----------------------------------------------------------------------------------
249 // IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
250 // ----------------------------------------------------------------------------------
251 
259 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
260 class IntensityComponent : public TextureManager< IntensityTextureFactory< SegmentIntensityVolumeType, SegmentNormalsVolumeType > >
261 {
262 
263  unsigned int role;
264 
265 public:
266 
271  const static unsigned int DEFAULT_ROLE_INTENSITIES = 0;
272 
279 
284  void setIntensitiesRole( unsigned int role );
285 
290  unsigned int intensitiesRole() const;
291 
292 protected:
293 
299  void attachTexture
300  ( base::Geometry& geometry
302 
306  void initializeSegment
308  , const base::math::Vector3ui& size ) const;
309 
310 }; // IntensityComponent
311 
312 
313 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
315  : role( DEFAULT_ROLE_INTENSITIES )
316 {
317 }
318 
319 
320 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
322 {
323  this->role = role;
324 }
325 
326 
327 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
329 {
330  return role;
331 }
332 
333 
334 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
336  ( base::Geometry& geometry
338 {
340  ::attachTexture( geometry, role, segment );
341 }
342 
343 
344 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
347  , const base::math::Vector3ui& size ) const
348 {
349  SegmentIntensityVolumeType* const intensities = new SegmentIntensityVolumeType( size );
351 }
352 
353 
354 
355 // ----------------------------------------------------------------------------------
356 // NormalsComponentBase
357 // ----------------------------------------------------------------------------------
358 
366 class CARNA_LIB NormalsComponentBase
367 {
368 
369 public:
370 
374  virtual ~NormalsComponentBase();
375 
376 protected:
377 
381  virtual base::math::Vector3ui gridResolution() const = 0;
382 
383 }; // NormalsComponentBase
384 
385 
386 
387 // ----------------------------------------------------------------------------------
388 // NormalsComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
389 // ----------------------------------------------------------------------------------
390 
398 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
400  : public TextureManager< NormalsTextureFactory< SegmentIntensityVolumeType, SegmentNormalsVolumeType > >
401  , public NormalsComponentBase
402 {
403 
404  unsigned int role;
406 
407 public:
408 
413  const static unsigned int DEFAULT_ROLE_NORMALS = 1;
414 
421 
426  void setNormalsRole( unsigned int role );
427 
432  unsigned int normalsRole() const;
433 
437  void computeNormals();
438 
439 protected:
440 
445 
451  void attachTexture
452  ( base::Geometry& geometry
454 
459  void initializeSegment
461  , const base::math::Vector3ui& size ) const;
462 
463 }; // NormalsComponent
464 
465 
466 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
468  : role( DEFAULT_ROLE_NORMALS )
469 {
470 }
471 
472 
473 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
475 {
476  this->role = role;
477 }
478 
479 
480 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
482 {
483  return role;
484 }
485 
486 
487 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
489 {
490  typedef typename base::VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >:: NormalSelector NormalSelector;
492 
493  using base::math::Vector3ui;
494  using base::math::Vector3i;
495  using base::math::Vector3f;
496 
497  const base::Stopwatch stopwatch;
498  const Vector3ui resolution = gridResolution();
499 
500  /* Lets start with the normals for the edge faces of the volume, that do require
501  * an ad-hoc processing.
502  */
503  for( unsigned int dim0 = 0; dim0 < 3; ++dim0 )
504  {
505  for( signed int sign = -1; sign <= +1; sign += 2 )
506  {
507  /* Construct the normal vector along dimension 'dim0' signed with 'sign'.
508  */
509  Vector3f normal( 0, 0, 0 );
510  normal( dim0 ) = sign;
511 
512  /* Write the normal vector to the whole face.
513  */
514  const unsigned int dim1 = ( dim0 + 1 ) % 3;
515  const unsigned int dim2 = ( dim0 + 2 ) % 3;
516 
517  Vector3ui coord;
518  coord( dim0 ) = sign < 0 ? 0 : resolution( dim0 ) - 1;
519 
520  for( coord( dim1 ) = 0; coord( dim1 ) < resolution( dim1 ); ++coord( dim1 ) )
521  for( coord( dim2 ) = 0; coord( dim2 ) < resolution( dim2 ); ++coord( dim2 ) )
522  {
523  grid->template setVoxel< NormalSelector >( coord, normal );
524  }
525  }
526  }
527 
528  /* Now we can process all the inner voxels regularly.
529  */
530  const Vector3ui coordLowerBound = Vector3ui( 1, 1, 1 );
531  const Vector3ui coordUpperBound = ( resolution.cast< int >() - Vector3i( 1, 1, 1 ) ).cast< unsigned int >();
532  CARNA_FOR_VECTOR3UI_EX( coord, coordUpperBound, coordLowerBound )
533  {
534  /* Compute the gradient vector.
535  */
537  [this, &coord]( unsigned int dx, unsigned int dy, unsigned int dz )
538  {
539  return grid->template getVoxel< IntensitySelector >( Vector3ui( coord.x() + dx, coord.y() + dy, coord.z() + dz ) );
540  }
541  );
542 
543  /* The normal vector points to the *reverse* direction of the gradient, i.e.
544  * away from the steepest ascent.
545  */
546  Vector3f normal = -gradient;
547  if( normal.squaredNorm() > 1e-12 )
548  {
549  normal.normalize();
550  }
551  else
552  {
553  normal = Vector3f( 0, 0, 0 );
554  }
555  grid->template setVoxel< NormalSelector >( coord, normal );
556  }
557 
558  /* Log how long it took to compute the normals.
559  */
560  const unsigned int seconds = base::math::round_ui( stopwatch.result() );
562  , "VolumeGridHelper finished normals computation in "
563  + base::text::lexical_cast< std::string >( seconds )
564  + " seconds." );
565 }
566 
567 
568 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
571 {
572  this->grid = &grid;
573 }
574 
575 
576 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
578  ( base::Geometry& geometry
580 {
582  ::attachTexture( geometry, role, segment );
583 }
584 
585 
586 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
589  , const base::math::Vector3ui& size ) const
590 {
591  SegmentNormalsVolumeType* const normals = new SegmentNormalsVolumeType( size );
593 }
594 
595 
596 
597 // ----------------------------------------------------------------------------------
598 // NormalsComponent< SegmentIntensityVolumeType, void >
599 // ----------------------------------------------------------------------------------
600 
607 template< typename SegmentIntensityVolumeType >
608 class NormalsComponent< SegmentIntensityVolumeType, void > : public NormalsComponentBase
609 {
610 
611 public:
612 
617 
618 protected:
619 
623  void computeNormals();
624 
629 
633  void attachTexture
634  ( base::Geometry& geometry
636 
640  void initializeSegment
642  , const base::math::Vector3ui& size ) const;
643 
644 }; // NormalsComponent
645 
646 
647 template< typename SegmentIntensityVolumeType >
649 {
650 }
651 
652 
653 template< typename SegmentIntensityVolumeType >
655 {
656 }
657 
658 
659 template< typename SegmentIntensityVolumeType >
662 {
663 }
664 
665 
666 template< typename SegmentIntensityVolumeType >
668  ( base::Geometry& geometry
670 {
671 }
672 
673 
674 template< typename SegmentIntensityVolumeType >
677  , const base::math::Vector3ui& size ) const
678 {
679 }
680 
681 
682 
683 // ----------------------------------------------------------------------------------
684 // Partionining
685 // ----------------------------------------------------------------------------------
686 
694 {
702  Partionining( std::size_t nativeSize, std::size_t regularPartitionSize )
703  : regularPartitionSize( regularPartitionSize )
704  , regularPartitionsCount( nativeSize / regularPartitionSize )
705  , tailSize( base::math::makeEven( nativeSize % regularPartitionSize, +1 ) )
706  {
707  CARNA_ASSERT_EX( regularPartitionSize % 2 == 1, "Effective regular partition size must be odd!" );
708  }
709 
713  std::size_t regularPartitionSize;
714 
720 
724  std::size_t tailSize;
725 
729  std::size_t totalSize() const
730  {
731  return tailSize + regularPartitionsCount * regularPartitionSize;
732  }
733 
737  std::size_t partitionsCount() const
738  {
739  return regularPartitionsCount + ( tailSize > 0 ? 1 : 0 );
740  }
741 };
742 
743 
744 
745 } // namespace VolumeGridHelper
746 
747 } // namespace details
748 
749 } // namespace Carna :: helpers
750 
751 } // namespace Carna
752 
753 #endif // VOLUMEGRIDHELPERDETAILS_H_6014714286
base::math::Vector3f computeFastGradient3f(Sampler func)
Computes fast approximation of the gradient at the origin of the scalar field func.
Definition: math.h:580
std::size_t partitionsCount() const
Tells the total partitions number.
unsigned int round_ui(ScalarType x)
Rounds x to the closest . Either the data type of must be unsigned or .
Definition: math.h:597
void putFeature(unsigned int role, GeometryFeature &feature)
Adds the feature to this geometry node using role in . The concept of geometry features and roles is ...
@@ -90,10 +90,9 @@
Provides mapping base::VolumeSegment to base::ManagedTexture3D objects in a caching manner...
void initializeSegment(base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType > &segment, const base::math::Vector3ui &size) const
Initializes normal map of segment.
#define CARNA_ASSERT_EX(expression, description)
If the given expression is false, a break point is raised in debug mode and an AssertionFailure throw...
-
SegmentIntensityVolumeType & intensityVolume()
References the intensity volume data of this partition.
double result() const
Tells result in seconds from current time measurement.
Implements stopwatch using the robust wallclock time from OMP that most compilers support...
Definition: Stopwatch.h:40
-
void attachTexture(base::Geometry &geometry, const base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType > &segment) const
Attaches the texture that represents the base::VolumeSegment::intensityVolume of segment to geometry ...
+
void attachTexture(base::Geometry &geometry, const base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType > &segment) const
Attaches the texture that represents the base::VolumeSegment::intensities of segment to geometry usin...
Eigen::Matrix< unsigned int, 3, 1 > Vector3ui
Defines vector.
Definition: math.h:199
Represents a single volumetric data partition.
static BufferedVectorFieldTexture< BufferedVectorFieldType > & create(const BufferedVectorFieldType &field)
Instantiates. Invoke release when it isn&#39;t needed any longer.
@@ -110,11 +109,10 @@
Defines the NormalsComponent base class that is independent of type arguments.
Defines Carna::base::VolumeGrid.
static Log & instance()
Returns the only instance from class InstanceType.
Definition: Singleton.h:109
+
void setIntensitiesRole(unsigned int role)
Sets the role to use for attaching textures to base::Geometry nodes.
void attachTexture(base::Geometry &geometry, unsigned int role, const base::VolumeSegment< typename TextureFactory::SegmentIntensityVolume, typename TextureFactory::SegmentNormalsVolume > &segment) const
Attaches the texture that TextureFactory creates from segment to geometry using role.
-
void setIntensityVolume(Association< SegmentIntensityVolumeType > *intensityVolume)
Sets the intensity volume data of this partition.
#define CARNA_FOR_VECTOR3UI_EX(vecName, vecLimit, vecStart)
Loops vecName over all where is vecLimit and is vecStart.
Definition: math.h:733
-
static base::ManagedTexture3D & createTexture(const base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType > &segment)
Creates texture that represents the base::VolumeSegment::intensityVolume of segment in video memory...
-
void setIntensityVolumeRole(unsigned int role)
Sets the role to use for attaching textures to base::Geometry nodes.
+
static base::ManagedTexture3D & createTexture(const base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType > &segment)
Creates texture that represents the base::VolumeSegment::intensities of segment in video memory...
SegmentIntensityVolumeType SegmentIntensityVolume
Reflects the type to use for storing the intensity volume of a single partition.
void computeNormals()
Computes the normal map on the previously set grid.
NormalsComponent()
Sets the role to use for attaching textures to base::Geometry nodes to DEFAULT_ROLE_NORMALS.
@@ -126,6 +124,7 @@
Defines Carna::base::VolumeSegment.
Defines Carna::base::Stopwatch.
+
SegmentIntensityVolumeType & intensities()
References the intensity volume data of this partition.
void setGrid(base::VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType > &grid)
Sets the grid that computeNormals operates on.
virtual ~TextureManager()
Releases all textures and deletes.
Computes the partitioning of volumetric data and the corresponding normal map. Also creates scene nod...
Definition: Carna.h:216
@@ -133,7 +132,8 @@
std::size_t regularPartitionsCount
Holds the number of regular partitions, i.e. such of the size held by regularPartitionSize.
void record(Severity severity, const std::string &entry) const
Instructs current writer to write entry with severity.
std::size_t totalSize() const
Computes the effective total resolution.
-
IntensityComponent()
Sets the role to use for attaching textures to base::Geometry nodes to DEFAULT_ROLE_INTENSITY_VOLUME...
+
IntensityComponent()
Sets the role to use for attaching textures to base::Geometry nodes to DEFAULT_ROLE_INTENSITIES.
+
void setIntensities(Association< SegmentIntensityVolumeType > *intensities)
Sets the intensity volume data of this partition.
Computes the partitioning that VolumeGridHelper uses along one dimension.
virtual base::math::Vector3ui gridResolution() const =0
Tells the effective grid resolution.
#define NON_COPYABLE
Features class it is placed in as non-copyable.
Definition: noncopyable.h:109
@@ -142,9 +142,9 @@
Defines Carna::base::Geometry.
Represents a particular partitioning of volumetric data.
Definition: VolumeGrid.h:63
-
Creates textures that represents base::VolumeSegment::intensityVolume in video memory.
+
unsigned int intensitiesRole() const
Tels the role used for attaching textures to base::Geometry nodes.
+
Creates textures that represents base::VolumeSegment::intensities in video memory.
void setNormalsRole(unsigned int role)
Sets the role to use for attaching textures to base::Geometry nodes.
-
unsigned int intensityVolumeRole() const
Tels the role used for attaching textures to base::Geometry nodes.
Eigen::Matrix< signed int, 3, 1 > Vector3i
Defines vector.
Definition: math.h:198
diff --git a/docs/html/VolumeGridHelper_8h_source.html b/docs/html/VolumeGridHelper_8h_source.html index b4949c81..c110f8c7 100644 --- a/docs/html/VolumeGridHelper_8h_source.html +++ b/docs/html/VolumeGridHelper_8h_source.html @@ -74,7 +74,7 @@
VolumeGridHelper.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 VOLUMEGRIDHELPER_H_6014714286
13 #define VOLUMEGRIDHELPER_H_6014714286
14 
16 #include <Carna/Carna.h>
17 #include <Carna/base/Node.h>
18 #include <Carna/base/math.h>
19 #include <Carna/base/VolumeGrid.h>
21 #include <Carna/base/Geometry.h>
22 #include <Carna/base/BoundingBox.h>
23 #include <memory>
24 #include <cmath>
25 
30 namespace Carna
31 {
32 
33 namespace helpers
34 {
35 
36 
37 
38 // ----------------------------------------------------------------------------------
39 // VolumeGridHelperBase
40 // ----------------------------------------------------------------------------------
41 
48 class CARNA_LIB VolumeGridHelperBase
49 {
50 
51 public:
52 
59  const static std::size_t DEFAULT_MAX_SEGMENT_BYTESIZE = 2 * 300 * 300 * 300;
60 
68  VolumeGridHelperBase( const base::math::Vector3ui& nativeResolution );
69 
74 
78  virtual ~VolumeGridHelperBase();
79 
86  virtual void releaseGeometryFeatures() = 0;
87 
91  struct CARNA_LIB Spacing
92  {
96  explicit Spacing( const base::math::Vector3f& millimeters );
97 
102  };
103 
107  struct CARNA_LIB Dimensions
108  {
112  explicit Dimensions( const base::math::Vector3f& millimeters );
113 
118  };
119 
136  virtual base::Node* createNode( unsigned int geometryType, const Spacing& spacing ) const = 0;
137 
153  virtual base::Node* createNode( unsigned int geometryType, const Dimensions& dimensions ) const = 0;
154 
160  virtual void loadIntensities( const std::function< float( const base::math::Vector3ui& ) >& intensityData ) = 0;
161 
164  template< typename LoadIntensitiesFunction >
165  void loadIntensities( const LoadIntensitiesFunction& intensityData );
166 
172  void loadHUData( const std::function< base::HUV( const base::math::Vector3ui& ) >& huData );
173 
176  template< typename LoadHUDataFunction >
177  void loadHUData( const LoadHUDataFunction& huData );
178 
179 }; // VolumeGridHelperBase
180 
181 
182 template< typename LoadIntensitiesFunction >
183 void VolumeGridHelperBase::loadIntensities( const LoadIntensitiesFunction& intensityData )
184 {
185  loadIntensities( static_cast< const std::function< float( const base::math::Vector3ui& ) >& >
186  (
187  [&intensityData]( const base::math::Vector3ui& loc ) -> float
188  {
189  return intensityData( loc );
190  }
191  )
192  );
193 }
194 
195 
196 template< typename LoadHUDataFunction >
197 void VolumeGridHelperBase::loadHUData( const LoadHUDataFunction& huData )
198 {
199  loadHUData( static_cast< const std::function< base::HUV( const base::math::Vector3ui& ) >& >
200  (
201  [&huData]( const base::math::Vector3ui& loc )
202  {
203  return huData( loc );
204  }
205  )
206  );
207 }
208 
209 
210 
211 // ----------------------------------------------------------------------------------
212 // VolumeGridHelper
213 // ----------------------------------------------------------------------------------
214 
253 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
254 class VolumeGridHelper
255  : public VolumeGridHelperBase
256  , public details::VolumeGridHelper::IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
257  , public details::VolumeGridHelper:: NormalsComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
258 {
259 
261 
263  typedef details::VolumeGridHelper:: NormalsComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType > NormalsComponent;
264 
268  std::unique_ptr< base::VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType > > myGrid;
269 
270 public:
271 
272  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
273 
287  VolumeGridHelper( const base::math::Vector3ui& nativeResolution, std::size_t maxSegmentBytesize = DEFAULT_MAX_SEGMENT_BYTESIZE );
288 
292  const std::size_t maxSegmentBytesize;
293 
298 
303 
308 
313 
318 
330  virtual void loadIntensities( const std::function< float( const base::math::Vector3ui& ) >& intensityData ) override;
331 
342  virtual void releaseGeometryFeatures() override;
343 
348 
349  virtual base::Node* createNode( unsigned int geometryType, const Spacing& spacing ) const override;
350 
351  virtual base::Node* createNode( unsigned int geometryType, const Dimensions& dimensions ) const override;
352 
353 protected:
354 
355  virtual base::math::Vector3ui gridResolution() const override;
356 
357 private:
358 
359  base::Node* createNode
360  ( unsigned int geometryType
361  , const Spacing& spacing
362  , const Dimensions& dimensions ) const;
363 
364  static base::math::Vector3ui computeMaxSegmentSize( const base::math::Vector3ui& nativeResolution, std::size_t maxSegmentBytesize );
365 
366 }; // VolumeGridHelper
367 
368 
369 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
371  ( const base::math::Vector3ui& nativeResolution, std::size_t maxSegmentBytesize )
372 {
373  const float maxSideLengthF = std::pow
374  ( maxSegmentBytesize / static_cast< float >( sizeof( typename SegmentIntensityVolumeType::Voxel ) ), 1.f / 3 );
375  const unsigned int maxSideLength = base::math::makeEven( base::math::round_ui( maxSideLengthF ), -1 );
376 
377  /* We subtract the redundant texels from effective segment size.
378  * Note that this causes the effective maximum segment size to be odd.
379  */
380  return base::math::Vector3ui( maxSideLength - 1, maxSideLength - 1, maxSideLength - 1 );
381 }
382 
383 
384 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
386  ( const base::math::Vector3ui& nativeResolution
387  , std::size_t maxSegmentBytesize )
388  : VolumeGridHelperBase( nativeResolution )
389  , maxSegmentBytesize( maxSegmentBytesize )
390  , maxSegmentSize( computeMaxSegmentSize( nativeResolution, maxSegmentBytesize ) )
391  , partitioningX( nativeResolution.x(), maxSegmentSize.x() )
392  , partitioningY( nativeResolution.y(), maxSegmentSize.y() )
393  , partitioningZ( nativeResolution.z(), maxSegmentSize.z() )
394  , resolution( partitioningX.totalSize(), partitioningY.totalSize(), partitioningZ.totalSize() )
395 {
396  const base::math::Vector3ui segmentCounts
397  ( partitioningX.partitionsCount()
398  , partitioningY.partitionsCount()
399  , partitioningZ.partitionsCount() );
400  myGrid.reset( new base::VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >( maxSegmentSize, segmentCounts ) );
401  NormalsComponent::setGrid( *myGrid );
402 
403  CARNA_FOR_VECTOR3UI( segmentCoord, myGrid->segmentCounts )
404  {
405  /* Here we add the redundant texels to the buffer size considerations.
406  */
407  const base::math::Vector3ui segmentSize
408  ( segmentCoord.x() + 1 == myGrid->segmentCounts.x() ? partitioningX.tailSize : partitioningX.regularPartitionSize + 1
409  , segmentCoord.y() + 1 == myGrid->segmentCounts.y() ? partitioningY.tailSize : partitioningY.regularPartitionSize + 1
410  , segmentCoord.z() + 1 == myGrid->segmentCounts.z() ? partitioningZ.tailSize : partitioningZ.regularPartitionSize + 1 );
411 
412  IntensityComponent::initializeSegment( myGrid->segmentAt( segmentCoord ), segmentSize );
413  NormalsComponent ::initializeSegment( myGrid->segmentAt( segmentCoord ), segmentSize );
414  }
415 }
416 
417 
418 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
420 {
421  IntensityComponent::releaseGeometryFeatures();
422  NormalsComponent ::releaseGeometryFeatures();
423 }
424 
425 
426 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
428  ( const std::function< float( const base::math::Vector3ui& ) >& data )
429 {
430  releaseGeometryFeatures();
431  CARNA_FOR_VECTOR3UI( coord, resolution )
432  {
433  const bool outOfNativeBounds
434  = coord.x() >= nativeResolution.x()
435  || coord.y() >= nativeResolution.y()
436  || coord.z() >= nativeResolution.z();
437  const float intensity = outOfNativeBounds ? 0 : data( coord );
438  myGrid->template setVoxel< typename base::VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::IntensitySelector >( coord, intensity );
439  }
440  NormalsComponent::computeNormals();
441 }
442 
443 
444 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
447 {
448  return *myGrid;
449 }
450 
451 
452 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
454  ( unsigned int geometryType, const Spacing& spacing, const Dimensions& dimensions ) const
455 {
456  /* Compute dimensions of a regular grid segment,
457  * taking the redundant texels into account.
458  */
459  const base::math::Vector3f regularSegmentDimensions = dimensions.millimeters.cwiseMin( base::math::Vector3f
460  ( spacing.millimeters.x() * partitioningX.regularPartitionSize
461  , spacing.millimeters.y() * partitioningY.regularPartitionSize
462  , spacing.millimeters.z() * partitioningZ.regularPartitionSize ) );
463 
464  /* Create pivot node that shifts it's children to a corner.
465  */
466  base::Node* const pivot = new base::Node();
467  pivot->localTransform = base::math::translation4f( ( regularSegmentDimensions - dimensions.millimeters ) / 2 );
468  pivot->setMovable( false );
469 
470  /* Create geometry nodes for all grid segments.
471  */
472  CARNA_FOR_VECTOR3UI( segmentCoord, myGrid->segmentCounts )
473  {
474  const base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >& segment = myGrid->segmentAt( segmentCoord );
475 
476  /* Compute dimensions of particular grid segment.
477  */
478  const bool isTail =
479  segmentCoord.x() + 1 == myGrid->segmentCounts.x()
480  || segmentCoord.y() + 1 == myGrid->segmentCounts.y()
481  || segmentCoord.z() + 1 == myGrid->segmentCounts.z();
482  const base::math::Vector3ui& volumeSize = segment.intensityVolume().size;
483  const base::math::Vector3f dimensions = !isTail ? regularSegmentDimensions
484  : ( ( volumeSize.cast< int >() - base::math::Vector3i( 1, 1, 1 ) )
485  .cast< float >().cwiseProduct( spacing.millimeters ) );
486 
487  /* Create geometry node for particular grid segment.
488  */
489  base::Geometry* const geom = new base::Geometry( geometryType );
490  pivot->attachChild( geom );
491  IntensityComponent::attachTexture( *geom, segment );
492  NormalsComponent ::attachTexture( *geom, segment );
493  geom->setMovable( false );
494  geom->setBoundingVolume( new base::BoundingBox( 1, 1, 1 ) );
495  geom->localTransform
496  = base::math::translation4f( segmentCoord.cast< float >().cwiseProduct( regularSegmentDimensions )
497  - ( !isTail
498  ? base::math::Vector3f( 0, 0, 0 )
499  : ( regularSegmentDimensions - dimensions ) / 2 ) )
500  * base::math::scaling4f( dimensions );
501  }
502 
503  /* We're done.
504  */
505  return pivot;
506 }
507 
508 
509 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
511  ( unsigned int geometryType, const Spacing& spacing ) const
512 {
513  const base::math::Vector3f dimensions
514  = ( resolution.cast< int >() - base::math::Vector3i( 1, 1, 1 ) ).cast< float >().cwiseProduct( spacing.millimeters );
515  return createNode( geometryType, spacing, Dimensions( dimensions ) );
516 }
517 
518 
519 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
521  ( unsigned int geometryType, const Dimensions& dimensions ) const
522 {
523  const base::math::Vector3f& mmDimensions = dimensions.millimeters;
524  const base::math::Vector3f spacing
525  = mmDimensions.cast< float >().cwiseQuotient( ( resolution.cast< int >() - base::math::Vector3i( 1, 1, 1 ) ).cast< float >() );
526  return createNode( geometryType, Spacing( spacing ), dimensions );
527 }
528 
529 
530 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
532 {
533  return resolution;
534 }
535 
536 
537 
538 } // namespace Carna :: helpers
539 
540 } // namespace Carna
541 
542 #endif // VOLUMEGRIDHELPER_H_6014714286
Defines Carna::base::math namespace and CARNA_FOR_VECTOR3UI.
+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 VOLUMEGRIDHELPER_H_6014714286
13 #define VOLUMEGRIDHELPER_H_6014714286
14 
16 #include <Carna/Carna.h>
17 #include <Carna/base/Node.h>
18 #include <Carna/base/math.h>
19 #include <Carna/base/VolumeGrid.h>
21 #include <Carna/base/Geometry.h>
22 #include <Carna/base/BoundingBox.h>
23 #include <memory>
24 #include <cmath>
25 
30 namespace Carna
31 {
32 
33 namespace helpers
34 {
35 
36 
37 
38 // ----------------------------------------------------------------------------------
39 // VolumeGridHelperBase
40 // ----------------------------------------------------------------------------------
41 
48 class CARNA_LIB VolumeGridHelperBase
49 {
50 
51 public:
52 
59  const static std::size_t DEFAULT_MAX_SEGMENT_BYTESIZE = 2 * 300 * 300 * 300;
60 
68  VolumeGridHelperBase( const base::math::Vector3ui& nativeResolution );
69 
74 
78  virtual ~VolumeGridHelperBase();
79 
86  virtual void releaseGeometryFeatures() = 0;
87 
91  struct CARNA_LIB Spacing
92  {
96  explicit Spacing( const base::math::Vector3f& millimeters );
97 
102  };
103 
107  struct CARNA_LIB Dimensions
108  {
112  explicit Dimensions( const base::math::Vector3f& millimeters );
113 
118  };
119 
136  virtual base::Node* createNode( unsigned int geometryType, const Spacing& spacing ) const = 0;
137 
153  virtual base::Node* createNode( unsigned int geometryType, const Dimensions& dimensions ) const = 0;
154 
160  virtual void loadIntensities( const std::function< float( const base::math::Vector3ui& ) >& intensityData ) = 0;
161 
164  template< typename LoadIntensitiesFunction >
165  void loadIntensities( const LoadIntensitiesFunction& intensityData );
166 
172  void loadHUData( const std::function< base::HUV( const base::math::Vector3ui& ) >& huData );
173 
176  template< typename LoadHUDataFunction >
177  void loadHUData( const LoadHUDataFunction& huData );
178 
179 }; // VolumeGridHelperBase
180 
181 
182 template< typename LoadIntensitiesFunction >
183 void VolumeGridHelperBase::loadIntensities( const LoadIntensitiesFunction& intensityData )
184 {
185  loadIntensities( static_cast< const std::function< float( const base::math::Vector3ui& ) >& >
186  (
187  [&intensityData]( const base::math::Vector3ui& loc ) -> float
188  {
189  return intensityData( loc );
190  }
191  )
192  );
193 }
194 
195 
196 template< typename LoadHUDataFunction >
197 void VolumeGridHelperBase::loadHUData( const LoadHUDataFunction& huData )
198 {
199  loadHUData( static_cast< const std::function< base::HUV( const base::math::Vector3ui& ) >& >
200  (
201  [&huData]( const base::math::Vector3ui& loc )
202  {
203  return huData( loc );
204  }
205  )
206  );
207 }
208 
209 
210 
211 // ----------------------------------------------------------------------------------
212 // VolumeGridHelper
213 // ----------------------------------------------------------------------------------
214 
253 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
254 class VolumeGridHelper
255  : public VolumeGridHelperBase
256  , public details::VolumeGridHelper::IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
257  , public details::VolumeGridHelper:: NormalsComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
258 {
259 
261 
263  typedef details::VolumeGridHelper:: NormalsComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType > NormalsComponent;
264 
268  std::unique_ptr< base::VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType > > myGrid;
269 
270 public:
271 
272  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
273 
287  VolumeGridHelper( const base::math::Vector3ui& nativeResolution, std::size_t maxSegmentBytesize = DEFAULT_MAX_SEGMENT_BYTESIZE );
288 
292  const std::size_t maxSegmentBytesize;
293 
298 
303 
308 
313 
318 
330  virtual void loadIntensities( const std::function< float( const base::math::Vector3ui& ) >& intensityData ) override;
331 
342  virtual void releaseGeometryFeatures() override;
343 
348 
349  virtual base::Node* createNode( unsigned int geometryType, const Spacing& spacing ) const override;
350 
351  virtual base::Node* createNode( unsigned int geometryType, const Dimensions& dimensions ) const override;
352 
353 protected:
354 
355  virtual base::math::Vector3ui gridResolution() const override;
356 
357 private:
358 
359  base::Node* createNode
360  ( unsigned int geometryType
361  , const Spacing& spacing
362  , const Dimensions& dimensions ) const;
363 
364  static base::math::Vector3ui computeMaxSegmentSize( const base::math::Vector3ui& nativeResolution, std::size_t maxSegmentBytesize );
365 
366 }; // VolumeGridHelper
367 
368 
369 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
371  ( const base::math::Vector3ui& nativeResolution, std::size_t maxSegmentBytesize )
372 {
373  const float maxSideLengthF = std::pow
374  ( maxSegmentBytesize / static_cast< float >( sizeof( typename SegmentIntensityVolumeType::Voxel ) ), 1.f / 3 );
375  const unsigned int maxSideLength = base::math::makeEven( base::math::round_ui( maxSideLengthF ), -1 );
376 
377  /* We subtract the redundant texels from effective segment size.
378  * Note that this causes the effective maximum segment size to be odd.
379  */
380  return base::math::Vector3ui( maxSideLength - 1, maxSideLength - 1, maxSideLength - 1 );
381 }
382 
383 
384 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
386  ( const base::math::Vector3ui& nativeResolution
387  , std::size_t maxSegmentBytesize )
388  : VolumeGridHelperBase( nativeResolution )
389  , maxSegmentBytesize( maxSegmentBytesize )
390  , maxSegmentSize( computeMaxSegmentSize( nativeResolution, maxSegmentBytesize ) )
391  , partitioningX( nativeResolution.x(), maxSegmentSize.x() )
392  , partitioningY( nativeResolution.y(), maxSegmentSize.y() )
393  , partitioningZ( nativeResolution.z(), maxSegmentSize.z() )
394  , resolution( partitioningX.totalSize(), partitioningY.totalSize(), partitioningZ.totalSize() )
395 {
396  const base::math::Vector3ui segmentCounts
397  ( partitioningX.partitionsCount()
398  , partitioningY.partitionsCount()
399  , partitioningZ.partitionsCount() );
400  myGrid.reset( new base::VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >( maxSegmentSize, segmentCounts ) );
401  NormalsComponent::setGrid( *myGrid );
402 
403  CARNA_FOR_VECTOR3UI( segmentCoord, myGrid->segmentCounts )
404  {
405  /* Here we add the redundant texels to the buffer size considerations.
406  */
407  const base::math::Vector3ui segmentSize
408  ( segmentCoord.x() + 1 == myGrid->segmentCounts.x() ? partitioningX.tailSize : partitioningX.regularPartitionSize + 1
409  , segmentCoord.y() + 1 == myGrid->segmentCounts.y() ? partitioningY.tailSize : partitioningY.regularPartitionSize + 1
410  , segmentCoord.z() + 1 == myGrid->segmentCounts.z() ? partitioningZ.tailSize : partitioningZ.regularPartitionSize + 1 );
411 
412  IntensityComponent::initializeSegment( myGrid->segmentAt( segmentCoord ), segmentSize );
413  NormalsComponent ::initializeSegment( myGrid->segmentAt( segmentCoord ), segmentSize );
414  }
415 }
416 
417 
418 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
420 {
421  IntensityComponent::releaseGeometryFeatures();
422  NormalsComponent ::releaseGeometryFeatures();
423 }
424 
425 
426 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
428  ( const std::function< float( const base::math::Vector3ui& ) >& data )
429 {
430  releaseGeometryFeatures();
431  CARNA_FOR_VECTOR3UI( coord, resolution )
432  {
433  const bool outOfNativeBounds
434  = coord.x() >= nativeResolution.x()
435  || coord.y() >= nativeResolution.y()
436  || coord.z() >= nativeResolution.z();
437  const float intensity = outOfNativeBounds ? 0 : data( coord );
438  myGrid->template setVoxel< typename base::VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::IntensitySelector >( coord, intensity );
439  }
440  NormalsComponent::computeNormals();
441 }
442 
443 
444 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
447 {
448  return *myGrid;
449 }
450 
451 
452 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
454  ( unsigned int geometryType, const Spacing& spacing, const Dimensions& dimensions ) const
455 {
456  /* Compute dimensions of a regular grid segment,
457  * taking the redundant texels into account.
458  */
459  const base::math::Vector3f regularSegmentDimensions = dimensions.millimeters.cwiseMin( base::math::Vector3f
460  ( spacing.millimeters.x() * partitioningX.regularPartitionSize
461  , spacing.millimeters.y() * partitioningY.regularPartitionSize
462  , spacing.millimeters.z() * partitioningZ.regularPartitionSize ) );
463 
464  /* Create pivot node that shifts it's children to a corner.
465  */
466  base::Node* const pivot = new base::Node();
467  pivot->localTransform = base::math::translation4f( ( regularSegmentDimensions - dimensions.millimeters ) / 2 );
468  pivot->setMovable( false );
469 
470  /* Create geometry nodes for all grid segments.
471  */
472  CARNA_FOR_VECTOR3UI( segmentCoord, myGrid->segmentCounts )
473  {
474  const base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >& segment = myGrid->segmentAt( segmentCoord );
475 
476  /* Compute dimensions of particular grid segment.
477  */
478  const bool isTail =
479  segmentCoord.x() + 1 == myGrid->segmentCounts.x()
480  || segmentCoord.y() + 1 == myGrid->segmentCounts.y()
481  || segmentCoord.z() + 1 == myGrid->segmentCounts.z();
482  const base::math::Vector3ui& volumeSize = segment.intensities().size;
483  const base::math::Vector3f dimensions = !isTail ? regularSegmentDimensions
484  : ( ( volumeSize.cast< int >() - base::math::Vector3i( 1, 1, 1 ) )
485  .cast< float >().cwiseProduct( spacing.millimeters ) );
486 
487  /* Create geometry node for particular grid segment.
488  */
489  base::Geometry* const geom = new base::Geometry( geometryType );
490  pivot->attachChild( geom );
491  IntensityComponent::attachTexture( *geom, segment );
492  NormalsComponent ::attachTexture( *geom, segment );
493  geom->setMovable( false );
494  geom->setBoundingVolume( new base::BoundingBox( 1, 1, 1 ) );
495  geom->localTransform
496  = base::math::translation4f( segmentCoord.cast< float >().cwiseProduct( regularSegmentDimensions )
497  - ( !isTail
498  ? base::math::Vector3f( 0, 0, 0 )
499  : ( regularSegmentDimensions - dimensions ) / 2 ) )
500  * base::math::scaling4f( dimensions );
501  }
502 
503  /* We're done.
504  */
505  return pivot;
506 }
507 
508 
509 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
511  ( unsigned int geometryType, const Spacing& spacing ) const
512 {
513  const base::math::Vector3f dimensions
514  = ( resolution.cast< int >() - base::math::Vector3i( 1, 1, 1 ) ).cast< float >().cwiseProduct( spacing.millimeters );
515  return createNode( geometryType, spacing, Dimensions( dimensions ) );
516 }
517 
518 
519 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
521  ( unsigned int geometryType, const Dimensions& dimensions ) const
522 {
523  const base::math::Vector3f& mmDimensions = dimensions.millimeters;
524  const base::math::Vector3f spacing
525  = mmDimensions.cast< float >().cwiseQuotient( ( resolution.cast< int >() - base::math::Vector3i( 1, 1, 1 ) ).cast< float >() );
526  return createNode( geometryType, Spacing( spacing ), dimensions );
527 }
528 
529 
530 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
532 {
533  return resolution;
534 }
535 
536 
537 
538 } // namespace Carna :: helpers
539 
540 } // namespace Carna
541 
542 #endif // VOLUMEGRIDHELPER_H_6014714286
Defines Carna::base::math namespace and CARNA_FOR_VECTOR3UI.
std::size_t partitionsCount() const
Tells the total partitions number.
unsigned int round_ui(ScalarType x)
Rounds x to the closest . Either the data type of must be unsigned or .
Definition: math.h:597
ScalarType makeEven(ScalarType x, int s)
Returns if is even and if is odd, where . The data type of must be integral. ...
Definition: math.h:625
@@ -84,7 +84,6 @@
Defines scene graph leafs. Instances of this class represent visible geometry that can be rendered...
Definition: Geometry.h:59
void attachChild(Spatial *child)
Attaches child to this node in and takes it&#39;s possession.
Defines Carna::base::Node.
-
SegmentIntensityVolumeType & intensityVolume()
References the intensity volume data of this partition.
Defines type-parameters-independent VolumeGridHelper base interface.
Eigen::Matrix< unsigned int, 3, 1 > Vector3ui
Defines vector.
Definition: math.h:199
Represents a single volumetric data partition.
@@ -109,6 +108,7 @@
Defines Carna::base::VolumeSegment.
const base::math::Vector3ui maxSegmentSize
The maximum effective resolution of a single grid segment.
+
SegmentIntensityVolumeType & intensities()
References the intensity volume data of this partition.
const details::VolumeGridHelper::Partionining partitioningY
Describes the partitioning along the y-axis.
Computes the partitioning of volumetric data and the corresponding normal map. Also creates scene nod...
Definition: Carna.h:216
const base::math::Vector3ui resolution
Holds the effective resolution, i.e. the resolution covered by the grid.
diff --git a/docs/html/VolumeGrid_8h_source.html b/docs/html/VolumeGrid_8h_source.html index 20c4b778..60d3bcd7 100644 --- a/docs/html/VolumeGrid_8h_source.html +++ b/docs/html/VolumeGrid_8h_source.html @@ -74,11 +74,10 @@
VolumeGrid.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 VOLUMEGRID_H_6014714286
13 #define VOLUMEGRID_H_6014714286
14 
23 #include <Carna/Carna.h>
27 
28 namespace Carna
29 {
30 
31 namespace base
32 {
33 
34 
35 
36 // ----------------------------------------------------------------------------------
37 // VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
38 // ----------------------------------------------------------------------------------
39 
62 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
64 {
65 
67 
68 public:
69 
73  typedef SegmentIntensityVolumeType SegmentIntensityVolume;
74 
78  typedef SegmentNormalsVolumeType SegmentNormalsVolume;
79 
84 
92 
96  virtual ~VolumeGrid();
97 
100 
105  Segment& segmentAt( const base::math::Vector3ui& location );
106 
109  const Segment& segmentAt( const base::math::Vector3ui& ) const;
110 
113  Segment& segmentAt( unsigned int segmentX, unsigned int segmentY, unsigned int segmentZ );
114 
117  const Segment& segmentAt( unsigned int segmentX, unsigned int segmentY, unsigned int segmentZ ) const;
118 
119  // ------------------------------------------------------------------------------
120  // VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType > :: IntensitySelector
121  // ------------------------------------------------------------------------------
122 
127  {
131  typedef typename SegmentIntensityVolumeType::Value VoxelType;
132 
136  static SegmentIntensityVolumeType& volume( Segment& segment );
137 
140  static const SegmentIntensityVolumeType& volume( const Segment& segment );
141  };
142 
143  // ------------------------------------------------------------------------------
144  // VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType > :: NormalSelector
145  // ------------------------------------------------------------------------------
146 
151  {
155  typedef typename SegmentNormalsVolumeType::Value VoxelType;
156 
160  static SegmentNormalsVolumeType& volume( Segment& segment );
161 
164  static const SegmentNormalsVolumeType& volume( const Segment& segment );
165  };
166 
167  // ------------------------------------------------------------------------------
168 
173  template< typename Selector >
174  typename Selector::VoxelType getVoxel( const math::Vector3ui& location );
175 
178  template< typename Selector >
179  typename Selector::VoxelType getVoxel( unsigned int x, unsigned int y, unsigned int z );
180 
185  template< typename Selector >
186  void setVoxel( const math::Vector3ui& location, const typename Selector::VoxelType& voxel );
187 
190  template< typename Selector >
191  void setVoxel( unsigned int x, unsigned int y, unsigned int z, const typename Selector::VoxelType& voxel );
192 
193 private:
194 
195  std::vector< Segment* > segments;
196 
197  std::size_t segmentIndex( unsigned int segmentX, unsigned int segmentY, unsigned int segmentZ ) const;
198 
199 }; // VolumeGrid
200 
201 
202 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
205  , const math::Vector3ui& segmentCounts )
206  : maxSegmentSize( maxSegmentSize )
207  , segmentCounts( segmentCounts )
208 {
209  CARNA_ASSERT( maxSegmentSize.x() > 0 && maxSegmentSize.y() > 0 && maxSegmentSize.z() > 0 );
210  CARNA_ASSERT( segmentCounts.x() > 0 && segmentCounts.y() > 0 && segmentCounts.z() > 0 );
211  segments.resize( segmentCounts.x() * segmentCounts.y() * segmentCounts.z() );
212  for( unsigned int z = 0; z < segmentCounts.z(); ++z )
213  for( unsigned int y = 0; y < segmentCounts.y(); ++y )
214  for( unsigned int x = 0; x < segmentCounts.x(); ++x )
215  {
216  const std::size_t index = segmentIndex( x, y, z );
217  Segment* const segment = new Segment( *this );
218  segment->offset = math::Vector3ui( x * maxSegmentSize.x(), y * maxSegmentSize.y(), z * maxSegmentSize.z() );
219  segments[ index ] = segment;
220  }
221 }
222 
223 
224 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
226 {
227  std::for_each( segments.begin(), segments.end(), std::default_delete< Segment >() );
228 }
229 
230 
231 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
233  ( unsigned int segmentX
234  , unsigned int segmentY
235  , unsigned int segmentZ ) const
236 {
237  return segmentX + segmentY * segmentCounts.x() + segmentZ * segmentCounts.x() * segmentCounts.y();
238 }
239 
240 
241 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
245 {
246  return segmentAt( p.x(), p.y(), p.z() );
247 }
248 
249 
250 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
253  ( const base::math::Vector3ui& p ) const
254 {
255  return segmentAt( p.x(), p.y(), p.z() );
256 }
257 
258 
259 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
262  ( unsigned int segmentX
263  , unsigned int segmentY
264  , unsigned int segmentZ )
265 {
266  const std::size_t index = segmentIndex( segmentX, segmentY, segmentZ );
267  Segment& segment = *segments[ index ];
268  return segment;
269 }
270 
271 
272 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
275  ( unsigned int segmentX
276  , unsigned int segmentY
277  , unsigned int segmentZ ) const
278 {
279  const std::size_t index = segmentIndex( segmentX, segmentY, segmentZ );
280  const Segment& segment = *segments[ index ];
281  return segment;
282 }
283 
284 
285 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
286 template< typename Selector >
288  ( unsigned int x, unsigned int y, unsigned int z )
289 {
290  const unsigned int segmentX = x / maxSegmentSize.x();
291  const unsigned int segmentY = y / maxSegmentSize.y();
292  const unsigned int segmentZ = z / maxSegmentSize.z();
293 
294  const unsigned int localX = x % maxSegmentSize.x();
295  const unsigned int localY = y % maxSegmentSize.y();
296  const unsigned int localZ = z % maxSegmentSize.z();
297 
298  const Segment& segment = segmentAt( segmentX, segmentY, segmentZ );
299  return Selector::volume( segment )( localX, localY, localZ );
300 }
301 
302 
303 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
304 template< typename Selector >
306  ( const math::Vector3ui& at )
307 {
308  return getVoxel< Selector >( at.x(), at.y(), at.z() );
309 }
310 
311 
312 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
313 template< typename Selector >
315  ( unsigned int x, unsigned int y, unsigned int z, const typename Selector::VoxelType& voxel )
316 {
317  const unsigned int segmentX = x / maxSegmentSize.x();
318  const unsigned int segmentY = y / maxSegmentSize.y();
319  const unsigned int segmentZ = z / maxSegmentSize.z();
320 
321  const unsigned int localX = x % maxSegmentSize.x();
322  const unsigned int localY = y % maxSegmentSize.y();
323  const unsigned int localZ = z % maxSegmentSize.z();
324 
325  Segment& segment = segmentAt( segmentX, segmentY, segmentZ );
326  Selector::volume( segment ).setVoxel( localX, localY, localZ, voxel );
327 
328  /* Note that segments are not disjoint,
329  * so we might need to update the redundant texels as well.
330  */
331  const bool updateRedundantX = localX == 0 && segmentX > 0;
332  const bool updateRedundantY = localY == 0 && segmentY > 0;
333  const bool updateRedundantZ = localZ == 0 && segmentZ > 0;
334 
335  if( updateRedundantX )
336  {
337  Selector::volume( segmentAt( segmentX - 1, segmentY, segmentZ ) )
338  .setVoxel( maxSegmentSize.x(), localY, localZ, voxel );
339  }
340  if( updateRedundantY )
341  {
342  Selector::volume( segmentAt( segmentX, segmentY - 1, segmentZ ) )
343  .setVoxel( localX, maxSegmentSize.y(), localZ, voxel );
344  }
345  if( updateRedundantZ )
346  {
347  Selector::volume( segmentAt( segmentX, segmentY, segmentZ - 1 ) )
348  .setVoxel( localX, localY, maxSegmentSize.z(), voxel );
349  }
350 
351  if( updateRedundantX && updateRedundantY )
352  {
353  Selector::volume( segmentAt( segmentX - 1, segmentY - 1, segmentZ ) )
354  .setVoxel( maxSegmentSize.x(), maxSegmentSize.y(), localZ, voxel );
355  }
356  if( updateRedundantX && updateRedundantZ )
357  {
358  Selector::volume( segmentAt( segmentX - 1, segmentY, segmentZ - 1 ) )
359  .setVoxel( maxSegmentSize.x(), localY, maxSegmentSize.z(), voxel );
360  }
361  if( updateRedundantY && updateRedundantZ )
362  {
363  Selector::volume( segmentAt( segmentX, segmentY - 1, segmentZ - 1 ) )
364  .setVoxel( localX, maxSegmentSize.y(), maxSegmentSize.z(), voxel );
365  }
366 
367  if( updateRedundantX && updateRedundantY && updateRedundantZ )
368  {
369  Selector::volume( segmentAt( segmentX - 1, segmentY - 1, segmentZ - 1 ) )
370  .setVoxel( maxSegmentSize, voxel );
371  }
372 }
373 
374 
375 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
376 template< typename Selector >
378  ( const math::Vector3ui& at, const typename Selector::VoxelType& voxel )
379 {
380  setVoxel< Selector >( at.x(), at.y(), at.z(), voxel );
381 }
382 
383 
384 
385 // ----------------------------------------------------------------------------------
386 // VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType > :: IntensitySelector
387 // ----------------------------------------------------------------------------------
388 
389 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
392 {
393  return segment.intensityVolume();
394 }
395 
396 
397 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
400 {
401  return segment.intensityVolume();
402 }
403 
404 
405 
406 // ----------------------------------------------------------------------------------
407 // VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType > :: NormalSelector
408 // ----------------------------------------------------------------------------------
409 
410 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
413 {
414  return segment.normals();
415 }
416 
417 
418 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
421 {
422  return segment.normals();
423 }
424 
425 
426 
427 } // namespace Carna :: base
428 
429 } // namespace Carna
430 
431 #endif // VOLUMEGRID_H_6014714286
static SegmentIntensityVolumeType & volume(Segment &segment)
References the intensity volume of a given partition.
Definition: VolumeGrid.h:391
+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 VOLUMEGRID_H_6014714286
13 #define VOLUMEGRID_H_6014714286
14 
23 #include <Carna/Carna.h>
27 
28 namespace Carna
29 {
30 
31 namespace base
32 {
33 
34 
35 
36 // ----------------------------------------------------------------------------------
37 // VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
38 // ----------------------------------------------------------------------------------
39 
62 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
64 {
65 
67 
68 public:
69 
73  typedef SegmentIntensityVolumeType SegmentIntensityVolume;
74 
78  typedef SegmentNormalsVolumeType SegmentNormalsVolume;
79 
84 
92 
96  virtual ~VolumeGrid();
97 
100 
105  Segment& segmentAt( const base::math::Vector3ui& location );
106 
109  const Segment& segmentAt( const base::math::Vector3ui& ) const;
110 
113  Segment& segmentAt( unsigned int segmentX, unsigned int segmentY, unsigned int segmentZ );
114 
117  const Segment& segmentAt( unsigned int segmentX, unsigned int segmentY, unsigned int segmentZ ) const;
118 
119  // ------------------------------------------------------------------------------
120  // VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType > :: IntensitySelector
121  // ------------------------------------------------------------------------------
122 
127  {
131  typedef typename SegmentIntensityVolumeType::Value VoxelType;
132 
136  static SegmentIntensityVolumeType& volume( Segment& segment );
137 
140  static const SegmentIntensityVolumeType& volume( const Segment& segment );
141  };
142 
143  // ------------------------------------------------------------------------------
144  // VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType > :: NormalSelector
145  // ------------------------------------------------------------------------------
146 
151  {
155  typedef typename SegmentNormalsVolumeType::Value VoxelType;
156 
160  static SegmentNormalsVolumeType& volume( Segment& segment );
161 
164  static const SegmentNormalsVolumeType& volume( const Segment& segment );
165  };
166 
167  // ------------------------------------------------------------------------------
168 
173  template< typename Selector >
174  typename Selector::VoxelType getVoxel( const math::Vector3ui& location );
175 
178  template< typename Selector >
179  typename Selector::VoxelType getVoxel( unsigned int x, unsigned int y, unsigned int z );
180 
185  template< typename Selector >
186  void setVoxel( const math::Vector3ui& location, const typename Selector::VoxelType& voxel );
187 
190  template< typename Selector >
191  void setVoxel( unsigned int x, unsigned int y, unsigned int z, const typename Selector::VoxelType& voxel );
192 
193 private:
194 
195  std::vector< Segment* > segments;
196 
197  std::size_t segmentIndex( unsigned int segmentX, unsigned int segmentY, unsigned int segmentZ ) const;
198 
199 }; // VolumeGrid
200 
201 
202 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
205  , const math::Vector3ui& segmentCounts )
206  : maxSegmentSize( maxSegmentSize )
207  , segmentCounts( segmentCounts )
208 {
209  CARNA_ASSERT( maxSegmentSize.x() > 0 && maxSegmentSize.y() > 0 && maxSegmentSize.z() > 0 );
210  CARNA_ASSERT( segmentCounts.x() > 0 && segmentCounts.y() > 0 && segmentCounts.z() > 0 );
211  segments.resize( segmentCounts.x() * segmentCounts.y() * segmentCounts.z() );
212  for( unsigned int z = 0; z < segmentCounts.z(); ++z )
213  for( unsigned int y = 0; y < segmentCounts.y(); ++y )
214  for( unsigned int x = 0; x < segmentCounts.x(); ++x )
215  {
216  const std::size_t index = segmentIndex( x, y, z );
217  Segment* const segment = new Segment( *this );
218  segment->offset = math::Vector3ui( x * maxSegmentSize.x(), y * maxSegmentSize.y(), z * maxSegmentSize.z() );
219  segments[ index ] = segment;
220  }
221 }
222 
223 
224 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
226 {
227  std::for_each( segments.begin(), segments.end(), std::default_delete< Segment >() );
228 }
229 
230 
231 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
233  ( unsigned int segmentX
234  , unsigned int segmentY
235  , unsigned int segmentZ ) const
236 {
237  return segmentX + segmentY * segmentCounts.x() + segmentZ * segmentCounts.x() * segmentCounts.y();
238 }
239 
240 
241 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
245 {
246  return segmentAt( p.x(), p.y(), p.z() );
247 }
248 
249 
250 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
253  ( const base::math::Vector3ui& p ) const
254 {
255  return segmentAt( p.x(), p.y(), p.z() );
256 }
257 
258 
259 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
262  ( unsigned int segmentX
263  , unsigned int segmentY
264  , unsigned int segmentZ )
265 {
266  const std::size_t index = segmentIndex( segmentX, segmentY, segmentZ );
267  Segment& segment = *segments[ index ];
268  return segment;
269 }
270 
271 
272 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
275  ( unsigned int segmentX
276  , unsigned int segmentY
277  , unsigned int segmentZ ) const
278 {
279  const std::size_t index = segmentIndex( segmentX, segmentY, segmentZ );
280  const Segment& segment = *segments[ index ];
281  return segment;
282 }
283 
284 
285 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
286 template< typename Selector >
288  ( unsigned int x, unsigned int y, unsigned int z )
289 {
290  const unsigned int segmentX = x / maxSegmentSize.x();
291  const unsigned int segmentY = y / maxSegmentSize.y();
292  const unsigned int segmentZ = z / maxSegmentSize.z();
293 
294  const unsigned int localX = x % maxSegmentSize.x();
295  const unsigned int localY = y % maxSegmentSize.y();
296  const unsigned int localZ = z % maxSegmentSize.z();
297 
298  const Segment& segment = segmentAt( segmentX, segmentY, segmentZ );
299  return Selector::volume( segment )( localX, localY, localZ );
300 }
301 
302 
303 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
304 template< typename Selector >
306  ( const math::Vector3ui& at )
307 {
308  return getVoxel< Selector >( at.x(), at.y(), at.z() );
309 }
310 
311 
312 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
313 template< typename Selector >
315  ( unsigned int x, unsigned int y, unsigned int z, const typename Selector::VoxelType& voxel )
316 {
317  const unsigned int segmentX = x / maxSegmentSize.x();
318  const unsigned int segmentY = y / maxSegmentSize.y();
319  const unsigned int segmentZ = z / maxSegmentSize.z();
320 
321  const unsigned int localX = x % maxSegmentSize.x();
322  const unsigned int localY = y % maxSegmentSize.y();
323  const unsigned int localZ = z % maxSegmentSize.z();
324 
325  Segment& segment = segmentAt( segmentX, segmentY, segmentZ );
326  Selector::volume( segment ).setVoxel( localX, localY, localZ, voxel );
327 
328  /* Note that segments are not disjoint,
329  * so we might need to update the redundant texels as well.
330  */
331  const bool updateRedundantX = localX == 0 && segmentX > 0;
332  const bool updateRedundantY = localY == 0 && segmentY > 0;
333  const bool updateRedundantZ = localZ == 0 && segmentZ > 0;
334 
335  if( updateRedundantX )
336  {
337  Selector::volume( segmentAt( segmentX - 1, segmentY, segmentZ ) )
338  .setVoxel( maxSegmentSize.x(), localY, localZ, voxel );
339  }
340  if( updateRedundantY )
341  {
342  Selector::volume( segmentAt( segmentX, segmentY - 1, segmentZ ) )
343  .setVoxel( localX, maxSegmentSize.y(), localZ, voxel );
344  }
345  if( updateRedundantZ )
346  {
347  Selector::volume( segmentAt( segmentX, segmentY, segmentZ - 1 ) )
348  .setVoxel( localX, localY, maxSegmentSize.z(), voxel );
349  }
350 
351  if( updateRedundantX && updateRedundantY )
352  {
353  Selector::volume( segmentAt( segmentX - 1, segmentY - 1, segmentZ ) )
354  .setVoxel( maxSegmentSize.x(), maxSegmentSize.y(), localZ, voxel );
355  }
356  if( updateRedundantX && updateRedundantZ )
357  {
358  Selector::volume( segmentAt( segmentX - 1, segmentY, segmentZ - 1 ) )
359  .setVoxel( maxSegmentSize.x(), localY, maxSegmentSize.z(), voxel );
360  }
361  if( updateRedundantY && updateRedundantZ )
362  {
363  Selector::volume( segmentAt( segmentX, segmentY - 1, segmentZ - 1 ) )
364  .setVoxel( localX, maxSegmentSize.y(), maxSegmentSize.z(), voxel );
365  }
366 
367  if( updateRedundantX && updateRedundantY && updateRedundantZ )
368  {
369  Selector::volume( segmentAt( segmentX - 1, segmentY - 1, segmentZ - 1 ) )
370  .setVoxel( maxSegmentSize, voxel );
371  }
372 }
373 
374 
375 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
376 template< typename Selector >
378  ( const math::Vector3ui& at, const typename Selector::VoxelType& voxel )
379 {
380  setVoxel< Selector >( at.x(), at.y(), at.z(), voxel );
381 }
382 
383 
384 
385 // ----------------------------------------------------------------------------------
386 // VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType > :: IntensitySelector
387 // ----------------------------------------------------------------------------------
388 
389 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
392 {
393  return segment.intensities();
394 }
395 
396 
397 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
400 {
401  return segment.intensities();
402 }
403 
404 
405 
406 // ----------------------------------------------------------------------------------
407 // VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType > :: NormalSelector
408 // ----------------------------------------------------------------------------------
409 
410 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
413 {
414  return segment.normals();
415 }
416 
417 
418 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
421 {
422  return segment.normals();
423 }
424 
425 
426 
427 } // namespace Carna :: base
428 
429 } // namespace Carna
430 
431 #endif // VOLUMEGRID_H_6014714286
static SegmentIntensityVolumeType & volume(Segment &segment)
References the intensity volume of a given partition.
Definition: VolumeGrid.h:391
VolumeGrid(const math::Vector3ui &maxSegmentSize, const math::Vector3ui &segmentCounts)
Instantiates.
Definition: VolumeGrid.h:204
void setVoxel(const math::Vector3ui &location, const typename Selector::VoxelType &voxel)
Writes the voxel of the volume that the Selector selects from the partition at location.
Definition: VolumeGrid.h:378
SegmentNormalsVolumeType::Value VoxelType
Reflects the voxel type of the volume this selector references.
Definition: VolumeGrid.h:155
-
SegmentIntensityVolumeType & intensityVolume()
References the intensity volume data of this partition.
Eigen::Matrix< unsigned int, 3, 1 > Vector3ui
Defines vector.
Definition: math.h:199
Represents a single volumetric data partition.
Defines Carna::base::IntensityVolume.
@@ -96,6 +95,7 @@
Defines Carna::base::VolumeSegment.
const math::Vector3ui segmentCounts
Holds the number of partitions along each dimension.
Definition: VolumeGrid.h:99
+
SegmentIntensityVolumeType & intensities()
References the intensity volume data of this partition.
static SegmentNormalsVolumeType & volume(Segment &segment)
References the normal map of a given partition.
Definition: VolumeGrid.h:412
Defines Carna::base::CarnaException, Carna::base::AssertionFailure.
SegmentIntensityVolumeType SegmentIntensityVolume
Reflects the type to use for storing the intensity volume of a single partition.
Definition: VolumeGrid.h:73
diff --git a/docs/html/VolumeSegment_8h_source.html b/docs/html/VolumeSegment_8h_source.html index 93650a1a..5fc42424 100644 --- a/docs/html/VolumeSegment_8h_source.html +++ b/docs/html/VolumeSegment_8h_source.html @@ -74,27 +74,27 @@
VolumeSegment.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 VOLUMESEGMENT_H_6014714286
13 #define VOLUMESEGMENT_H_6014714286
14 
23 #include <Carna/Carna.h>
24 #include <Carna/base/Association.h>
26 #include <Carna/base/VolumeGrid.h>
27 #include <memory>
28 
29 namespace Carna
30 {
31 
32 namespace base
33 {
34 
35 
36 
37 // ----------------------------------------------------------------------------------
38 // VolumeSegmentNormalsComponent< SegmentNormalsVolumeType >
39 // ----------------------------------------------------------------------------------
40 
47 template< typename SegmentNormalsVolumeType >
49 {
50 
52 
53  std::unique_ptr< Association< SegmentNormalsVolumeType > > myNormals;
54 
55 public:
56 
61 
66 
71  SegmentNormalsVolumeType& normals();
72 
75  const SegmentNormalsVolumeType& normals() const;
76 
80  bool hasNormals() const;
81 
82 }; // VolumeSegmentNormalsComponent
83 
84 
85 template< typename SegmentNormalsVolumeType >
87 {
88 }
89 
90 
91 template< typename SegmentNormalsVolumeType >
93 {
94  myNormals.reset( normals );
95 }
96 
97 
98 template< typename SegmentNormalsVolumeType >
100 {
102  return **myNormals;
103 }
104 
105 
106 template< typename SegmentNormalsVolumeType >
108 {
110  return **myNormals;
111 }
112 
113 
114 template< typename SegmentNormalsVolumeType >
116 {
117  return myNormals.get() != nullptr && myNormals->get() != nullptr;
118 }
119 
120 
121 
122 // ----------------------------------------------------------------------------------
123 // VolumeSegmentNormalsComponent< void >
124 // ----------------------------------------------------------------------------------
125 
132 template< >
134 {
135 
136 public:
137 
142 
143 }; // VolumeSegmentNormalsComponent
144 
145 
147 {
148 }
149 
150 
151 
152 // ----------------------------------------------------------------------------------
153 // VolumeSegment
154 // ----------------------------------------------------------------------------------
155 
162 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
163 class VolumeSegment : public VolumeSegmentNormalsComponent< SegmentNormalsVolumeType >
164 {
165 
167 
168 public:
169 
175 
179  typedef SegmentIntensityVolumeType IntensityVolume;
180 
184  typedef SegmentNormalsVolumeType NormalsVolume;
185 
190  Grid& grid;
191 
199  VolumeSegment( Grid& grid );
200 
204  void setIntensityVolume( Association< SegmentIntensityVolumeType >* intensityVolume );
205 
210  SegmentIntensityVolumeType& intensityVolume();
211 
214  const SegmentIntensityVolumeType& intensityVolume() const;
215 
219  bool hasIntensityVolume() const;
220 
226 
227 private:
228 
229  std::unique_ptr< Association< SegmentIntensityVolumeType > > myIntensityVolume;
230 
231 }; // VolumeSegment
232 
233 
234 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
237  : grid( grid )
238 {
239 }
240 
241 
242 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
244 {
245  myIntensityVolume.reset( intensityVolume );
246 }
247 
248 
249 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
251 {
252  CARNA_ASSERT( hasIntensityVolume() );
253  return **myIntensityVolume;
254 }
255 
256 
257 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
259 {
260  CARNA_ASSERT( hasIntensityVolume() );
261  return **myIntensityVolume;
262 }
263 
264 
265 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
267 {
268  return myIntensityVolume.get() != nullptr && myIntensityVolume->get() != nullptr;
269 }
270 
271 
272 
273 } // namespace Carna :: base
274 
275 } // namespace Carna
276 
277 #endif // VOLUMESEGMENT_H_6014714286
Defines Carna::base::Association.
+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 VOLUMESEGMENT_H_6014714286
13 #define VOLUMESEGMENT_H_6014714286
14 
23 #include <Carna/Carna.h>
24 #include <Carna/base/Association.h>
26 #include <Carna/base/VolumeGrid.h>
27 #include <memory>
28 
29 namespace Carna
30 {
31 
32 namespace base
33 {
34 
35 
36 
37 // ----------------------------------------------------------------------------------
38 // VolumeSegmentNormalsComponent< SegmentNormalsVolumeType >
39 // ----------------------------------------------------------------------------------
40 
47 template< typename SegmentNormalsVolumeType >
49 {
50 
52 
53  std::unique_ptr< Association< SegmentNormalsVolumeType > > myNormals;
54 
55 public:
56 
61 
66 
71  SegmentNormalsVolumeType& normals();
72 
75  const SegmentNormalsVolumeType& normals() const;
76 
80  bool hasNormals() const;
81 
82 }; // VolumeSegmentNormalsComponent
83 
84 
85 template< typename SegmentNormalsVolumeType >
87 {
88 }
89 
90 
91 template< typename SegmentNormalsVolumeType >
93 {
94  myNormals.reset( normals );
95 }
96 
97 
98 template< typename SegmentNormalsVolumeType >
100 {
102  return **myNormals;
103 }
104 
105 
106 template< typename SegmentNormalsVolumeType >
108 {
110  return **myNormals;
111 }
112 
113 
114 template< typename SegmentNormalsVolumeType >
116 {
117  return myNormals.get() != nullptr && myNormals->get() != nullptr;
118 }
119 
120 
121 
122 // ----------------------------------------------------------------------------------
123 // VolumeSegmentNormalsComponent< void >
124 // ----------------------------------------------------------------------------------
125 
132 template< >
134 {
135 
136 public:
137 
142 
143 }; // VolumeSegmentNormalsComponent
144 
145 
147 {
148 }
149 
150 
151 
152 // ----------------------------------------------------------------------------------
153 // VolumeSegment
154 // ----------------------------------------------------------------------------------
155 
162 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
163 class VolumeSegment : public VolumeSegmentNormalsComponent< SegmentNormalsVolumeType >
164 {
165 
167 
168 public:
169 
175 
179  typedef SegmentIntensityVolumeType IntensityVolume;
180 
184  typedef SegmentNormalsVolumeType NormalsVolume;
185 
190  Grid& grid;
191 
199  VolumeSegment( Grid& grid );
200 
204  void setIntensities( Association< SegmentIntensityVolumeType >* intensities );
205 
210  SegmentIntensityVolumeType& intensities();
211 
214  const SegmentIntensityVolumeType& intensities() const;
215 
219  bool hasIntensities() const;
220 
226 
227 private:
228 
229  std::unique_ptr< Association< SegmentIntensityVolumeType > > myIntensities;
230 
231 }; // VolumeSegment
232 
233 
234 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
237  : grid( grid )
238 {
239 }
240 
241 
242 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
244 {
245  myIntensities.reset( intensities );
246 }
247 
248 
249 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
251 {
252  CARNA_ASSERT( hasIntensities() );
253  return **myIntensities;
254 }
255 
256 
257 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
259 {
260  CARNA_ASSERT( hasIntensities() );
261  return **myIntensities;
262 }
263 
264 
265 template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
267 {
268  return myIntensities.get() != nullptr && myIntensities->get() != nullptr;
269 }
270 
271 
272 
273 } // namespace Carna :: base
274 
275 } // namespace Carna
276 
277 #endif // VOLUMESEGMENT_H_6014714286
Defines Carna::base::Association.
void setNormals(Association< SegmentNormalsVolumeType > *volume)
Sets the normal map of this partition.
Definition: VolumeSegment.h:92
-
SegmentIntensityVolumeType & intensityVolume()
References the intensity volume data of this partition.
Grid & grid
References the volumetric data partitioning this partition belongs to.
SegmentNormalsVolumeType NormalsVolume
Reflects the type to use for storing the normal map of a single partition.
Eigen::Matrix< unsigned int, 3, 1 > Vector3ui
Defines vector.
Definition: math.h:199
Represents a single volumetric data partition.
-
bool hasIntensityVolume() const
Tells whether this partition has intensity volume data associated.
SegmentIntensityVolumeType IntensityVolume
Reflects the type to use for storing the intensity volume of a single partition.
SegmentNormalsVolumeType & normals()
References the normal map of this partition.
Definition: VolumeSegment.h:99
Defines Carna::base::VolumeGrid.
VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType > Grid
Reflects the type to use for representation of the whole volumetric data partitioning.
-
void setIntensityVolume(Association< SegmentIntensityVolumeType > *intensityVolume)
Sets the intensity volume data of this partition.
math::Vector3ui offset
Holds the coordinate offset this partition within the whole volumetric data partitioning.
Represents the normal map component of an VolumeSegment object.
Definition: VolumeSegment.h:48
+
SegmentIntensityVolumeType & intensities()
References the intensity volume data of this partition.
Defines Carna::base::CarnaException, Carna::base::AssertionFailure.
VolumeSegment(Grid &grid)
Instantiates.
bool hasNormals() const
Tells whether this partition has a normal map associated.
+
void setIntensities(Association< SegmentIntensityVolumeType > *intensities)
Sets the intensity volume data of this partition.
+
bool hasIntensities() const
Tells whether this partition has intensity volume data associated.
#define CARNA_ASSERT(expression)
If the given expression is false, a break point is raised in debug mode and an AssertionFailure throw...
#define NON_COPYABLE
Features class it is placed in as non-copyable.
Definition: noncopyable.h:109
Represents a particular partitioning of volumetric data.
Definition: VolumeGrid.h:63
diff --git a/docs/html/annotated.html b/docs/html/annotated.html index 1d977024..cadd4558 100644 --- a/docs/html/annotated.html +++ b/docs/html/annotated.html @@ -196,7 +196,7 @@  NdetailsHolds implementation details  NVolumeGridHelperHolds implementation details of Carna::helpers::VolumeGridHelper  CIntensityComponentDefines the helpers::VolumeGridHelper component that maintains intensity volume data - CIntensityTextureFactoryCreates textures that represents base::VolumeSegment::intensityVolume in video memory + CIntensityTextureFactoryCreates textures that represents base::VolumeSegment::intensities in video memory  CNormalsComponentDefines the helpers::VolumeGridHelper component that computes and maintains normal maps  CNormalsComponent< SegmentIntensityVolumeType, void >Specializes NormalsComponent when no normals are required  CNormalsComponentBaseDefines the NormalsComponent base class that is independent of type arguments diff --git a/docs/html/classCarna_1_1base_1_1Geometry.html b/docs/html/classCarna_1_1base_1_1Geometry.html index 6b5361b0..49925d44 100644 --- a/docs/html/classCarna_1_1base_1_1Geometry.html +++ b/docs/html/classCarna_1_1base_1_1Geometry.html @@ -256,7 +256,7 @@

Detailed Description

Defines scene graph leafs. Instances of this class represent visible geometry that can be rendered. The way of rendering is defined by the geometry rendering stage with matching geometryType.

Usually the corresponding rendering stage will query particular features from this geometry object: Features are like components that make up the geometry object in it's entirety, but the geometry object aggregates them, i.e. does not take their possession. Rendering stages identify features through the roles they take when associated with a geometry object.

-
Note
Conventionally, the default role for 3D textures that represent intensity data, such as presets::DRRStage::ROLE_INTENSITY_VOLUME or presets::CuttingPlanesStage::ROLE_INTENSITY_VOLUME, is 0.
+
Note
Conventionally, the default role for 3D textures that represent intensity data, such as presets::DRRStage::ROLE_INTENSITIES or presets::CuttingPlanesStage::ROLE_INTENSITIES, is 0.

What features a geometry object aggregates depends on the geometryType and what the corresponding rendering stage expects. Typical examples are meshes, materials and volume textures.

Author
Leonid Kostrykin
Date
21.2.15 - 6.3.15
diff --git a/docs/html/classCarna_1_1base_1_1VolumeSegment-members.html b/docs/html/classCarna_1_1base_1_1VolumeSegment-members.html index e7488246..eb3f362f 100644 --- a/docs/html/classCarna_1_1base_1_1VolumeSegment-members.html +++ b/docs/html/classCarna_1_1base_1_1VolumeSegment-members.html @@ -79,16 +79,16 @@ - + + + - - - + diff --git a/docs/html/classCarna_1_1base_1_1VolumeSegment.html b/docs/html/classCarna_1_1base_1_1VolumeSegment.html index a3b6ee69..855ded36 100644 --- a/docs/html/classCarna_1_1base_1_1VolumeSegment.html +++ b/docs/html/classCarna_1_1base_1_1VolumeSegment.html @@ -126,19 +126,19 @@ - - - - - - - - - - - + + + + + + + + + + + @@ -210,8 +210,8 @@

Member Function Documentation

- -

◆ intensityVolume() [1/2]

+ +

◆ intensities() [1/2]

@@ -219,7 +219,7 @@

- + @@ -228,14 +228,14 @@

References the intensity volume data of this partition.

-
Precondition
hasIntensityVolume() == true
+
Precondition
hasIntensities() == true

Definition at line 250 of file VolumeSegment.h.

- -

◆ intensityVolume() [2/2]

+ +

◆ intensities() [2/2]

@@ -243,7 +243,7 @@

- + diff --git a/docs/html/classCarna_1_1helpers_1_1VolumeGridHelper-members.html b/docs/html/classCarna_1_1helpers_1_1VolumeGridHelper-members.html index 1537bfc5..9609c5f8 100644 --- a/docs/html/classCarna_1_1helpers_1_1VolumeGridHelper-members.html +++ b/docs/html/classCarna_1_1helpers_1_1VolumeGridHelper-members.html @@ -82,12 +82,12 @@ - + - - + + @@ -100,7 +100,7 @@ - + diff --git a/docs/html/classCarna_1_1helpers_1_1VolumeGridHelper.html b/docs/html/classCarna_1_1helpers_1_1VolumeGridHelper.html index 5a6f19d6..d01a778b 100644 --- a/docs/html/classCarna_1_1helpers_1_1VolumeGridHelper.html +++ b/docs/html/classCarna_1_1helpers_1_1VolumeGridHelper.html @@ -151,16 +151,16 @@ - + - - - - - - + + + + + + @@ -211,11 +211,11 @@ - + - + - - - + + +
Grid typedefCarna::base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
gridCarna::base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
hasIntensityVolume() constCarna::base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
hasIntensities() constCarna::base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
hasNormals() constCarna::base::VolumeSegmentNormalsComponent< SegmentNormalsVolumeType >
intensities()Carna::base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
intensities() constCarna::base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
IntensityVolume typedefCarna::base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
intensityVolume()Carna::base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
intensityVolume() constCarna::base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
normals()Carna::base::VolumeSegmentNormalsComponent< SegmentNormalsVolumeType >
normals() constCarna::base::VolumeSegmentNormalsComponent< SegmentNormalsVolumeType >
NormalsVolume typedefCarna::base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
offsetCarna::base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
setIntensityVolume(Association< SegmentIntensityVolumeType > *intensityVolume)Carna::base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
setIntensities(Association< SegmentIntensityVolumeType > *intensities)Carna::base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
setNormals(Association< SegmentNormalsVolumeType > *volume)Carna::base::VolumeSegmentNormalsComponent< SegmentNormalsVolumeType >
VolumeSegment(Grid &grid)Carna::base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
~VolumeSegmentNormalsComponent()Carna::base::VolumeSegmentNormalsComponent< SegmentNormalsVolumeType >virtual
 VolumeSegment (Grid &grid)
 Instantiates. More...
 
-void setIntensityVolume (Association< SegmentIntensityVolumeType > *intensityVolume)
 Sets the intensity volume data of this partition.
 
SegmentIntensityVolumeType & intensityVolume ()
 References the intensity volume data of this partition. More...
 
const SegmentIntensityVolumeType & intensityVolume () const
 
-bool hasIntensityVolume () const
 Tells whether this partition has intensity volume data associated.
 
+void setIntensities (Association< SegmentIntensityVolumeType > *intensities)
 Sets the intensity volume data of this partition.
 
SegmentIntensityVolumeType & intensities ()
 References the intensity volume data of this partition. More...
 
const SegmentIntensityVolumeType & intensities () const
 
+bool hasIntensities () const
 Tells whether this partition has intensity volume data associated.
 
- Public Member Functions inherited from Carna::base::VolumeSegmentNormalsComponent< SegmentNormalsVolumeType >
virtual ~VolumeSegmentNormalsComponent ()
SegmentIntensityVolumeType & Carna::base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::intensityVolume SegmentIntensityVolumeType & Carna::base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::intensities ( )
const SegmentIntensityVolumeType & Carna::base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::intensityVolume const SegmentIntensityVolumeType & Carna::base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::intensities ( ) const
createNode(unsigned int geometryType, const Spacing &spacing) const overrideCarna::helpers::VolumeGridHelper< SegmentIntensityVolumeType, SegmentNormalsVolumeType >virtual
createNode(unsigned int geometryType, const Dimensions &dimensions) const overrideCarna::helpers::VolumeGridHelper< SegmentIntensityVolumeType, SegmentNormalsVolumeType >virtual
DEFAULT_MAX_SEGMENT_BYTESIZECarna::helpers::VolumeGridHelperBasestatic
DEFAULT_ROLE_INTENSITY_VOLUMECarna::helpers::details::VolumeGridHelper::IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >static
DEFAULT_ROLE_INTENSITIESCarna::helpers::details::VolumeGridHelper::IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >static
grid() constCarna::helpers::VolumeGridHelper< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
gridResolution() const override (defined in Carna::helpers::VolumeGridHelper< SegmentIntensityVolumeType, SegmentNormalsVolumeType >)Carna::helpers::VolumeGridHelper< SegmentIntensityVolumeType, SegmentNormalsVolumeType >protectedvirtual
initializeSegment(base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType > &segment, const base::math::Vector3ui &size) constCarna::helpers::details::VolumeGridHelper::IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >protected
Carna::helpers::details::VolumeGridHelper::IntensityComponent::IntensityComponent()Carna::helpers::details::VolumeGridHelper::IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
intensityVolumeRole() constCarna::helpers::details::VolumeGridHelper::IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
intensitiesRole() constCarna::helpers::details::VolumeGridHelper::IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
Carna::helpers::details::VolumeGridHelper::IntensityComponent::IntensityComponent()Carna::helpers::details::VolumeGridHelper::IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
loadHUData(const std::function< base::HUV(const base::math::Vector3ui &) > &huData)Carna::helpers::VolumeGridHelperBase
loadHUData(const LoadHUDataFunction &huData)Carna::helpers::VolumeGridHelperBase
loadIntensities(const std::function< float(const base::math::Vector3ui &) > &intensityData) overrideCarna::helpers::VolumeGridHelper< SegmentIntensityVolumeType, SegmentNormalsVolumeType >virtual
partitioningZCarna::helpers::VolumeGridHelper< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
releaseGeometryFeatures() overrideCarna::helpers::VolumeGridHelper< SegmentIntensityVolumeType, SegmentNormalsVolumeType >virtual
resolutionCarna::helpers::VolumeGridHelper< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
setIntensityVolumeRole(unsigned int role)Carna::helpers::details::VolumeGridHelper::IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
setIntensitiesRole(unsigned int role)Carna::helpers::details::VolumeGridHelper::IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
VolumeGridHelper(const base::math::Vector3ui &nativeResolution, std::size_t maxSegmentBytesize=DEFAULT_MAX_SEGMENT_BYTESIZE)Carna::helpers::VolumeGridHelper< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
VolumeGridHelperBase(const base::math::Vector3ui &nativeResolution)Carna::helpers::VolumeGridHelperBase
~TextureManager()Carna::helpers::details::VolumeGridHelper::TextureManager< IntensityTextureFactory< SegmentIntensityVolumeType, SegmentNormalsVolumeType > >virtual
- Public Member Functions inherited from Carna::helpers::details::VolumeGridHelper::IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
 IntensityComponent ()
 Sets the role to use for attaching textures to base::Geometry nodes to DEFAULT_ROLE_INTENSITY_VOLUME.
 Sets the role to use for attaching textures to base::Geometry nodes to DEFAULT_ROLE_INTENSITIES.
 
-void setIntensityVolumeRole (unsigned int role)
 Sets the role to use for attaching textures to base::Geometry nodes.
 
-unsigned int intensityVolumeRole () const
 Tels the role used for attaching textures to base::Geometry nodes.
 
+void setIntensitiesRole (unsigned int role)
 Sets the role to use for attaching textures to base::Geometry nodes.
 
+unsigned int intensitiesRole () const
 Tels the role used for attaching textures to base::Geometry nodes.
 
- Public Member Functions inherited from Carna::helpers::details::VolumeGridHelper::TextureManager< IntensityTextureFactory< SegmentIntensityVolumeType, SegmentNormalsVolumeType > >
virtual ~TextureManager ()
- Protected Member Functions inherited from Carna::helpers::details::VolumeGridHelper::IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
void attachTexture (base::Geometry &geometry, const base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType > &segment) const
 Attaches the texture that represents the base::VolumeSegment::intensityVolume of segment to geometry using the previously configured role.
 Attaches the texture that represents the base::VolumeSegment::intensities of segment to geometry using the previously configured role.
 
void initializeSegment (base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType > &segment, const base::math::Vector3ui &size) const
 Initializes intensity volume of segment.
 Initializes intensity volume of segment.
 
- Protected Member Functions inherited from Carna::helpers::details::VolumeGridHelper::TextureManager< IntensityTextureFactory< SegmentIntensityVolumeType, SegmentNormalsVolumeType > >
@@ -230,10 +230,10 @@
 Default maximum memory size of a single segment volume, 50 megabytes approximately. This determines the segments partitioning. More...
 
- Static Public Attributes inherited from Carna::helpers::details::VolumeGridHelper::IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
-static const unsigned int DEFAULT_ROLE_INTENSITY_VOLUME = 0
 Holds the default role to use for attaching textures to base::Geometry nodes.
 
+static const unsigned int DEFAULT_ROLE_INTENSITIES = 0
 Holds the default role to use for attaching textures to base::Geometry nodes.
 

Detailed Description

template<typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType>
diff --git a/docs/html/classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityComponent-members.html b/docs/html/classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityComponent-members.html index c642498c..43432cf5 100644 --- a/docs/html/classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityComponent-members.html +++ b/docs/html/classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityComponent-members.html @@ -79,12 +79,12 @@ - + - - + + - +
attachTexture(base::Geometry &geometry, const base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType > &segment) constCarna::helpers::details::VolumeGridHelper::IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >protected
TextureManager< IntensityTextureFactory< SegmentIntensityVolumeType, SegmentNormalsVolumeType > >::attachTexture(base::Geometry &geometry, unsigned int role, const base::VolumeSegment< typename IntensityTextureFactory< SegmentIntensityVolumeType, SegmentNormalsVolumeType > ::SegmentIntensityVolume, typename IntensityTextureFactory< SegmentIntensityVolumeType, SegmentNormalsVolumeType > ::SegmentNormalsVolume > &segment) constCarna::helpers::details::VolumeGridHelper::TextureManager< IntensityTextureFactory< SegmentIntensityVolumeType, SegmentNormalsVolumeType > >protected
DEFAULT_ROLE_INTENSITY_VOLUMECarna::helpers::details::VolumeGridHelper::IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >static
DEFAULT_ROLE_INTENSITIESCarna::helpers::details::VolumeGridHelper::IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >static
initializeSegment(base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType > &segment, const base::math::Vector3ui &size) constCarna::helpers::details::VolumeGridHelper::IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >protected
IntensityComponent()Carna::helpers::details::VolumeGridHelper::IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
intensityVolumeRole() constCarna::helpers::details::VolumeGridHelper::IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
intensitiesRole() constCarna::helpers::details::VolumeGridHelper::IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
IntensityComponent()Carna::helpers::details::VolumeGridHelper::IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
releaseGeometryFeatures()Carna::helpers::details::VolumeGridHelper::TextureManager< IntensityTextureFactory< SegmentIntensityVolumeType, SegmentNormalsVolumeType > >
setIntensityVolumeRole(unsigned int role)Carna::helpers::details::VolumeGridHelper::IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
setIntensitiesRole(unsigned int role)Carna::helpers::details::VolumeGridHelper::IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
~TextureManager()Carna::helpers::details::VolumeGridHelper::TextureManager< IntensityTextureFactory< SegmentIntensityVolumeType, SegmentNormalsVolumeType > >virtual

diff --git a/docs/html/classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityComponent.html b/docs/html/classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityComponent.html index 81c92cf8..fc944c26 100644 --- a/docs/html/classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityComponent.html +++ b/docs/html/classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityComponent.html @@ -110,16 +110,16 @@ Public Member Functions  IntensityComponent () - Sets the role to use for attaching textures to base::Geometry nodes to DEFAULT_ROLE_INTENSITY_VOLUME.
+ Sets the role to use for attaching textures to base::Geometry nodes to DEFAULT_ROLE_INTENSITIES.
  - -void setIntensityVolumeRole (unsigned int role) - Sets the role to use for attaching textures to base::Geometry nodes.
-  - -unsigned int intensityVolumeRole () const - Tels the role used for attaching textures to base::Geometry nodes.
-  + +void setIntensitiesRole (unsigned int role) + Sets the role to use for attaching textures to base::Geometry nodes.
+  + +unsigned int intensitiesRole () const + Tels the role used for attaching textures to base::Geometry nodes.
- Public Member Functions inherited from Carna::helpers::details::VolumeGridHelper::TextureManager< IntensityTextureFactory< SegmentIntensityVolumeType, SegmentNormalsVolumeType > > virtual ~TextureManager () @@ -132,20 +132,20 @@ - - - + + +

Static Public Attributes

-static const unsigned int DEFAULT_ROLE_INTENSITY_VOLUME = 0
 Holds the default role to use for attaching textures to base::Geometry nodes.
 
+static const unsigned int DEFAULT_ROLE_INTENSITIES = 0
 Holds the default role to use for attaching textures to base::Geometry nodes.
 
- + - + - + diff --git a/docs/html/classCarna_1_1presets_1_1CuttingPlanesStage.html b/docs/html/classCarna_1_1presets_1_1CuttingPlanesStage.html index a1b623f2..eed84b70 100644 --- a/docs/html/classCarna_1_1presets_1_1CuttingPlanesStage.html +++ b/docs/html/classCarna_1_1presets_1_1CuttingPlanesStage.html @@ -234,10 +234,10 @@ static const float  - - - + + +

Protected Member Functions

void attachTexture (base::Geometry &geometry, const base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType > &segment) const
 Attaches the texture that represents the base::VolumeSegment::intensityVolume of segment to geometry using the previously configured role.
 Attaches the texture that represents the base::VolumeSegment::intensities of segment to geometry using the previously configured role.
 
void initializeSegment (base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType > &segment, const base::math::Vector3ui &size) const
 Initializes intensity volume of segment.
 Initializes intensity volume of segment.
 
- Protected Member Functions inherited from Carna::helpers::details::VolumeGridHelper::TextureManager< IntensityTextureFactory< SegmentIntensityVolumeType, SegmentNormalsVolumeType > >
diff --git a/docs/html/classCarna_1_1presets_1_1CuttingPlanesStage-members.html b/docs/html/classCarna_1_1presets_1_1CuttingPlanesStage-members.html index e5a5a03c..937ba1c2 100644 --- a/docs/html/classCarna_1_1presets_1_1CuttingPlanesStage-members.html +++ b/docs/html/classCarna_1_1presets_1_1CuttingPlanesStage-members.html @@ -103,7 +103,7 @@
RenderStage()Carna::base::RenderStage
reshape(FrameRenderer &fr, unsigned int width, unsigned int height)Carna::base::RenderStagevirtual
rewindRenderQueues() overrideCarna::presets::CuttingPlanesStageprotectedvirtual
ROLE_INTENSITY_VOLUMECarna::presets::CuttingPlanesStagestatic
ROLE_INTENSITIESCarna::presets::CuttingPlanesStagestatic
rqCarna::base::GeometryStage< void >protected
setEnabled(bool)Carna::base::RenderStage
setRenderingInverse(bool inverse)Carna::presets::CuttingPlanesStage
DEFAULT_WINDOWING_LEVEL
 Holds the default value for setWindowingLevel.
 
-static const unsigned int ROLE_INTENSITY_VOLUME
 Holds the role that intensity volume data is expected to take when attached to base::Geometry nodes.
 
+static const unsigned int ROLE_INTENSITIES
 Holds the role that intensity volume data is expected to take when attached to base::Geometry nodes.
 
diff --git a/docs/html/classCarna_1_1presets_1_1DRRStage-members.html b/docs/html/classCarna_1_1presets_1_1DRRStage-members.html index 3dc1f137..95d271cd 100644 --- a/docs/html/classCarna_1_1presets_1_1DRRStage-members.html +++ b/docs/html/classCarna_1_1presets_1_1DRRStage-members.html @@ -113,7 +113,7 @@ - + diff --git a/docs/html/classCarna_1_1presets_1_1DRRStage.html b/docs/html/classCarna_1_1presets_1_1DRRStage.html index bec0963f..6982e48b 100644 --- a/docs/html/classCarna_1_1presets_1_1DRRStage.html +++ b/docs/html/classCarna_1_1presets_1_1DRRStage.html @@ -282,10 +282,10 @@ static const bool  - - - + + + @@ -307,7 +307,7 @@ - + diff --git a/docs/html/classCarna_1_1presets_1_1DVRStage-members.html b/docs/html/classCarna_1_1presets_1_1DVRStage-members.html index 02938cd2..4e3fa8c4 100644 --- a/docs/html/classCarna_1_1presets_1_1DVRStage-members.html +++ b/docs/html/classCarna_1_1presets_1_1DVRStage-members.html @@ -109,7 +109,7 @@ - + diff --git a/docs/html/classCarna_1_1presets_1_1DVRStage.html b/docs/html/classCarna_1_1presets_1_1DVRStage.html index 08b55e12..4865b7d1 100644 --- a/docs/html/classCarna_1_1presets_1_1DVRStage.html +++ b/docs/html/classCarna_1_1presets_1_1DVRStage.html @@ -237,10 +237,10 @@

Protected Member Functions

RenderStage()Carna::base::RenderStage
reshape(base::FrameRenderer &fr, unsigned int width, unsigned int height) overrideCarna::presets::DRRStagevirtual
rewindRenderQueues()Carna::base::GeometryStage< base::Renderable::BackToFront >protectedvirtual
ROLE_INTENSITY_VOLUMECarna::presets::DRRStagestatic
ROLE_INTENSITIESCarna::presets::DRRStagestatic
rqCarna::base::GeometryStage< base::Renderable::BackToFront >protected
sampleRate() constCarna::presets::VolumeRenderingStage
setBaseIntensity(float baseIntensity)Carna::presets::DRRStage
DEFAULT_RENDER_INVERSE
 Holds default value for inverse rendering.
 
-static const unsigned int ROLE_INTENSITY_VOLUME = 0
 Holds the role that HU volume data is expected to take when attached to base::Geometry nodes.
 
+static const unsigned int ROLE_INTENSITIES = 0
 Holds the role that HU volume data is expected to take when attached to base::Geometry nodes.
 
- Static Public Attributes inherited from Carna::presets::VolumeRenderingStage
static const unsigned int DEFAULT_SAMPLE_RATE = 100
 
virtual const std::string & uniformName (unsigned int role) const override
 Maps ROLE_INTENSITY_VOLUME to huVolume.
 Maps ROLE_INTENSITIES to huVolume.
 
virtual void configureShader () override
RenderStage()Carna::base::RenderStage
reshape(base::FrameRenderer &fr, unsigned int width, unsigned int height) overrideCarna::presets::DVRStagevirtual
rewindRenderQueues()Carna::base::GeometryStage< base::Renderable::BackToFront >protectedvirtual
ROLE_INTENSITY_VOLUMECarna::presets::DVRStagestatic
ROLE_INTENSITIESCarna::presets::DVRStagestatic
ROLE_NORMALSCarna::presets::DVRStagestatic
rqCarna::base::GeometryStage< base::Renderable::BackToFront >protected
sampleRate() constCarna::presets::VolumeRenderingStage
- - - + + + @@ -274,7 +274,7 @@ - + diff --git a/docs/html/classCarna_1_1presets_1_1MIPStage-members.html b/docs/html/classCarna_1_1presets_1_1MIPStage-members.html index 2f2ab61c..99021c79 100644 --- a/docs/html/classCarna_1_1presets_1_1MIPStage-members.html +++ b/docs/html/classCarna_1_1presets_1_1MIPStage-members.html @@ -111,7 +111,7 @@ - + diff --git a/docs/html/classCarna_1_1presets_1_1MIPStage.html b/docs/html/classCarna_1_1presets_1_1MIPStage.html index ed83693e..fd247ebd 100644 --- a/docs/html/classCarna_1_1presets_1_1MIPStage.html +++ b/docs/html/classCarna_1_1presets_1_1MIPStage.html @@ -236,10 +236,10 @@

Static Public Attributes

-static const unsigned int ROLE_INTENSITY_VOLUME = 0
 Holds the role that intensity volume data is expected to take when attached to base::Geometry nodes.
 
+static const unsigned int ROLE_INTENSITIES = 0
 Holds the role that intensity volume data is expected to take when attached to base::Geometry nodes.
 
static const unsigned int ROLE_NORMALS = 1
 Holds the role that the normal map is expected to take when attached to base::Geometry nodes.
 
virtual const std::string & uniformName (unsigned int role) const override
 Maps ROLE_INTENSITY_VOLUME to huVolume and ROLE_NORMALS to normalMap.
 Maps ROLE_INTENSITIES to huVolume and ROLE_NORMALS to normalMap.
 
virtual void configureShader () override
RenderStage()Carna::base::RenderStage
reshape(base::FrameRenderer &fr, unsigned int width, unsigned int height) overrideCarna::presets::MIPStagevirtual
rewindRenderQueues()Carna::base::GeometryStage< base::Renderable::BackToFront >protectedvirtual
ROLE_INTENSITY_VOLUMECarna::presets::MIPStagestatic
ROLE_INTENSITIESCarna::presets::MIPStagestatic
rqCarna::base::GeometryStage< base::Renderable::BackToFront >protected
sampleRate() constCarna::presets::VolumeRenderingStage
setEnabled(bool)Carna::base::RenderStage
- - - + + + diff --git a/docs/html/classCarna_1_1presets_1_1MaskRenderingStage-members.html b/docs/html/classCarna_1_1presets_1_1MaskRenderingStage-members.html index f7dc6118..5d817fd2 100644 --- a/docs/html/classCarna_1_1presets_1_1MaskRenderingStage-members.html +++ b/docs/html/classCarna_1_1presets_1_1MaskRenderingStage-members.html @@ -87,16 +87,16 @@ - - - - - - - - - - + + + + + + + + + + @@ -108,7 +108,7 @@ - + diff --git a/docs/html/classCarna_1_1presets_1_1MaskRenderingStage.html b/docs/html/classCarna_1_1presets_1_1MaskRenderingStage.html index 680fa2d2..ae18b0db 100644 --- a/docs/html/classCarna_1_1presets_1_1MaskRenderingStage.html +++ b/docs/html/classCarna_1_1presets_1_1MaskRenderingStage.html @@ -114,9 +114,9 @@

Static Public Attributes

-static const unsigned int ROLE_INTENSITY_VOLUME = 0
 Holds the role that intensity volume data is expected to take when attached to base::Geometry nodes.
 
+static const unsigned int ROLE_INTENSITIES = 0
 Holds the role that intensity volume data is expected to take when attached to base::Geometry nodes.
 
- Static Public Attributes inherited from Carna::presets::VolumeRenderingStage
static const unsigned int DEFAULT_SAMPLE_RATE = 100
configureShader(const base::Renderable &) overrideCarna::presets::MaskRenderingStageprotectedvirtual
createVolumeSamplers(const std::function< void(unsigned int, base::Sampler *) > &registerSampler) overrideCarna::presets::MaskRenderingStageprotectedvirtual
DEFAULT_COLORCarna::presets::MaskRenderingStagestatic
DEFAULT_SAMPLE_RATECarna::presets::VolumeRenderingStagestatic
GeometryStage(unsigned int geometryType, unsigned int geometryTypeMask=RenderQueue< base::Renderable::BackToFront >::EXACT_MATCH_GEOMETRY_TYPE_MASK)Carna::base::GeometryStage< base::Renderable::BackToFront >
geometryTypeCarna::base::GeometryStage< base::Renderable::BackToFront >
geometryTypeMaskCarna::base::GeometryStage< base::Renderable::BackToFront >
isEnabled() constCarna::base::RenderStage
isInitialized() constCarna::base::RenderStage
isViewTransformFixed() constCarna::base::RenderStage
loadVideoResources() overrideCarna::presets::MaskRenderingStageprotectedvirtual
MaskRenderingStage(unsigned int geometryType, unsigned int maskRole=ROLE_DEFAULT_MASK)Carna::presets::MaskRenderingStageexplicit
maskRoleCarna::presets::MaskRenderingStage
DEFAULT_ROLE_MASKCarna::presets::MaskRenderingStagestatic
DEFAULT_SAMPLE_RATECarna::presets::VolumeRenderingStagestatic
GeometryStage(unsigned int geometryType, unsigned int geometryTypeMask=RenderQueue< base::Renderable::BackToFront >::EXACT_MATCH_GEOMETRY_TYPE_MASK)Carna::base::GeometryStage< base::Renderable::BackToFront >
geometryTypeCarna::base::GeometryStage< base::Renderable::BackToFront >
geometryTypeMaskCarna::base::GeometryStage< base::Renderable::BackToFront >
isEnabled() constCarna::base::RenderStage
isInitialized() constCarna::base::RenderStage
isViewTransformFixed() constCarna::base::RenderStage
loadVideoResources() overrideCarna::presets::MaskRenderingStageprotectedvirtual
MaskRenderingStage(unsigned int geometryType, unsigned int roleMask=DEFAULT_ROLE_MASK)Carna::presets::MaskRenderingStageexplicit
prepareFrame(Node &root) overrideCarna::base::GeometryStage< base::Renderable::BackToFront >virtual
removeRenderStageListener(RenderStageListener &listener)Carna::base::RenderStage
render(const base::Renderable &) overrideCarna::presets::VolumeRenderingStageprotectedvirtual
RenderStage()Carna::base::RenderStage
reshape(base::FrameRenderer &fr, unsigned int width, unsigned int height) overrideCarna::presets::MaskRenderingStagevirtual
rewindRenderQueues()Carna::base::GeometryStage< base::Renderable::BackToFront >protectedvirtual
ROLE_DEFAULT_MASKCarna::presets::MaskRenderingStagestatic
roleMaskCarna::presets::MaskRenderingStage
rqCarna::base::GeometryStage< base::Renderable::BackToFront >protected
sampleRate() constCarna::presets::VolumeRenderingStage
setColor(const base::Color &color)Carna::presets::MaskRenderingStage
- - - + + + @@ -227,10 +227,10 @@

Public Member Functions

 MaskRenderingStage (unsigned int geometryType, unsigned int maskRole=ROLE_DEFAULT_MASK)
 Instantiates. More...
 
 MaskRenderingStage (unsigned int geometryType, unsigned int roleMask=DEFAULT_ROLE_MASK)
 Instantiates. More...
 
virtual ~MaskRenderingStage ()
 Deletes.
- - - + + + @@ -247,10 +247,10 @@ static const base::Color  - - - + + + @@ -272,11 +272,11 @@ - + - + @@ -320,7 +320,7 @@
Note
In the rendering process this stage will usually be inserted as the last stage.

A mask can be produced, for example, by threshold a 3D intensity image:

mask.reset( new base::IntensityVolumeUInt8( scene->volume().size ) );
for( std::size_t pos = 0; pos < mask->buffer().size(); ++pos )
{
mask->buffer()[ pos ] = scene->volume().buffer()[ pos ] > 48000 ? 255 : 0;
}
base::BufferedVectorFieldTexture< base::IntensityVolumeUInt8 >& maskTexture

The mask can then be attached to, for example, an already existing geometry node:

-
geometry.putFeature( mr->maskRole, maskTexture );
maskTexture.release();

This will render an image similar to this:

+
geometry.putFeature( mr->roleMask, maskTexture );
maskTexture.release();

This will render an image similar to this:

MaskRenderingStageTest.png
@@ -331,8 +331,8 @@

Definition at line 59 of file MaskRenderingStage.h.

Constructor & Destructor Documentation

- -

◆ MaskRenderingStage()

+ +

◆ MaskRenderingStage()

@@ -350,7 +350,7 @@

- + @@ -366,7 +366,7 @@

Instantiates.

-

The created stage will render such base::Geometry scene graph nodes, whose geometry types equal geometryType. The mask data will be obtained from maskRole.

+

The created stage will render such base::Geometry scene graph nodes, whose geometry types equal geometryType. The mask data will be obtained from roleMask.

diff --git a/docs/html/functions_d.html b/docs/html/functions_d.html index 14863454..7c900c4b 100644 --- a/docs/html/functions_d.html +++ b/docs/html/functions_d.html @@ -117,8 +117,11 @@

- d -

- + diff --git a/docs/html/inherit_graph_88.map b/docs/html/inherit_graph_88.map index a0dba276..b4640593 100644 --- a/docs/html/inherit_graph_88.map +++ b/docs/html/inherit_graph_88.map @@ -1,3 +1,3 @@ - + diff --git a/docs/html/inherit_graph_88.md5 b/docs/html/inherit_graph_88.md5 index 3003045b..28a40776 100644 --- a/docs/html/inherit_graph_88.md5 +++ b/docs/html/inherit_graph_88.md5 @@ -1 +1 @@ -24d52b72afbe41aeeb8bc8f5a6bc3518 \ No newline at end of file +0123fc939e3c4aef05bfd22f09b24acf \ No newline at end of file diff --git a/docs/html/inherits.html b/docs/html/inherits.html index 5d7aee69..c31d8b0c 100644 --- a/docs/html/inherits.html +++ b/docs/html/inherits.html @@ -586,7 +586,7 @@ - + diff --git a/docs/html/search/all_10.js b/docs/html/search/all_10.js index 8f56a1d1..209246f7 100644 --- a/docs/html/search/all_10.js +++ b/docs/html/search/all_10.js @@ -69,11 +69,11 @@ var searchData= ['result',['result',['../classCarna_1_1base_1_1Stopwatch.html#a5d541f19fd511ded8f2bbeef7f75ee72',1,'Carna::base::Stopwatch']]], ['rewind',['rewind',['../classCarna_1_1base_1_1RenderQueue.html#aee87e8f5d6cf4038678213d5ed2c741d',1,'Carna::base::RenderQueue']]], ['rewindrenderqueues',['rewindRenderQueues',['../classCarna_1_1base_1_1GeometryStage.html#a78ba5c71c663ea7f93501b22ba692ae1',1,'Carna::base::GeometryStage::rewindRenderQueues()'],['../classCarna_1_1presets_1_1CuttingPlanesStage.html#ad2128ff701ca039a6ff27fb784b8f961',1,'Carna::presets::CuttingPlanesStage::rewindRenderQueues()']]], - ['role_5fdefault_5fmask',['ROLE_DEFAULT_MASK',['../classCarna_1_1presets_1_1MaskRenderingStage.html#a3198850d5528481d3a6d964630542cf8',1,'Carna::presets::MaskRenderingStage']]], ['role_5fdefault_5fmaterial',['ROLE_DEFAULT_MATERIAL',['../classCarna_1_1base_1_1MeshRenderingStageBase.html#af2f3f389e4757501a3be3c8751131a79',1,'Carna::base::MeshRenderingStageBase']]], ['role_5fdefault_5fmesh',['ROLE_DEFAULT_MESH',['../classCarna_1_1base_1_1MeshRenderingStageBase.html#a5358a537a3fe04ff0d2a38e9c0da1ebf',1,'Carna::base::MeshRenderingStageBase']]], - ['role_5fintensity_5fvolume',['ROLE_INTENSITY_VOLUME',['../classCarna_1_1presets_1_1CuttingPlanesStage.html#ae2ce7da25cb71d49b4d1b22fecc2f74d',1,'Carna::presets::CuttingPlanesStage::ROLE_INTENSITY_VOLUME()'],['../classCarna_1_1presets_1_1DRRStage.html#a338d0fa4488f044de1fb8e036df77aeb',1,'Carna::presets::DRRStage::ROLE_INTENSITY_VOLUME()'],['../classCarna_1_1presets_1_1DVRStage.html#a9c2cc25cf8da7a7494e32beccc6cf4ec',1,'Carna::presets::DVRStage::ROLE_INTENSITY_VOLUME()'],['../classCarna_1_1presets_1_1MIPStage.html#a4fc455d6f08270b4863f965bf2a4eb1e',1,'Carna::presets::MIPStage::ROLE_INTENSITY_VOLUME()']]], + ['role_5fintensities',['ROLE_INTENSITIES',['../classCarna_1_1presets_1_1CuttingPlanesStage.html#a12dc6a142683391ac57ee94d3d9374a2',1,'Carna::presets::CuttingPlanesStage::ROLE_INTENSITIES()'],['../classCarna_1_1presets_1_1DRRStage.html#a756d7f4278f72e1b0ecb3951992d9173',1,'Carna::presets::DRRStage::ROLE_INTENSITIES()'],['../classCarna_1_1presets_1_1DVRStage.html#a18066a297641d5e032eaa43fa13797ef',1,'Carna::presets::DVRStage::ROLE_INTENSITIES()'],['../classCarna_1_1presets_1_1MIPStage.html#a08958fed6fad19969db558903e98a26f',1,'Carna::presets::MIPStage::ROLE_INTENSITIES()']]], ['role_5fnormals',['ROLE_NORMALS',['../classCarna_1_1presets_1_1DVRStage.html#af20fadb7f7d95b911e26d298273f4792',1,'Carna::presets::DVRStage']]], + ['rolemask',['roleMask',['../classCarna_1_1presets_1_1MaskRenderingStage.html#a2e28c47e1885b8f6a5f042ca92bf4c09',1,'Carna::presets::MaskRenderingStage']]], ['rotatehorizontally',['rotateHorizontally',['../classCarna_1_1base_1_1CameraControl.html#a6a57106709fd05a55f5c6ec1d8e2abac',1,'Carna::base::CameraControl::rotateHorizontally()'],['../classCarna_1_1presets_1_1CameraNavigationControl.html#a54fe15550fa2b803b103f7d85c1811fb',1,'Carna::presets::CameraNavigationControl::rotateHorizontally()'],['../classCarna_1_1presets_1_1CameraShowcaseControl.html#a8dd242e812f9b642cadf1d4edbdb9e38',1,'Carna::presets::CameraShowcaseControl::rotateHorizontally()'],['../classCarna_1_1presets_1_1OrthogonalControl.html#ae294516fb2525185ef293da2aece730c',1,'Carna::presets::OrthogonalControl::rotateHorizontally()']]], ['rotatevertically',['rotateVertically',['../classCarna_1_1base_1_1CameraControl.html#a722eace8bb48405191c8f82ece89eef3',1,'Carna::base::CameraControl::rotateVertically()'],['../classCarna_1_1presets_1_1CameraNavigationControl.html#a7e1adbe79a7bc5c4ff0735f31f1222f6',1,'Carna::presets::CameraNavigationControl::rotateVertically()'],['../classCarna_1_1presets_1_1CameraShowcaseControl.html#a0053fcbf677a1e5e8bc35204f44ef2ae',1,'Carna::presets::CameraShowcaseControl::rotateVertically()'],['../classCarna_1_1presets_1_1OrthogonalControl.html#a47bcc50bbd3a231bcfd7df386a510862',1,'Carna::presets::OrthogonalControl::rotateVertically()']]], ['rotatingcolor',['RotatingColor',['../classCarna_1_1base_1_1RotatingColor.html',1,'Carna::base::RotatingColor'],['../classCarna_1_1base_1_1RotatingColor.html#ae3cbe05101d70f5d8348925d39a1f913',1,'Carna::base::RotatingColor::RotatingColor()']]], diff --git a/docs/html/search/all_11.js b/docs/html/search/all_11.js index 79e74121..4b9b00f3 100644 --- a/docs/html/search/all_11.js +++ b/docs/html/search/all_11.js @@ -35,8 +35,8 @@ var searchData= ['setgeometryshader',['setGeometryShader',['../classCarna_1_1base_1_1ShaderProgram_1_1Factory.html#a6b198d6c469f32aad4a31755988de2e3',1,'Carna::base::ShaderProgram::Factory']]], ['setgrid',['setGrid',['../classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1NormalsComponent.html#a8731a01f5ff50a0a731d83d193d420cd',1,'Carna::helpers::details::VolumeGridHelper::NormalsComponent::setGrid()'],['../classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1NormalsComponent_3_01SegmentIntensityVolumeType_00_01void_01_4.html#a282d1eb79e571f33de8923a519399fec',1,'Carna::helpers::details::VolumeGridHelper::NormalsComponent< SegmentIntensityVolumeType, void >::setGrid()']]], ['setheight',['setHeight',['../classCarna_1_1base_1_1Viewport.html#a0fda2628f1ca14062e6cabf6d708091a',1,'Carna::base::Viewport']]], - ['setintensityvolume',['setIntensityVolume',['../classCarna_1_1base_1_1VolumeSegment.html#a79c122507f2d1eb223467ced147ee9d5',1,'Carna::base::VolumeSegment']]], - ['setintensityvolumerole',['setIntensityVolumeRole',['../classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityComponent.html#a57d96ca6c21fcba32fba4d0c570e3f77',1,'Carna::helpers::details::VolumeGridHelper::IntensityComponent']]], + ['setintensities',['setIntensities',['../classCarna_1_1base_1_1VolumeSegment.html#a0871073d645984754718d42de5b0c789',1,'Carna::base::VolumeSegment']]], + ['setintensitiesrole',['setIntensitiesRole',['../classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityComponent.html#a13868057b3081cf824d6e30440987e4a',1,'Carna::helpers::details::VolumeGridHelper::IntensityComponent']]], ['setlowerthreshold',['setLowerThreshold',['../classCarna_1_1presets_1_1DRRStage.html#aa8056d9f881ba257295cad4b6585a88d',1,'Carna::presets::DRRStage']]], ['setmagfilter',['setMagFilter',['../classCarna_1_1base_1_1Sampler.html#a32245d4b345922c3cec51b2f8b78ee28',1,'Carna::base::Sampler']]], ['setmarginleft',['setMarginLeft',['../classCarna_1_1base_1_1Viewport.html#a15728c2f70aeae9df64b955f1eafa024',1,'Carna::base::Viewport']]], @@ -88,7 +88,7 @@ var searchData= ['setwriter',['setWriter',['../classCarna_1_1base_1_1Log.html#a1a5bfe85c035d2c3f39f0735d194010a',1,'Carna::base::Log']]], ['setzoomstrength',['setZoomStrength',['../classCarna_1_1presets_1_1OrthogonalControl.html#a544ddf2cf84a25bcacd918b8c870f539',1,'Carna::presets::OrthogonalControl']]], ['severity',['Severity',['../classCarna_1_1base_1_1Log.html#a80ada39f636acf2cdb409c5256467937',1,'Carna::base::Log']]], - ['shader',['Shader',['../classCarna_1_1base_1_1Shader.html',1,'Carna::base::Shader'],['../classCarna_1_1base_1_1Shader.html#a7f6af18313806c0bc37604f41b25d535',1,'Carna::base::Shader::Shader()'],['../classCarna_1_1base_1_1GLContext.html#a1fa78e383029d1150babae8fdd8db867',1,'Carna::base::GLContext::shader()'],['../classCarna_1_1base_1_1Material_1_1ManagedInterface.html#a469b3ed1d95e531f58ec5ae9ad4f52c6',1,'Carna::base::Material::ManagedInterface::shader()']]], + ['shader',['Shader',['../classCarna_1_1base_1_1Shader.html',1,'Carna::base::Shader'],['../classCarna_1_1base_1_1GLContext.html#a1fa78e383029d1150babae8fdd8db867',1,'Carna::base::GLContext::shader()'],['../classCarna_1_1base_1_1Material_1_1ManagedInterface.html#a469b3ed1d95e531f58ec5ae9ad4f52c6',1,'Carna::base::Material::ManagedInterface::shader()'],['../classCarna_1_1base_1_1Shader.html#a7f6af18313806c0bc37604f41b25d535',1,'Carna::base::Shader::Shader()']]], ['shader_2eh',['Shader.h',['../Shader_8h.html',1,'']]], ['shadercompilationerror',['ShaderCompilationError',['../classCarna_1_1base_1_1ShaderCompilationError.html',1,'Carna::base::ShaderCompilationError'],['../classCarna_1_1base_1_1ShaderCompilationError.html#a7ac1ffc6a35733ca45487b7de1437053',1,'Carna::base::ShaderCompilationError::ShaderCompilationError(const std::string &details)'],['../classCarna_1_1base_1_1ShaderCompilationError.html#a75ef65e7a02f2b65cbff9b008d7b7a28',1,'Carna::base::ShaderCompilationError::ShaderCompilationError(const std::string &details, const std::string &vertexShaderFile, const std::string &fragmentShaderFile)']]], ['shadercompilationerror_2eh',['ShaderCompilationError.h',['../ShaderCompilationError_8h.html',1,'']]], diff --git a/docs/html/search/all_14.js b/docs/html/search/all_14.js index 38511c8d..573d4ff2 100644 --- a/docs/html/search/all_14.js +++ b/docs/html/search/all_14.js @@ -35,7 +35,7 @@ var searchData= ['videoresourceacquisitionscount',['videoResourceAcquisitionsCount',['../classCarna_1_1base_1_1GeometryFeature.html#a06bf0e7c6abe352a455bf69899036d3e',1,'Carna::base::GeometryFeature']]], ['videoresourcesorder',['VideoResourcesOrder',['../structCarna_1_1base_1_1Renderable_1_1VideoResourcesOrder.html',1,'Carna::base::Renderable']]], ['viewmodeltransform',['viewModelTransform',['../classCarna_1_1base_1_1Renderable.html#aacb1e58132c0460e6fb047154bbaf408',1,'Carna::base::Renderable']]], - ['viewport',['Viewport',['../classCarna_1_1base_1_1Viewport.html',1,'Carna::base::Viewport'],['../classCarna_1_1base_1_1Viewport.html#a8b398d42c04cd20e89203c1a74d618c7',1,'Carna::base::Viewport::Viewport(unsigned int rootWidth, unsigned int rootHeight, bool fitSquare)'],['../classCarna_1_1base_1_1Viewport.html#a0e80bf53f297bb1ec110e465b6f2ab15',1,'Carna::base::Viewport::Viewport(const Framebuffer &)'],['../classCarna_1_1base_1_1Viewport.html#aee09a4edb94c1c1b5660f61a0a635ace',1,'Carna::base::Viewport::Viewport(const Viewport &parent, unsigned int left, unsigned int top, unsigned int width, unsigned int height)'],['../classCarna_1_1base_1_1SpatialMovement.html#a8a49f7e294ae26b349b8f5510a085c6f',1,'Carna::base::SpatialMovement::viewport()'],['../classCarna_1_1base_1_1FrameRenderer.html#acce86ec7aad5152e4c2a9af74d0d140b',1,'Carna::base::FrameRenderer::viewport()']]], + ['viewport',['Viewport',['../classCarna_1_1base_1_1Viewport.html',1,'Carna::base::Viewport'],['../classCarna_1_1base_1_1SpatialMovement.html#a8a49f7e294ae26b349b8f5510a085c6f',1,'Carna::base::SpatialMovement::viewport()'],['../classCarna_1_1base_1_1FrameRenderer.html#acce86ec7aad5152e4c2a9af74d0d140b',1,'Carna::base::FrameRenderer::viewport()'],['../classCarna_1_1base_1_1Viewport.html#a8b398d42c04cd20e89203c1a74d618c7',1,'Carna::base::Viewport::Viewport(unsigned int rootWidth, unsigned int rootHeight, bool fitSquare)'],['../classCarna_1_1base_1_1Viewport.html#a0e80bf53f297bb1ec110e465b6f2ab15',1,'Carna::base::Viewport::Viewport(const Framebuffer &)'],['../classCarna_1_1base_1_1Viewport.html#aee09a4edb94c1c1b5660f61a0a635ace',1,'Carna::base::Viewport::Viewport(const Viewport &parent, unsigned int left, unsigned int top, unsigned int width, unsigned int height)']]], ['viewport_2eh',['Viewport.h',['../Viewport_8h.html',1,'']]], ['viewportheight',['viewportHeight',['../classCarna_1_1base_1_1ProjectionControl.html#aea535c2202eca2b4fa2daf2d4243e760',1,'Carna::base::ProjectionControl']]], ['viewportwidth',['viewportWidth',['../classCarna_1_1base_1_1ProjectionControl.html#a4ee8f6c32fe9ecaded246374ef1a62d1',1,'Carna::base::ProjectionControl']]], diff --git a/docs/html/search/all_15.js b/docs/html/search/all_15.js index 6ce8c47a..2cf2fecf 100644 --- a/docs/html/search/all_15.js +++ b/docs/html/search/all_15.js @@ -3,7 +3,7 @@ var searchData= ['w',['w',['../structCarna_1_1base_1_1VertexPosition.html#a87eaf25d2609631fd905de2501cf58d8',1,'Carna::base::VertexPosition']]], ['warning',['warning',['../classCarna_1_1base_1_1Log.html#a80ada39f636acf2cdb409c5256467937ac3765221773c683da8b901e844e93032',1,'Carna::base::Log']]], ['waterattenuation',['waterAttenuation',['../classCarna_1_1presets_1_1DRRStage.html#a8ced365a1e5a18d6a8455d0d3f863f52',1,'Carna::presets::DRRStage']]], - ['white',['WHITE',['../classCarna_1_1base_1_1Color.html#ad9cbfafbf758c2c139259ac8050225dc',1,'Carna::base::Color::WHITE()'],['../classCarna_1_1base_1_1RotatingColor.html#ab6ed7cd547d006d8b6d00c4e4e31ff2ba1d09c8fd39af81eef87abfbe5a4417fb',1,'Carna::base::RotatingColor::white()']]], + ['white',['white',['../classCarna_1_1base_1_1RotatingColor.html#ab6ed7cd547d006d8b6d00c4e4e31ff2ba1d09c8fd39af81eef87abfbe5a4417fb',1,'Carna::base::RotatingColor::white()'],['../classCarna_1_1base_1_1Color.html#ad9cbfafbf758c2c139259ac8050225dc',1,'Carna::base::Color::WHITE()']]], ['white_5fno_5falpha',['WHITE_NO_ALPHA',['../classCarna_1_1base_1_1Color.html#a6612fc7554d76caa3a528539b52fa7fa',1,'Carna::base::Color']]], ['width',['width',['../classCarna_1_1base_1_1Framebuffer.html#a214eb24f7c0ed6cdbde0aff2ddfa836c',1,'Carna::base::Framebuffer::width()'],['../classCarna_1_1base_1_1FrameRenderer.html#a6cc6aae491b245d44f41b2e27510395b',1,'Carna::base::FrameRenderer::width()'],['../classCarna_1_1base_1_1Viewport.html#aaaa2fc4670f46f5aec35cf960cc98a36',1,'Carna::base::Viewport::width()']]], ['windowinglevel',['windowingLevel',['../classCarna_1_1presets_1_1CuttingPlanesStage.html#a8178ec5717379880cb2ec74f61a3563e',1,'Carna::presets::CuttingPlanesStage']]], diff --git a/docs/html/search/all_4.js b/docs/html/search/all_4.js index bf7aea66..f4b3441a 100644 --- a/docs/html/search/all_4.js +++ b/docs/html/search/all_4.js @@ -16,7 +16,8 @@ var searchData= ['default_5focclusion_5ftranslucency',['DEFAULT_OCCLUSION_TRANSLUCENCY',['../classCarna_1_1presets_1_1OccludedRenderingStage.html#a9094998ff61aafec1db421aebcc6dfa8',1,'Carna::presets::OccludedRenderingStage']]], ['default_5fpoint_5fsize',['DEFAULT_POINT_SIZE',['../classCarna_1_1helpers_1_1PointMarkerHelper.html#a6dba042864ac37667f33e5112d0ef899',1,'Carna::helpers::PointMarkerHelper']]], ['default_5frender_5finverse',['DEFAULT_RENDER_INVERSE',['../classCarna_1_1presets_1_1DRRStage.html#a4fd43836093eacc1aed46a08a9aab5a2',1,'Carna::presets::DRRStage']]], - ['default_5frole_5fintensity_5fvolume',['DEFAULT_ROLE_INTENSITY_VOLUME',['../classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityComponent.html#a660bc541fb6fb5125dfc94bd76bfdea2',1,'Carna::helpers::details::VolumeGridHelper::IntensityComponent']]], + ['default_5frole_5fintensities',['DEFAULT_ROLE_INTENSITIES',['../classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityComponent.html#a10e0094823d173cb3298ad46938bea17',1,'Carna::helpers::details::VolumeGridHelper::IntensityComponent']]], + ['default_5frole_5fmask',['DEFAULT_ROLE_MASK',['../classCarna_1_1presets_1_1MaskRenderingStage.html#ab8f1bcec63db5eec4f6c628ffd5d06af',1,'Carna::presets::MaskRenderingStage']]], ['default_5frole_5fnormals',['DEFAULT_ROLE_NORMALS',['../classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1NormalsComponent.html#ac4088b85394e78b333ca41358b2b8ac3',1,'Carna::helpers::details::VolumeGridHelper::NormalsComponent']]], ['default_5fsample_5frate',['DEFAULT_SAMPLE_RATE',['../classCarna_1_1presets_1_1VolumeRenderingStage.html#a9f7a5cbbdb68dcaac5ce451bf9a0a1cc',1,'Carna::presets::VolumeRenderingStage']]], ['default_5ftranslucence',['DEFAULT_TRANSLUCENCE',['../classCarna_1_1presets_1_1DVRStage.html#af2a4b97c2ff4ce9a6f1f8e9a39e883f0',1,'Carna::presets::DVRStage']]], diff --git a/docs/html/search/all_8.js b/docs/html/search/all_8.js index 53e8aa1c..721ac218 100644 --- a/docs/html/search/all_8.js +++ b/docs/html/search/all_8.js @@ -3,7 +3,7 @@ var searchData= ['hasboundingvolume',['hasBoundingVolume',['../classCarna_1_1base_1_1Geometry.html#a83f6858c2a921f6c40243f4e26ce05aa',1,'Carna::base::Geometry']]], ['haschild',['hasChild',['../classCarna_1_1base_1_1Node.html#a6d77da1a33ebda532f15bb133bd5d778',1,'Carna::base::Node']]], ['hasfeature',['hasFeature',['../classCarna_1_1base_1_1Geometry.html#a3872b346aa4cdca133d4b38b0722325b',1,'Carna::base::Geometry::hasFeature(const GeometryFeature &feature) const'],['../classCarna_1_1base_1_1Geometry.html#ad1d73fa80f81623eaa253254702693c1',1,'Carna::base::Geometry::hasFeature(unsigned int role) const']]], - ['hasintensityvolume',['hasIntensityVolume',['../classCarna_1_1base_1_1VolumeSegment.html#ac88636cd53a3f3e30ca2c3ca3364a615',1,'Carna::base::VolumeSegment']]], + ['hasintensities',['hasIntensities',['../classCarna_1_1base_1_1VolumeSegment.html#ab2d4ede2d9de05ecd0ffaa51a1c14ef4',1,'Carna::base::VolumeSegment']]], ['hasmovedspatial',['hasMovedSpatial',['../classCarna_1_1base_1_1SpatialMovement.html#a39414c0fba519efb35ea3eb190ea7ea3',1,'Carna::base::SpatialMovement']]], ['hasnormals',['hasNormals',['../classCarna_1_1base_1_1VolumeSegmentNormalsComponent.html#a4f309dd5b2865c7084ecb0816fe2e609',1,'Carna::base::VolumeSegmentNormalsComponent']]], ['hasparameter',['hasParameter',['../classCarna_1_1base_1_1Material.html#a2cd5c3d4efe3d259bf18f934fc30a877',1,'Carna::base::Material']]], diff --git a/docs/html/search/all_9.js b/docs/html/search/all_9.js index 167b5e41..c83b4f36 100644 --- a/docs/html/search/all_9.js +++ b/docs/html/search/all_9.js @@ -16,14 +16,15 @@ var searchData= ['initialcolor',['initialColor',['../classCarna_1_1base_1_1RotatingColor.html#a7197a511a974d8946ff98d0f6d1203fc',1,'Carna::base::RotatingColor']]], ['initializesegment',['initializeSegment',['../classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityComponent.html#aff2b7ead27d0bc6a31f8363986af5bd5',1,'Carna::helpers::details::VolumeGridHelper::IntensityComponent::initializeSegment()'],['../classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1NormalsComponent.html#ad5f666e826a2e536c91a2e61a5552166',1,'Carna::helpers::details::VolumeGridHelper::NormalsComponent::initializeSegment()'],['../classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1NormalsComponent_3_01SegmentIntensityVolumeType_00_01void_01_4.html#a67e676eb84e7b7762b801706e8f3519b',1,'Carna::helpers::details::VolumeGridHelper::NormalsComponent< SegmentIntensityVolumeType, void >::initializeSegment()']]], ['instance',['Instance',['../classCarna_1_1base_1_1Singleton.html#ae6f3c6ee4b7d689b82eaa5b6f6973c5c',1,'Carna::base::Singleton::Instance()'],['../classCarna_1_1base_1_1Singleton.html#a1f55c4604dcdd90886fce91a27fb035a',1,'Carna::base::Singleton::instance()']]], + ['intensities',['intensities',['../classCarna_1_1base_1_1VolumeSegment.html#af9d70962a88bb5624a23c3187b2f49e9',1,'Carna::base::VolumeSegment::intensities()'],['../classCarna_1_1base_1_1VolumeSegment.html#a564d6e48729356adfc128ec19a305501',1,'Carna::base::VolumeSegment::intensities() const']]], + ['intensitiesrole',['intensitiesRole',['../classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityComponent.html#a3fbecc84fcbecaa9030e1fbf0f9a171f',1,'Carna::helpers::details::VolumeGridHelper::IntensityComponent']]], ['intensitycomponent',['IntensityComponent',['../classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityComponent.html',1,'Carna::helpers::details::VolumeGridHelper::IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >'],['../classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityComponent.html#ae3e7a5e4c8d219c87920aeb4abf12ded',1,'Carna::helpers::details::VolumeGridHelper::IntensityComponent::IntensityComponent()']]], ['intensityrange',['intensityRange',['../classCarna_1_1presets_1_1MIPLayer.html#a645f519ca5f9d4e55d10a89b9593b94c',1,'Carna::presets::MIPLayer']]], ['intensityselector',['IntensitySelector',['../structCarna_1_1base_1_1VolumeGrid_1_1IntensitySelector.html',1,'Carna::base::VolumeGrid']]], ['intensitytexturefactory',['IntensityTextureFactory',['../structCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityTextureFactory.html',1,'Carna::helpers::details::VolumeGridHelper']]], ['intensitytobuffervalue',['intensityToBufferValue',['../classCarna_1_1base_1_1BufferedIntensityVolume.html#aeacabb103f995726b2dfff9b1d06fc53',1,'Carna::base::BufferedIntensityVolume']]], - ['intensityvolume',['IntensityVolume',['../classCarna_1_1base_1_1IntensityVolume.html',1,'Carna::base::IntensityVolume'],['../classCarna_1_1base_1_1VolumeSegment.html#ac705ca1a12e27788af09a1bd4b6bd027',1,'Carna::base::VolumeSegment::intensityVolume()'],['../classCarna_1_1base_1_1VolumeSegment.html#afe0550f36257be77f823a2740efe558c',1,'Carna::base::VolumeSegment::intensityVolume() const'],['../classCarna_1_1base_1_1VolumeSegment.html#a4c4597371aff28d263639641cfc3e3a6',1,'Carna::base::VolumeSegment::IntensityVolume()'],['../classCarna_1_1base_1_1IntensityVolume.html#ab32d60708240cf9dacb8aa1847340120',1,'Carna::base::IntensityVolume::IntensityVolume()'],['../classCarna_1_1base_1_1IntensityVolume.html#a796d4bedeb7902d9ec37eb5e70b054c8',1,'Carna::base::IntensityVolume::IntensityVolume(const math::Vector3ui &size)']]], + ['intensityvolume',['IntensityVolume',['../classCarna_1_1base_1_1IntensityVolume.html',1,'Carna::base::IntensityVolume'],['../classCarna_1_1base_1_1VolumeSegment.html#a4c4597371aff28d263639641cfc3e3a6',1,'Carna::base::VolumeSegment::IntensityVolume()'],['../classCarna_1_1base_1_1IntensityVolume.html#ab32d60708240cf9dacb8aa1847340120',1,'Carna::base::IntensityVolume::IntensityVolume()'],['../classCarna_1_1base_1_1IntensityVolume.html#a796d4bedeb7902d9ec37eb5e70b054c8',1,'Carna::base::IntensityVolume::IntensityVolume(const math::Vector3ui &size)']]], ['intensityvolume_2eh',['IntensityVolume.h',['../IntensityVolume_8h.html',1,'']]], - ['intensityvolumerole',['intensityVolumeRole',['../classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityComponent.html#aa6fc1e23f16968fb012e1776d3c2109b',1,'Carna::helpers::details::VolumeGridHelper::IntensityComponent']]], ['intensityvolumeuint16',['IntensityVolumeUInt16',['../namespaceCarna_1_1base.html#ad880df076e915679124c8c3269132768',1,'Carna::base']]], ['intensityvolumeuint8',['IntensityVolumeUInt8',['../namespaceCarna_1_1base.html#a83f03486b11d543d87e1ce37a04490ae',1,'Carna::base']]], ['interleave',['interleave',['../classCarna_1_1presets_1_1CompositionStage.html#a390b262ff81315950ca00bcca4f0e085a5b537f344012987073b05c19fd5bf75a',1,'Carna::presets::CompositionStage']]], diff --git a/docs/html/search/all_b.js b/docs/html/search/all_b.js index 7a3bf531..083589b3 100644 --- a/docs/html/search/all_b.js +++ b/docs/html/search/all_b.js @@ -18,11 +18,10 @@ var searchData= ['marginleft',['marginLeft',['../classCarna_1_1base_1_1Viewport.html#a686f664322df9118a6010bde2720b172',1,'Carna::base::Viewport']]], ['marginright',['marginRight',['../classCarna_1_1base_1_1Viewport.html#a24d4a1bf65dd0304ea77ff8c6d49f9c9',1,'Carna::base::Viewport']]], ['margintop',['marginTop',['../classCarna_1_1base_1_1Viewport.html#a0b6206ff5e96aae4d87ea207ff3bfd8f',1,'Carna::base::Viewport']]], - ['maskrenderingstage',['MaskRenderingStage',['../classCarna_1_1presets_1_1MaskRenderingStage.html',1,'Carna::presets::MaskRenderingStage'],['../classCarna_1_1presets_1_1MaskRenderingStage.html#a686e7b3f88895ddec6034e19fd60fbf9',1,'Carna::presets::MaskRenderingStage::MaskRenderingStage()']]], + ['maskrenderingstage',['MaskRenderingStage',['../classCarna_1_1presets_1_1MaskRenderingStage.html',1,'Carna::presets::MaskRenderingStage'],['../classCarna_1_1presets_1_1MaskRenderingStage.html#abcc15788b4b3866b6a70690fb67d3327',1,'Carna::presets::MaskRenderingStage::MaskRenderingStage()']]], ['maskrenderingstage_2eh',['MaskRenderingStage.h',['../MaskRenderingStage_8h.html',1,'']]], ['maskrenderingstageintegrationtest',['MaskRenderingStageIntegrationTest',['../classCarna_1_1testing_1_1MaskRenderingStageIntegrationTest.html',1,'Carna::testing']]], ['maskrenderingstagetest',['MaskRenderingStageTest',['../classCarna_1_1testing_1_1MaskRenderingStageTest.html',1,'Carna::testing']]], - ['maskrole',['maskRole',['../classCarna_1_1presets_1_1MaskRenderingStage.html#acf1c393bf132bf0af4cf09be9fb6a52f',1,'Carna::presets::MaskRenderingStage']]], ['material',['Material',['../classCarna_1_1base_1_1Material.html',1,'Carna::base::Material'],['../classCarna_1_1base_1_1Material.html#a0e571bb93cac82234d8de709e45ad5c0',1,'Carna::base::Material::Material()'],['../classCarna_1_1base_1_1Material_1_1ManagedInterface.html#a5b9e08ef0dcab5d5763b2ea7048c125f',1,'Carna::base::Material::ManagedInterface::material()']]], ['material_2eh',['Material.h',['../Material_8h.html',1,'']]], ['materialrole',['materialRole',['../classCarna_1_1helpers_1_1PointMarkerHelper.html#ac8537d5a2dcf06ac5e0794ad886c311a',1,'Carna::helpers::PointMarkerHelper']]], diff --git a/docs/html/search/functions_10.js b/docs/html/search/functions_10.js index bda05e8f..8ee2bf10 100644 --- a/docs/html/search/functions_10.js +++ b/docs/html/search/functions_10.js @@ -30,8 +30,8 @@ var searchData= ['setgeometryshader',['setGeometryShader',['../classCarna_1_1base_1_1ShaderProgram_1_1Factory.html#a6b198d6c469f32aad4a31755988de2e3',1,'Carna::base::ShaderProgram::Factory']]], ['setgrid',['setGrid',['../classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1NormalsComponent.html#a8731a01f5ff50a0a731d83d193d420cd',1,'Carna::helpers::details::VolumeGridHelper::NormalsComponent::setGrid()'],['../classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1NormalsComponent_3_01SegmentIntensityVolumeType_00_01void_01_4.html#a282d1eb79e571f33de8923a519399fec',1,'Carna::helpers::details::VolumeGridHelper::NormalsComponent< SegmentIntensityVolumeType, void >::setGrid()']]], ['setheight',['setHeight',['../classCarna_1_1base_1_1Viewport.html#a0fda2628f1ca14062e6cabf6d708091a',1,'Carna::base::Viewport']]], - ['setintensityvolume',['setIntensityVolume',['../classCarna_1_1base_1_1VolumeSegment.html#a79c122507f2d1eb223467ced147ee9d5',1,'Carna::base::VolumeSegment']]], - ['setintensityvolumerole',['setIntensityVolumeRole',['../classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityComponent.html#a57d96ca6c21fcba32fba4d0c570e3f77',1,'Carna::helpers::details::VolumeGridHelper::IntensityComponent']]], + ['setintensities',['setIntensities',['../classCarna_1_1base_1_1VolumeSegment.html#a0871073d645984754718d42de5b0c789',1,'Carna::base::VolumeSegment']]], + ['setintensitiesrole',['setIntensitiesRole',['../classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityComponent.html#a13868057b3081cf824d6e30440987e4a',1,'Carna::helpers::details::VolumeGridHelper::IntensityComponent']]], ['setlowerthreshold',['setLowerThreshold',['../classCarna_1_1presets_1_1DRRStage.html#aa8056d9f881ba257295cad4b6585a88d',1,'Carna::presets::DRRStage']]], ['setmagfilter',['setMagFilter',['../classCarna_1_1base_1_1Sampler.html#a32245d4b345922c3cec51b2f8b78ee28',1,'Carna::base::Sampler']]], ['setmarginleft',['setMarginLeft',['../classCarna_1_1base_1_1Viewport.html#a15728c2f70aeae9df64b955f1eafa024',1,'Carna::base::Viewport']]], @@ -81,7 +81,7 @@ var searchData= ['setwrapmodet',['setWrapModeT',['../classCarna_1_1base_1_1Sampler.html#a34a5ff66ba81d047e27b170b2bff791a',1,'Carna::base::Sampler']]], ['setwriter',['setWriter',['../classCarna_1_1base_1_1Log.html#a1a5bfe85c035d2c3f39f0735d194010a',1,'Carna::base::Log']]], ['setzoomstrength',['setZoomStrength',['../classCarna_1_1presets_1_1OrthogonalControl.html#a544ddf2cf84a25bcacd918b8c870f539',1,'Carna::presets::OrthogonalControl']]], - ['shader',['Shader',['../classCarna_1_1base_1_1Shader.html#a7f6af18313806c0bc37604f41b25d535',1,'Carna::base::Shader::Shader()'],['../classCarna_1_1base_1_1GLContext.html#a1fa78e383029d1150babae8fdd8db867',1,'Carna::base::GLContext::shader()'],['../classCarna_1_1base_1_1Material_1_1ManagedInterface.html#a469b3ed1d95e531f58ec5ae9ad4f52c6',1,'Carna::base::Material::ManagedInterface::shader()']]], + ['shader',['shader',['../classCarna_1_1base_1_1GLContext.html#a1fa78e383029d1150babae8fdd8db867',1,'Carna::base::GLContext::shader()'],['../classCarna_1_1base_1_1Material_1_1ManagedInterface.html#a469b3ed1d95e531f58ec5ae9ad4f52c6',1,'Carna::base::Material::ManagedInterface::shader()'],['../classCarna_1_1base_1_1Shader.html#a7f6af18313806c0bc37604f41b25d535',1,'Carna::base::Shader::Shader()']]], ['shadercompilationerror',['ShaderCompilationError',['../classCarna_1_1base_1_1ShaderCompilationError.html#a7ac1ffc6a35733ca45487b7de1437053',1,'Carna::base::ShaderCompilationError::ShaderCompilationError(const std::string &details)'],['../classCarna_1_1base_1_1ShaderCompilationError.html#a75ef65e7a02f2b65cbff9b008d7b7a28',1,'Carna::base::ShaderCompilationError::ShaderCompilationError(const std::string &details, const std::string &vertexShaderFile, const std::string &fragmentShaderFile)']]], ['shadermanager',['ShaderManager',['../classCarna_1_1base_1_1ShaderManager.html#a16f6328105e9e149dd5f6bfc5b65bfb2',1,'Carna::base::ShaderManager']]], ['shaderuniform',['ShaderUniform',['../classCarna_1_1base_1_1ShaderUniform.html#acf72361abf91621d18cbde520b6a33c1',1,'Carna::base::ShaderUniform']]], diff --git a/docs/html/search/functions_13.js b/docs/html/search/functions_13.js index 8eb412d8..c9911a14 100644 --- a/docs/html/search/functions_13.js +++ b/docs/html/search/functions_13.js @@ -12,7 +12,7 @@ var searchData= ['videoresource',['videoResource',['../classCarna_1_1base_1_1GeometryStage.html#ac7a41e16197f44711b83839cc9733b51',1,'Carna::base::GeometryStage::videoResource(GeometryFeatureType &geometryFeature) const'],['../classCarna_1_1base_1_1GeometryStage.html#a9e705c44373111f533e056ba2827aaf4',1,'Carna::base::GeometryStage::videoResource(const GeometryFeatureType &geometryFeature) const']]], ['videoresourceacquisitionscount',['videoResourceAcquisitionsCount',['../classCarna_1_1base_1_1GeometryFeature.html#a06bf0e7c6abe352a455bf69899036d3e',1,'Carna::base::GeometryFeature']]], ['viewmodeltransform',['viewModelTransform',['../classCarna_1_1base_1_1Renderable.html#aacb1e58132c0460e6fb047154bbaf408',1,'Carna::base::Renderable']]], - ['viewport',['Viewport',['../classCarna_1_1base_1_1Viewport.html#a8b398d42c04cd20e89203c1a74d618c7',1,'Carna::base::Viewport::Viewport(unsigned int rootWidth, unsigned int rootHeight, bool fitSquare)'],['../classCarna_1_1base_1_1Viewport.html#a0e80bf53f297bb1ec110e465b6f2ab15',1,'Carna::base::Viewport::Viewport(const Framebuffer &)'],['../classCarna_1_1base_1_1Viewport.html#aee09a4edb94c1c1b5660f61a0a635ace',1,'Carna::base::Viewport::Viewport(const Viewport &parent, unsigned int left, unsigned int top, unsigned int width, unsigned int height)'],['../classCarna_1_1base_1_1FrameRenderer.html#acce86ec7aad5152e4c2a9af74d0d140b',1,'Carna::base::FrameRenderer::viewport()']]], + ['viewport',['viewport',['../classCarna_1_1base_1_1FrameRenderer.html#acce86ec7aad5152e4c2a9af74d0d140b',1,'Carna::base::FrameRenderer::viewport()'],['../classCarna_1_1base_1_1Viewport.html#a8b398d42c04cd20e89203c1a74d618c7',1,'Carna::base::Viewport::Viewport(unsigned int rootWidth, unsigned int rootHeight, bool fitSquare)'],['../classCarna_1_1base_1_1Viewport.html#a0e80bf53f297bb1ec110e465b6f2ab15',1,'Carna::base::Viewport::Viewport(const Framebuffer &)'],['../classCarna_1_1base_1_1Viewport.html#aee09a4edb94c1c1b5660f61a0a635ace',1,'Carna::base::Viewport::Viewport(const Viewport &parent, unsigned int left, unsigned int top, unsigned int width, unsigned int height)']]], ['viewportheight',['viewportHeight',['../classCarna_1_1base_1_1ProjectionControl.html#aea535c2202eca2b4fa2daf2d4243e760',1,'Carna::base::ProjectionControl']]], ['viewportwidth',['viewportWidth',['../classCarna_1_1base_1_1ProjectionControl.html#a4ee8f6c32fe9ecaded246374ef1a62d1',1,'Carna::base::ProjectionControl']]], ['viewtransform',['viewTransform',['../classCarna_1_1base_1_1Camera.html#abd57dba12e7142ceaf55cadc0c3d0069',1,'Carna::base::Camera::viewTransform()'],['../classCarna_1_1base_1_1RenderTask.html#a257edb33d81bfd5e118c9111bb5e387b',1,'Carna::base::RenderTask::viewTransform()']]], diff --git a/docs/html/search/functions_7.js b/docs/html/search/functions_7.js index fde4bc2c..13e6acd9 100644 --- a/docs/html/search/functions_7.js +++ b/docs/html/search/functions_7.js @@ -3,7 +3,7 @@ var searchData= ['hasboundingvolume',['hasBoundingVolume',['../classCarna_1_1base_1_1Geometry.html#a83f6858c2a921f6c40243f4e26ce05aa',1,'Carna::base::Geometry']]], ['haschild',['hasChild',['../classCarna_1_1base_1_1Node.html#a6d77da1a33ebda532f15bb133bd5d778',1,'Carna::base::Node']]], ['hasfeature',['hasFeature',['../classCarna_1_1base_1_1Geometry.html#a3872b346aa4cdca133d4b38b0722325b',1,'Carna::base::Geometry::hasFeature(const GeometryFeature &feature) const'],['../classCarna_1_1base_1_1Geometry.html#ad1d73fa80f81623eaa253254702693c1',1,'Carna::base::Geometry::hasFeature(unsigned int role) const']]], - ['hasintensityvolume',['hasIntensityVolume',['../classCarna_1_1base_1_1VolumeSegment.html#ac88636cd53a3f3e30ca2c3ca3364a615',1,'Carna::base::VolumeSegment']]], + ['hasintensities',['hasIntensities',['../classCarna_1_1base_1_1VolumeSegment.html#ab2d4ede2d9de05ecd0ffaa51a1c14ef4',1,'Carna::base::VolumeSegment']]], ['hasmovedspatial',['hasMovedSpatial',['../classCarna_1_1base_1_1SpatialMovement.html#a39414c0fba519efb35ea3eb190ea7ea3',1,'Carna::base::SpatialMovement']]], ['hasnormals',['hasNormals',['../classCarna_1_1base_1_1VolumeSegmentNormalsComponent.html#a4f309dd5b2865c7084ecb0816fe2e609',1,'Carna::base::VolumeSegmentNormalsComponent']]], ['hasparameter',['hasParameter',['../classCarna_1_1base_1_1Material.html#a2cd5c3d4efe3d259bf18f934fc30a877',1,'Carna::base::Material']]], diff --git a/docs/html/search/functions_8.js b/docs/html/search/functions_8.js index 19c44986..53b7b8ed 100644 --- a/docs/html/search/functions_8.js +++ b/docs/html/search/functions_8.js @@ -7,10 +7,11 @@ var searchData= ['indexbufferbase',['IndexBufferBase',['../classCarna_1_1base_1_1IndexBufferBase.html#a6f6b45a0a447a9531aa629a1031966fc',1,'Carna::base::IndexBufferBase']]], ['initializesegment',['initializeSegment',['../classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityComponent.html#aff2b7ead27d0bc6a31f8363986af5bd5',1,'Carna::helpers::details::VolumeGridHelper::IntensityComponent::initializeSegment()'],['../classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1NormalsComponent.html#ad5f666e826a2e536c91a2e61a5552166',1,'Carna::helpers::details::VolumeGridHelper::NormalsComponent::initializeSegment()'],['../classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1NormalsComponent_3_01SegmentIntensityVolumeType_00_01void_01_4.html#a67e676eb84e7b7762b801706e8f3519b',1,'Carna::helpers::details::VolumeGridHelper::NormalsComponent< SegmentIntensityVolumeType, void >::initializeSegment()']]], ['instance',['instance',['../classCarna_1_1base_1_1Singleton.html#a1f55c4604dcdd90886fce91a27fb035a',1,'Carna::base::Singleton']]], + ['intensities',['intensities',['../classCarna_1_1base_1_1VolumeSegment.html#af9d70962a88bb5624a23c3187b2f49e9',1,'Carna::base::VolumeSegment::intensities()'],['../classCarna_1_1base_1_1VolumeSegment.html#a564d6e48729356adfc128ec19a305501',1,'Carna::base::VolumeSegment::intensities() const']]], + ['intensitiesrole',['intensitiesRole',['../classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityComponent.html#a3fbecc84fcbecaa9030e1fbf0f9a171f',1,'Carna::helpers::details::VolumeGridHelper::IntensityComponent']]], ['intensitycomponent',['IntensityComponent',['../classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityComponent.html#ae3e7a5e4c8d219c87920aeb4abf12ded',1,'Carna::helpers::details::VolumeGridHelper::IntensityComponent']]], ['intensitytobuffervalue',['intensityToBufferValue',['../classCarna_1_1base_1_1BufferedIntensityVolume.html#aeacabb103f995726b2dfff9b1d06fc53',1,'Carna::base::BufferedIntensityVolume']]], - ['intensityvolume',['intensityVolume',['../classCarna_1_1base_1_1VolumeSegment.html#ac705ca1a12e27788af09a1bd4b6bd027',1,'Carna::base::VolumeSegment::intensityVolume()'],['../classCarna_1_1base_1_1VolumeSegment.html#afe0550f36257be77f823a2740efe558c',1,'Carna::base::VolumeSegment::intensityVolume() const'],['../classCarna_1_1base_1_1IntensityVolume.html#ab32d60708240cf9dacb8aa1847340120',1,'Carna::base::IntensityVolume::IntensityVolume()'],['../classCarna_1_1base_1_1IntensityVolume.html#a796d4bedeb7902d9ec37eb5e70b054c8',1,'Carna::base::IntensityVolume::IntensityVolume(const math::Vector3ui &size)']]], - ['intensityvolumerole',['intensityVolumeRole',['../classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityComponent.html#aa6fc1e23f16968fb012e1776d3c2109b',1,'Carna::helpers::details::VolumeGridHelper::IntensityComponent']]], + ['intensityvolume',['IntensityVolume',['../classCarna_1_1base_1_1IntensityVolume.html#ab32d60708240cf9dacb8aa1847340120',1,'Carna::base::IntensityVolume::IntensityVolume()'],['../classCarna_1_1base_1_1IntensityVolume.html#a796d4bedeb7902d9ec37eb5e70b054c8',1,'Carna::base::IntensityVolume::IntensityVolume(const math::Vector3ui &size)']]], ['invalidate',['invalidate',['../classCarna_1_1base_1_1Node.html#ab599f82354aa306c65a98f7614ab9e63',1,'Carna::base::Node::invalidate()'],['../classCarna_1_1base_1_1Spatial.html#a34c024014c09b5aec9179c3528daee4a',1,'Carna::base::Spatial::invalidate()']]], ['invalidateprojection',['invalidateProjection',['../classCarna_1_1base_1_1ProjectionControl.html#a12cf98afb7f21c9e00a0eacdbe513675',1,'Carna::base::ProjectionControl']]], ['inversetransform',['inverseTransform',['../classCarna_1_1base_1_1BoundingVolume.html#a2e62e712ef791ddc136fdd5f1d14a535',1,'Carna::base::BoundingVolume']]], diff --git a/docs/html/search/functions_a.js b/docs/html/search/functions_a.js index 1614ef8f..15641dc3 100644 --- a/docs/html/search/functions_a.js +++ b/docs/html/search/functions_a.js @@ -12,7 +12,7 @@ var searchData= ['marginleft',['marginLeft',['../classCarna_1_1base_1_1Viewport.html#a686f664322df9118a6010bde2720b172',1,'Carna::base::Viewport']]], ['marginright',['marginRight',['../classCarna_1_1base_1_1Viewport.html#a24d4a1bf65dd0304ea77ff8c6d49f9c9',1,'Carna::base::Viewport']]], ['margintop',['marginTop',['../classCarna_1_1base_1_1Viewport.html#a0b6206ff5e96aae4d87ea207ff3bfd8f',1,'Carna::base::Viewport']]], - ['maskrenderingstage',['MaskRenderingStage',['../classCarna_1_1presets_1_1MaskRenderingStage.html#a686e7b3f88895ddec6034e19fd60fbf9',1,'Carna::presets::MaskRenderingStage']]], + ['maskrenderingstage',['MaskRenderingStage',['../classCarna_1_1presets_1_1MaskRenderingStage.html#abcc15788b4b3866b6a70690fb67d3327',1,'Carna::presets::MaskRenderingStage']]], ['material',['Material',['../classCarna_1_1base_1_1Material.html#a0e571bb93cac82234d8de709e45ad5c0',1,'Carna::base::Material']]], ['maxabselement',['maxAbsElement',['../namespaceCarna_1_1base_1_1math.html#ab6bf23d3a419b8eaf955ab49136b7f77',1,'Carna::base::math']]], ['maxdistance',['maxDistance',['../classCarna_1_1presets_1_1CameraShowcaseControl.html#a4dbaa6848736ba96671961cc503349d7',1,'Carna::presets::CameraShowcaseControl']]], diff --git a/docs/html/search/variables_3.js b/docs/html/search/variables_3.js index fbb5f6b4..11b89fb2 100644 --- a/docs/html/search/variables_3.js +++ b/docs/html/search/variables_3.js @@ -14,7 +14,8 @@ var searchData= ['default_5focclusion_5ftranslucency',['DEFAULT_OCCLUSION_TRANSLUCENCY',['../classCarna_1_1presets_1_1OccludedRenderingStage.html#a9094998ff61aafec1db421aebcc6dfa8',1,'Carna::presets::OccludedRenderingStage']]], ['default_5fpoint_5fsize',['DEFAULT_POINT_SIZE',['../classCarna_1_1helpers_1_1PointMarkerHelper.html#a6dba042864ac37667f33e5112d0ef899',1,'Carna::helpers::PointMarkerHelper']]], ['default_5frender_5finverse',['DEFAULT_RENDER_INVERSE',['../classCarna_1_1presets_1_1DRRStage.html#a4fd43836093eacc1aed46a08a9aab5a2',1,'Carna::presets::DRRStage']]], - ['default_5frole_5fintensity_5fvolume',['DEFAULT_ROLE_INTENSITY_VOLUME',['../classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityComponent.html#a660bc541fb6fb5125dfc94bd76bfdea2',1,'Carna::helpers::details::VolumeGridHelper::IntensityComponent']]], + ['default_5frole_5fintensities',['DEFAULT_ROLE_INTENSITIES',['../classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityComponent.html#a10e0094823d173cb3298ad46938bea17',1,'Carna::helpers::details::VolumeGridHelper::IntensityComponent']]], + ['default_5frole_5fmask',['DEFAULT_ROLE_MASK',['../classCarna_1_1presets_1_1MaskRenderingStage.html#ab8f1bcec63db5eec4f6c628ffd5d06af',1,'Carna::presets::MaskRenderingStage']]], ['default_5frole_5fnormals',['DEFAULT_ROLE_NORMALS',['../classCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1NormalsComponent.html#ac4088b85394e78b333ca41358b2b8ac3',1,'Carna::helpers::details::VolumeGridHelper::NormalsComponent']]], ['default_5fsample_5frate',['DEFAULT_SAMPLE_RATE',['../classCarna_1_1presets_1_1VolumeRenderingStage.html#a9f7a5cbbdb68dcaac5ce451bf9a0a1cc',1,'Carna::presets::VolumeRenderingStage']]], ['default_5ftranslucence',['DEFAULT_TRANSLUCENCE',['../classCarna_1_1presets_1_1DVRStage.html#af2a4b97c2ff4ce9a6f1f8e9a39e883f0',1,'Carna::presets::DVRStage']]], diff --git a/docs/html/search/variables_9.js b/docs/html/search/variables_9.js index fba63351..65fcb66e 100644 --- a/docs/html/search/variables_9.js +++ b/docs/html/search/variables_9.js @@ -1,7 +1,6 @@ var searchData= [ ['managed',['managed',['../classCarna_1_1base_1_1ManagedMeshInterface.html#a423c284ef2ab303e4de5deca2db127f4',1,'Carna::base::ManagedMeshInterface::managed()'],['../classCarna_1_1base_1_1ManagedTexture3DInterface.html#aa93c7ffafa8896a394a9e1b108968b87',1,'Carna::base::ManagedTexture3DInterface::managed()']]], - ['maskrole',['maskRole',['../classCarna_1_1presets_1_1MaskRenderingStage.html#acf1c393bf132bf0af4cf09be9fb6a52f',1,'Carna::presets::MaskRenderingStage']]], ['material',['material',['../classCarna_1_1base_1_1Material_1_1ManagedInterface.html#a5b9e08ef0dcab5d5763b2ea7048c125f',1,'Carna::base::Material::ManagedInterface']]], ['materialrole',['materialRole',['../classCarna_1_1helpers_1_1PointMarkerHelper.html#ac8537d5a2dcf06ac5e0794ad886c311a',1,'Carna::helpers::PointMarkerHelper']]], ['maximum_5fallowed_5fcolor_5fcomponents',['MAXIMUM_ALLOWED_COLOR_COMPONENTS',['../classCarna_1_1base_1_1Framebuffer.html#a5dcdc1bd369ebf9b140738fe3f52805a',1,'Carna::base::Framebuffer']]], diff --git a/docs/html/search/variables_d.js b/docs/html/search/variables_d.js index c9e37ecb..88ae3b02 100644 --- a/docs/html/search/variables_d.js +++ b/docs/html/search/variables_d.js @@ -7,10 +7,10 @@ var searchData= ['regularpartitionsize',['regularPartitionSize',['../structCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1Partionining.html#ab0ce9f93d4e679555ced69d8bbcb2784',1,'Carna::helpers::details::VolumeGridHelper::Partionining']]], ['renderer',['renderer',['../classCarna_1_1base_1_1RenderTask.html#aa1b6a4b4d0a410a77f7f8ef238160d0f',1,'Carna::base::RenderTask::renderer()'],['../classCarna_1_1helpers_1_1FrameRendererHelper.html#a807ed17811f84757059906681bdfee06',1,'Carna::helpers::FrameRendererHelper::renderer()']]], ['resolution',['resolution',['../classCarna_1_1helpers_1_1VolumeGridHelper.html#a1990e09db10de96c43e06839f4454564',1,'Carna::helpers::VolumeGridHelper']]], - ['role_5fdefault_5fmask',['ROLE_DEFAULT_MASK',['../classCarna_1_1presets_1_1MaskRenderingStage.html#a3198850d5528481d3a6d964630542cf8',1,'Carna::presets::MaskRenderingStage']]], ['role_5fdefault_5fmaterial',['ROLE_DEFAULT_MATERIAL',['../classCarna_1_1base_1_1MeshRenderingStageBase.html#af2f3f389e4757501a3be3c8751131a79',1,'Carna::base::MeshRenderingStageBase']]], ['role_5fdefault_5fmesh',['ROLE_DEFAULT_MESH',['../classCarna_1_1base_1_1MeshRenderingStageBase.html#a5358a537a3fe04ff0d2a38e9c0da1ebf',1,'Carna::base::MeshRenderingStageBase']]], - ['role_5fintensity_5fvolume',['ROLE_INTENSITY_VOLUME',['../classCarna_1_1presets_1_1CuttingPlanesStage.html#ae2ce7da25cb71d49b4d1b22fecc2f74d',1,'Carna::presets::CuttingPlanesStage::ROLE_INTENSITY_VOLUME()'],['../classCarna_1_1presets_1_1DRRStage.html#a338d0fa4488f044de1fb8e036df77aeb',1,'Carna::presets::DRRStage::ROLE_INTENSITY_VOLUME()'],['../classCarna_1_1presets_1_1DVRStage.html#a9c2cc25cf8da7a7494e32beccc6cf4ec',1,'Carna::presets::DVRStage::ROLE_INTENSITY_VOLUME()'],['../classCarna_1_1presets_1_1MIPStage.html#a4fc455d6f08270b4863f965bf2a4eb1e',1,'Carna::presets::MIPStage::ROLE_INTENSITY_VOLUME()']]], + ['role_5fintensities',['ROLE_INTENSITIES',['../classCarna_1_1presets_1_1CuttingPlanesStage.html#a12dc6a142683391ac57ee94d3d9374a2',1,'Carna::presets::CuttingPlanesStage::ROLE_INTENSITIES()'],['../classCarna_1_1presets_1_1DRRStage.html#a756d7f4278f72e1b0ecb3951992d9173',1,'Carna::presets::DRRStage::ROLE_INTENSITIES()'],['../classCarna_1_1presets_1_1DVRStage.html#a18066a297641d5e032eaa43fa13797ef',1,'Carna::presets::DVRStage::ROLE_INTENSITIES()'],['../classCarna_1_1presets_1_1MIPStage.html#a08958fed6fad19969db558903e98a26f',1,'Carna::presets::MIPStage::ROLE_INTENSITIES()']]], ['role_5fnormals',['ROLE_NORMALS',['../classCarna_1_1presets_1_1DVRStage.html#af20fadb7f7d95b911e26d298273f4792',1,'Carna::presets::DVRStage']]], + ['rolemask',['roleMask',['../classCarna_1_1presets_1_1MaskRenderingStage.html#a2e28c47e1885b8f6a5f042ca92bf4c09',1,'Carna::presets::MaskRenderingStage']]], ['rq',['rq',['../classCarna_1_1base_1_1GeometryStage.html#a19f72e739017069d2280801be2e5b20f',1,'Carna::base::GeometryStage']]] ]; diff --git a/docs/html/structCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityTextureFactory.html b/docs/html/structCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityTextureFactory.html index 7cd76764..555c9cf4 100644 --- a/docs/html/structCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityTextureFactory.html +++ b/docs/html/structCarna_1_1helpers_1_1details_1_1VolumeGridHelper_1_1IntensityTextureFactory.html @@ -79,7 +79,7 @@
-

Creates textures that represents base::VolumeSegment::intensityVolume in video memory. +

Creates textures that represents base::VolumeSegment::intensities in video memory. More...

#include <VolumeGridHelperDetails.h>

@@ -99,14 +99,14 @@ Static Public Member Functions
- +

Public Attributes

-const unsigned int maskRole
 Holds the role that mask volume data is expected to take when attached to base::Geometry nodes.
 
+const unsigned int roleMask
 Holds the role that mask volume data is expected to take when attached to base::Geometry nodes.
 
- Public Attributes inherited from Carna::base::GeometryStage< base::Renderable::BackToFront >
const unsigned int geometryType
DEFAULT_COLOR
 Holds the default rendering color.
 
-static const unsigned int ROLE_DEFAULT_MASK
 Holds the default value of maskRole.
 
+static const unsigned int DEFAULT_ROLE_MASK
 Holds the default value of roleMask.
 
- Static Public Attributes inherited from Carna::presets::VolumeRenderingStage
static const unsigned int DEFAULT_SAMPLE_RATE = 100
 
virtual const std::string & uniformName (unsigned int role) const override
 Maps maskRole to mask.
 Maps roleMask to mask.
 
virtual void configureShader () override
 Does nothing.
 Sets the border rendering mode and the rendering color.
 
virtual void configureShader (const base::Renderable &) override
unsigned int maskRole = ROLE_DEFAULT_MASK roleMask = DEFAULT_ROLE_MASK 
 CCarna::base::IndexBufferTypeMapper< uint32_t >Maps uint32_t to IndexBufferBase::TYPE_UINT_32
 CCarna::base::IndexBufferTypeMapper< uint8_t >Maps uint8_t to IndexBufferBase::TYPE_UINT_8
 CCarna::base::VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::IntensitySelectorReferences the intensity volume of a given partition
 CCarna::helpers::details::VolumeGridHelper::IntensityTextureFactory< SegmentIntensityVolumeType, SegmentNormalsVolumeType >Creates textures that represents base::VolumeSegment::intensityVolume in video memory
 CCarna::helpers::details::VolumeGridHelper::IntensityTextureFactory< SegmentIntensityVolumeType, SegmentNormalsVolumeType >Creates textures that represents base::VolumeSegment::intensities in video memory
 CCarna::base::GeometryFeature::ManagedInterfaceRepresents an acquisition of the video resources from a particular GeometryFeature. This acquisition realizes the RAII idiom
- +
diff --git a/docs/html/namespaceCarna_1_1helpers_1_1details_1_1VolumeGridHelper.html b/docs/html/namespaceCarna_1_1helpers_1_1details_1_1VolumeGridHelper.html index c2d9ab47..3eb43bc8 100644 --- a/docs/html/namespaceCarna_1_1helpers_1_1details_1_1VolumeGridHelper.html +++ b/docs/html/namespaceCarna_1_1helpers_1_1details_1_1VolumeGridHelper.html @@ -86,7 +86,7 @@
 Defines the helpers::VolumeGridHelper component that maintains intensity volume data. More...
 
struct  IntensityTextureFactory
 Creates textures that represents base::VolumeSegment::intensityVolume in video memory. More...
 Creates textures that represents base::VolumeSegment::intensities in video memory. More...
 
class  NormalsComponent
 Defines the helpers::VolumeGridHelper component that computes and maintains normal maps. More...
static base::ManagedTexture3DcreateTexture (const base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType > &segment)
 Creates texture that represents the base::VolumeSegment::intensityVolume of segment in video memory.
 Creates texture that represents the base::VolumeSegment::intensities of segment in video memory.
 

Detailed Description

template<typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType>
struct Carna::helpers::details::VolumeGridHelper::IntensityTextureFactory< SegmentIntensityVolumeType, SegmentNormalsVolumeType >

-

Creates textures that represents base::VolumeSegment::intensityVolume in video memory.

+

Creates textures that represents base::VolumeSegment::intensities in video memory.

Author
Leonid Kostrykin
Date
26.3.15 - 27.3.15
diff --git a/include/Carna/base/Geometry.h b/include/Carna/base/Geometry.h index 012965ad..950d3485 100644 --- a/include/Carna/base/Geometry.h +++ b/include/Carna/base/Geometry.h @@ -45,8 +45,8 @@ namespace base * * \note * Conventionally, the default role for 3D textures that represent intensity data, - * such as \ref presets::DRRStage::ROLE_INTENSITY_VOLUME or - * \ref presets::CuttingPlanesStage::ROLE_INTENSITY_VOLUME, is 0. + * such as \ref presets::DRRStage::ROLE_INTENSITIES or + * \ref presets::CuttingPlanesStage::ROLE_INTENSITIES, is 0. * * What features a geometry object aggregates depends on the \c %geometryType and * what the corresponding rendering stage expects. Typical examples are diff --git a/include/Carna/base/VolumeGrid.h b/include/Carna/base/VolumeGrid.h index 93f1ed89..7c56be85 100644 --- a/include/Carna/base/VolumeGrid.h +++ b/include/Carna/base/VolumeGrid.h @@ -390,7 +390,7 @@ template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType SegmentIntensityVolumeType& VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::IntensitySelector::volume ( VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >& segment ) { - return segment.intensityVolume(); + return segment.intensities(); } @@ -398,7 +398,7 @@ template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType const SegmentIntensityVolumeType& VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::IntensitySelector::volume ( const VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >& segment ) { - return segment.intensityVolume(); + return segment.intensities(); } diff --git a/include/Carna/base/VolumeSegment.h b/include/Carna/base/VolumeSegment.h index 7c1a35a6..53fa001a 100644 --- a/include/Carna/base/VolumeSegment.h +++ b/include/Carna/base/VolumeSegment.h @@ -201,22 +201,22 @@ class VolumeSegment : public VolumeSegmentNormalsComponent< SegmentNormalsVolume /** \brief * Sets the intensity volume data of this partition. */ - void setIntensityVolume( Association< SegmentIntensityVolumeType >* intensityVolume ); + void setIntensities( Association< SegmentIntensityVolumeType >* intensities ); /** \brief * References the intensity volume data of this partition. - * \pre `hasIntensityVolume() == true` + * \pre `hasIntensities() == true` */ - SegmentIntensityVolumeType& intensityVolume(); + SegmentIntensityVolumeType& intensities(); /** \overload */ - const SegmentIntensityVolumeType& intensityVolume() const; + const SegmentIntensityVolumeType& intensities() const; /** \brief * Tells whether this partition has intensity volume data associated. */ - bool hasIntensityVolume() const; + bool hasIntensities() const; /** \brief * Holds the coordinate offset this partition within the \ref grid "whole" @@ -226,7 +226,7 @@ class VolumeSegment : public VolumeSegmentNormalsComponent< SegmentNormalsVolume private: - std::unique_ptr< Association< SegmentIntensityVolumeType > > myIntensityVolume; + std::unique_ptr< Association< SegmentIntensityVolumeType > > myIntensities; }; // VolumeSegment @@ -240,32 +240,32 @@ VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::VolumeSeg template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType > -void VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::setIntensityVolume( Association< SegmentIntensityVolumeType >* intensityVolume ) +void VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::setIntensities( Association< SegmentIntensityVolumeType >* intensities ) { - myIntensityVolume.reset( intensityVolume ); + myIntensities.reset( intensities ); } template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType > -SegmentIntensityVolumeType& VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::intensityVolume() +SegmentIntensityVolumeType& VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::intensities() { - CARNA_ASSERT( hasIntensityVolume() ); - return **myIntensityVolume; + CARNA_ASSERT( hasIntensities() ); + return **myIntensities; } template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType > -const SegmentIntensityVolumeType& VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::intensityVolume() const +const SegmentIntensityVolumeType& VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::intensities() const { - CARNA_ASSERT( hasIntensityVolume() ); - return **myIntensityVolume; + CARNA_ASSERT( hasIntensities() ); + return **myIntensities; } template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType > -bool VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::hasIntensityVolume() const +bool VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::hasIntensities() const { - return myIntensityVolume.get() != nullptr && myIntensityVolume->get() != nullptr; + return myIntensities.get() != nullptr && myIntensities->get() != nullptr; } diff --git a/include/Carna/helpers/VolumeGridHelper.h b/include/Carna/helpers/VolumeGridHelper.h index ff372373..385fc07d 100644 --- a/include/Carna/helpers/VolumeGridHelper.h +++ b/include/Carna/helpers/VolumeGridHelper.h @@ -479,7 +479,7 @@ base::Node* VolumeGridHelper< SegmentIntensityVolumeType, SegmentNormalsVolumeTy segmentCoord.x() + 1 == myGrid->segmentCounts.x() || segmentCoord.y() + 1 == myGrid->segmentCounts.y() || segmentCoord.z() + 1 == myGrid->segmentCounts.z(); - const base::math::Vector3ui& volumeSize = segment.intensityVolume().size; + const base::math::Vector3ui& volumeSize = segment.intensities().size; const base::math::Vector3f dimensions = !isTail ? regularSegmentDimensions : ( ( volumeSize.cast< int >() - base::math::Vector3i( 1, 1, 1 ) ) .cast< float >().cwiseProduct( spacing.millimeters ) ); diff --git a/include/Carna/helpers/VolumeGridHelperDetails.h b/include/Carna/helpers/VolumeGridHelperDetails.h index b3a26862..e7d98596 100644 --- a/include/Carna/helpers/VolumeGridHelperDetails.h +++ b/include/Carna/helpers/VolumeGridHelperDetails.h @@ -50,7 +50,7 @@ namespace VolumeGridHelper /** \brief * Creates \ref base::ManagedTexture3D "textures" that represents - * \ref base::VolumeSegment::intensityVolume in video memory. + * \ref base::VolumeSegment::intensities in video memory. * * \author Leonid Kostrykin * \date 26.3.15 - 27.3.15 @@ -70,7 +70,7 @@ struct IntensityTextureFactory /** \brief * Creates \ref base::ManagedTexture3D "texture" that represents the - * \ref base::VolumeSegment::intensityVolume of \a segment in video memory. + * \ref base::VolumeSegment::intensities of \a segment in video memory. */ static base::ManagedTexture3D& createTexture ( const base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >& segment ); @@ -81,7 +81,7 @@ template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType base::ManagedTexture3D& IntensityTextureFactory< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::createTexture ( const base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >& segment ) { - return base::BufferedVectorFieldTexture< SegmentIntensityVolumeType >::create( segment.intensityVolume() ); + return base::BufferedVectorFieldTexture< SegmentIntensityVolumeType >::create( segment.intensities() ); } @@ -268,12 +268,12 @@ class IntensityComponent : public TextureManager< IntensityTextureFactory< Segme * Holds the default \ref GeometryTypes "role" to use for * \ref attachTexture "attaching textures" to \ref base::Geometry nodes. */ - const static unsigned int DEFAULT_ROLE_INTENSITY_VOLUME = 0; + const static unsigned int DEFAULT_ROLE_INTENSITIES = 0; /** \brief * Sets the \ref GeometryTypes "role" to use for * \ref attachTexture "attaching textures" to \ref base::Geometry nodes to - * \ref DEFAULT_ROLE_INTENSITY_VOLUME. + * \ref DEFAULT_ROLE_INTENSITIES. */ IntensityComponent(); @@ -281,27 +281,27 @@ class IntensityComponent : public TextureManager< IntensityTextureFactory< Segme * Sets the \ref GeometryTypes "role" to use for * \ref attachTexture "attaching textures" to \ref base::Geometry nodes. */ - void setIntensityVolumeRole( unsigned int role ); + void setIntensitiesRole( unsigned int role ); /** \brief * Tels the \ref GeometryTypes "role" used for * \ref attachTexture "attaching textures" to \ref base::Geometry nodes. */ - unsigned int intensityVolumeRole() const; + unsigned int intensitiesRole() const; protected: /** \brief * Attaches the \ref base::ManagedTexture3D "texture" that represents the - * \ref base::VolumeSegment::intensityVolume of \a segment to \a geometry - * using the \ref setIntensityVolumeRole "previously configured role". + * \ref base::VolumeSegment::intensities of \a segment to \a geometry + * using the \ref setIntensitiesRole "previously configured role". */ void attachTexture ( base::Geometry& geometry , const base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >& segment ) const; /** \brief - * Initializes \ref base::VolumeSegment::setIntensityVolume "intensity volume" of \a segment. + * Initializes \ref base::VolumeSegment::setIntensities "intensity volume" of \a segment. */ void initializeSegment ( base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >& segment @@ -312,20 +312,20 @@ class IntensityComponent : public TextureManager< IntensityTextureFactory< Segme template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType > IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::IntensityComponent() - : role( DEFAULT_ROLE_INTENSITY_VOLUME ) + : role( DEFAULT_ROLE_INTENSITIES ) { } template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType > -void IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::setIntensityVolumeRole( unsigned int role ) +void IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::setIntensitiesRole( unsigned int role ) { this->role = role; } template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType > -unsigned int IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::intensityVolumeRole() const +unsigned int IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::intensitiesRole() const { return role; } @@ -346,8 +346,8 @@ void IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >: ( base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >& segment , const base::math::Vector3ui& size ) const { - SegmentIntensityVolumeType* const intensityVolume = new SegmentIntensityVolumeType( size ); - segment.setIntensityVolume( new base::Composition< SegmentIntensityVolumeType >( intensityVolume ) ); + SegmentIntensityVolumeType* const intensities = new SegmentIntensityVolumeType( size ); + segment.setIntensities( new base::Composition< SegmentIntensityVolumeType >( intensities ) ); } diff --git a/include/Carna/presets/CuttingPlanesStage.h b/include/Carna/presets/CuttingPlanesStage.h index dbbdfbe0..dd7fed31 100644 --- a/include/Carna/presets/CuttingPlanesStage.h +++ b/include/Carna/presets/CuttingPlanesStage.h @@ -71,7 +71,7 @@ class CARNA_LIB CuttingPlanesStage : public base::GeometryStage< void > * Holds the \ref GeometryFeatures "role" that intensity volume data is expected * to take when attached to \ref base::Geometry nodes. */ - const static unsigned int ROLE_INTENSITY_VOLUME; + const static unsigned int ROLE_INTENSITIES; /** \brief * Instantiates. diff --git a/include/Carna/presets/DRRStage.h b/include/Carna/presets/DRRStage.h index ebeb98d7..11c39b26 100644 --- a/include/Carna/presets/DRRStage.h +++ b/include/Carna/presets/DRRStage.h @@ -122,7 +122,7 @@ class CARNA_LIB DRRStage : public VolumeRenderingStage * Holds the \ref GeometryFeatures "role" that HU volume data is expected to * take when attached to \ref base::Geometry nodes. */ - const static unsigned int ROLE_INTENSITY_VOLUME = 0; + const static unsigned int ROLE_INTENSITIES = 0; /** \brief * Instantiates. The created stage will render such \ref base::Geometry scene @@ -238,7 +238,7 @@ class CARNA_LIB DRRStage : public VolumeRenderingStage virtual const base::ShaderProgram& acquireShader() override; /** \brief - * Maps \ref ROLE_INTENSITY_VOLUME to `huVolume`. + * Maps \ref ROLE_INTENSITIES to `huVolume`. */ virtual const std::string& uniformName( unsigned int role ) const override; diff --git a/include/Carna/presets/DVRStage.h b/include/Carna/presets/DVRStage.h index 205553df..e6093357 100644 --- a/include/Carna/presets/DVRStage.h +++ b/include/Carna/presets/DVRStage.h @@ -110,7 +110,7 @@ class CARNA_LIB DVRStage : public VolumeRenderingStage * Holds the \ref GeometryFeatures "role" that intensity volume data is expected * to take when attached to \ref base::Geometry nodes. */ - const static unsigned int ROLE_INTENSITY_VOLUME = 0; + const static unsigned int ROLE_INTENSITIES = 0; /** \brief * Holds the \ref GeometryFeatures "role" that the normal map is expected to @@ -222,7 +222,7 @@ class CARNA_LIB DVRStage : public VolumeRenderingStage virtual const base::ShaderProgram& acquireShader() override; /** \brief - * Maps \ref ROLE_INTENSITY_VOLUME to `huVolume` and \ref ROLE_NORMALS to `normalMap`. + * Maps \ref ROLE_INTENSITIES to `huVolume` and \ref ROLE_NORMALS to `normalMap`. */ virtual const std::string& uniformName( unsigned int role ) const override; diff --git a/include/Carna/presets/MIPStage.h b/include/Carna/presets/MIPStage.h index faa51b41..449cc366 100644 --- a/include/Carna/presets/MIPStage.h +++ b/include/Carna/presets/MIPStage.h @@ -73,7 +73,7 @@ class CARNA_LIB MIPStage : public VolumeRenderingStage * Holds the \ref GeometryFeatures "role" that intensity volume data is expected * to take when attached to \ref base::Geometry nodes. */ - const static unsigned int ROLE_INTENSITY_VOLUME = 0; + const static unsigned int ROLE_INTENSITIES = 0; /** \brief * Instantiates. diff --git a/include/Carna/presets/MaskRenderingStage.h b/include/Carna/presets/MaskRenderingStage.h index 05ca4b4f..a1b4db2d 100644 --- a/include/Carna/presets/MaskRenderingStage.h +++ b/include/Carna/presets/MaskRenderingStage.h @@ -65,22 +65,22 @@ class CARNA_LIB MaskRenderingStage : public VolumeRenderingStage public: const static base::Color DEFAULT_COLOR; ///< Holds the default rendering color. - const static unsigned int ROLE_DEFAULT_MASK; ///< Holds the default value of \ref maskRole. + const static unsigned int DEFAULT_ROLE_MASK; ///< Holds the default value of \ref roleMask. /** \brief * Holds the \ref GeometryFeatures "role" that mask volume data is expected to * take when attached to \ref base::Geometry nodes. */ - const unsigned int maskRole; + const unsigned int roleMask; /** \brief * Instantiates. * * The created stage will render such \ref base::Geometry scene graph nodes, * whose \ref GeometryTypes "geometry types" equal \a geometryType. The mask - * data will be obtained from \a maskRole. + * data will be obtained from \a roleMask. */ - explicit MaskRenderingStage( unsigned int geometryType, unsigned int maskRole = ROLE_DEFAULT_MASK ); + explicit MaskRenderingStage( unsigned int geometryType, unsigned int roleMask = DEFAULT_ROLE_MASK ); /** \brief * Deletes. @@ -131,12 +131,12 @@ class CARNA_LIB MaskRenderingStage : public VolumeRenderingStage virtual const base::ShaderProgram& acquireShader() override; /** \brief - * Maps \ref maskRole to `mask`. + * Maps \ref roleMask to `mask`. */ virtual const std::string& uniformName( unsigned int role ) const override; /** \brief - * Does nothing. + * Sets the border rendering mode and the rendering color. */ virtual void configureShader() override; diff --git a/src/doc/doc_VersionLog.dox b/src/doc/doc_VersionLog.dox index 6d18a068..1bfa4947 100644 --- a/src/doc/doc_VersionLog.dox +++ b/src/doc/doc_VersionLog.dox @@ -61,6 +61,7 @@ namespace Carna * * - Added \ref presets::MaskRenderingStage. * - Added \ref base::math::computeFastGradient3f. + * - Renamed most occurances of "intensity volume" in attributes/fields/methods to "intensities" to be more consistent with "normals". */ } // namespace Carna diff --git a/src/presets/CuttingPlanesStage.cpp b/src/presets/CuttingPlanesStage.cpp index a074f3e5..6b0a577c 100644 --- a/src/presets/CuttingPlanesStage.cpp +++ b/src/presets/CuttingPlanesStage.cpp @@ -133,7 +133,7 @@ CuttingPlanesStage::VideoResources::PlaneMesh* CuttingPlanesStage::VideoResource const float CuttingPlanesStage::DEFAULT_WINDOWING_WIDTH = 1.0f; const float CuttingPlanesStage::DEFAULT_WINDOWING_LEVEL = 0.5f; -const unsigned int CuttingPlanesStage::ROLE_INTENSITY_VOLUME = 0; +const unsigned int CuttingPlanesStage::ROLE_INTENSITIES = 0; CuttingPlanesStage::CuttingPlanesStage( unsigned int volumeGeometryType, unsigned int planeGeometryType ) @@ -237,7 +237,7 @@ void CuttingPlanesStage::render( const base::Renderable& volume ) /* Bind texture and volumeSampler to free texture unit. */ const static unsigned int TEXTURE_UNIT = base::Texture< 0 >::SETUP_UNIT + 1; - const base::ManagedTexture3D& texture = static_cast< const base::ManagedTexture3D& >( volume.geometry().feature( ROLE_INTENSITY_VOLUME ) ); + const base::ManagedTexture3D& texture = static_cast< const base::ManagedTexture3D& >( volume.geometry().feature( ROLE_INTENSITIES ) ); this->videoResource( texture ).get().bind( TEXTURE_UNIT ); vr->volumeSampler.bind( TEXTURE_UNIT ); diff --git a/src/presets/DRRStage.cpp b/src/presets/DRRStage.cpp index 6ddecc9e..8f57b5b0 100644 --- a/src/presets/DRRStage.cpp +++ b/src/presets/DRRStage.cpp @@ -253,7 +253,7 @@ void DRRStage::renderPass void DRRStage::createVolumeSamplers( const std::function< void( unsigned int, base::Sampler* ) >& registerSampler ) { - registerSampler( ROLE_INTENSITY_VOLUME, new base::Sampler + registerSampler( ROLE_INTENSITIES, new base::Sampler ( base::Sampler::WRAP_MODE_CLAMP, base::Sampler::WRAP_MODE_CLAMP, base::Sampler::WRAP_MODE_CLAMP , base::Sampler::FILTER_LINEAR, base::Sampler::FILTER_LINEAR ) ); } @@ -267,12 +267,12 @@ const base::ShaderProgram& DRRStage::acquireShader() const std::string& DRRStage::uniformName( unsigned int role ) const { - const static std::string ROLE_INTENSITY_VOLUME_NAME = "huVolume"; + const static std::string ROLE_INTENSITIES_NAME = "huVolume"; switch( role ) { - case ROLE_INTENSITY_VOLUME: - return ROLE_INTENSITY_VOLUME_NAME; + case ROLE_INTENSITIES: + return ROLE_INTENSITIES_NAME; default: CARNA_FAIL( "unknown role" ); diff --git a/src/presets/DVRStage.cpp b/src/presets/DVRStage.cpp index e4137158..0897bc4f 100644 --- a/src/presets/DVRStage.cpp +++ b/src/presets/DVRStage.cpp @@ -269,7 +269,7 @@ void DVRStage::createVolumeSamplers( const std::function< void( unsigned int, ba { /* Create sampler for the intensity volume texture. */ - registerSampler( ROLE_INTENSITY_VOLUME, new base::Sampler + registerSampler( ROLE_INTENSITIES, new base::Sampler ( base::Sampler::WRAP_MODE_CLAMP, base::Sampler::WRAP_MODE_CLAMP, base::Sampler::WRAP_MODE_CLAMP , base::Sampler::FILTER_LINEAR, base::Sampler::FILTER_LINEAR ) ); @@ -289,13 +289,13 @@ const base::ShaderProgram& DVRStage::acquireShader() const std::string& DVRStage::uniformName( unsigned int role ) const { - const static std::string ROLE_INTENSITY_VOLUME_NAME = "huVolume"; - const static std::string ROLE_NORMALS_NAME = "normalMap"; + const static std::string ROLE_INTENSITIES_NAME = "huVolume"; + const static std::string ROLE_NORMALS_NAME = "normalMap"; switch( role ) { - case ROLE_INTENSITY_VOLUME: - return ROLE_INTENSITY_VOLUME_NAME; + case ROLE_INTENSITIES: + return ROLE_INTENSITIES_NAME; case ROLE_NORMALS: return ROLE_NORMALS_NAME; diff --git a/src/presets/MIPStage.cpp b/src/presets/MIPStage.cpp index 972f9ef4..97645287 100644 --- a/src/presets/MIPStage.cpp +++ b/src/presets/MIPStage.cpp @@ -207,7 +207,7 @@ void MIPStage::renderPass void MIPStage::createVolumeSamplers( const std::function< void( unsigned int, base::Sampler* ) >& registerSampler ) { - registerSampler( ROLE_INTENSITY_VOLUME, new base::Sampler + registerSampler( ROLE_INTENSITIES, new base::Sampler ( base::Sampler::WRAP_MODE_CLAMP, base::Sampler::WRAP_MODE_CLAMP, base::Sampler::WRAP_MODE_CLAMP , base::Sampler::FILTER_LINEAR, base::Sampler::FILTER_LINEAR ) ); } @@ -221,12 +221,12 @@ const base::ShaderProgram& MIPStage::acquireShader() const std::string& MIPStage::uniformName( unsigned int role ) const { - const static std::string ROLE_INTENSITY_VOLUME_NAME = "huVolume"; + const static std::string ROLE_INTENSITIES_NAME = "huVolume"; switch( role ) { - case ROLE_INTENSITY_VOLUME: - return ROLE_INTENSITY_VOLUME_NAME; + case ROLE_INTENSITIES: + return ROLE_INTENSITIES_NAME; default: CARNA_FAIL( "unknown role" ); diff --git a/src/presets/MaskRenderingStage.cpp b/src/presets/MaskRenderingStage.cpp index 97aca019..7fb6540f 100644 --- a/src/presets/MaskRenderingStage.cpp +++ b/src/presets/MaskRenderingStage.cpp @@ -57,13 +57,13 @@ MaskRenderingStage::Details::Details() // ---------------------------------------------------------------------------------- const base::Color MaskRenderingStage::DEFAULT_COLOR = base::Color::GREEN; -const unsigned int MaskRenderingStage::ROLE_DEFAULT_MASK = 2; +const unsigned int MaskRenderingStage::DEFAULT_ROLE_MASK = 2; -MaskRenderingStage::MaskRenderingStage( unsigned int geometryType, unsigned int maskRole ) +MaskRenderingStage::MaskRenderingStage( unsigned int geometryType, unsigned int roleMask ) : VolumeRenderingStage( geometryType ) , pimpl( new Details() ) - , maskRole( maskRole ) + , roleMask( roleMask ) { } @@ -80,7 +80,7 @@ MaskRenderingStage::~MaskRenderingStage() MaskRenderingStage* MaskRenderingStage::clone() const { - MaskRenderingStage* const result = new MaskRenderingStage( geometryType, maskRole ); + MaskRenderingStage* const result = new MaskRenderingStage( geometryType, roleMask ); result->setEnabled( isEnabled() ); return result; } @@ -186,7 +186,7 @@ void MaskRenderingStage::createVolumeSamplers( const std::function< void( unsign { /* Create sampler for the mask texture. */ - registerSampler( maskRole, new base::Sampler + registerSampler( roleMask, new base::Sampler ( base::Sampler::WRAP_MODE_CLAMP, base::Sampler::WRAP_MODE_CLAMP, base::Sampler::WRAP_MODE_CLAMP , base::Sampler::FILTER_NEAREST, base::Sampler::FILTER_NEAREST ) ); } @@ -201,7 +201,7 @@ const base::ShaderProgram& MaskRenderingStage::acquireShader() const std::string& MaskRenderingStage::uniformName( unsigned int role ) const { const static std::string ROLE_MASK_NAME = "mask"; - if( role == maskRole ) + if( role == roleMask ) { return ROLE_MASK_NAME; } diff --git a/test/IntegrationTests/MaskRenderingStageIntegrationTest.cpp b/test/IntegrationTests/MaskRenderingStageIntegrationTest.cpp index 6d6ca236..ee1399a9 100644 --- a/test/IntegrationTests/MaskRenderingStageIntegrationTest.cpp +++ b/test/IntegrationTests/MaskRenderingStageIntegrationTest.cpp @@ -83,7 +83,7 @@ void MaskRenderingStageIntegrationTest::test_shared_geometry_node() //! [create_mask] //! [attach_mask] - geometry.putFeature( mr->maskRole, maskTexture ); + geometry.putFeature( mr->roleMask, maskTexture ); maskTexture.release(); //! [attach_mask] @@ -111,7 +111,7 @@ void MaskRenderingStageIntegrationTest::test_dedicated_geometry_node() base::BufferedVectorFieldTexture< base::IntensityVolumeUInt8 >& maskTexture = base::BufferedVectorFieldTexture< base::IntensityVolumeUInt8 >::create( *mask ); base::Geometry* const geometry = new base::Geometry( GEOMETRY_TYPE_MASK ); - geometry->putFeature( mr->maskRole, maskTexture ); + geometry->putFeature( mr->roleMask, maskTexture ); geometry->localTransform = base::math::scaling4f( scene->scale() ); scene->root->attachChild( geometry ); maskTexture.release(); @@ -134,7 +134,7 @@ void MaskRenderingStageIntegrationTest::test_helper_geometry_node() */ typedef helpers::VolumeGridHelper< base::IntensityVolumeUInt8 > UInt8GridHelper; UInt8GridHelper gridHelper( scene.volume().size ); - gridHelper.setIntensityVolumeRole( mr->maskRole ); + gridHelper.setIntensitiesRole( mr->roleMask ); gridHelper.loadIntensities( [&scene]( const base::math::Vector3ui& voxel ) { return ( scene.volume()( voxel ) + 1024 ) * 16 > 48000 ? 1.f : 0.f; @@ -163,7 +163,7 @@ void MaskRenderingStageIntegrationTest::test_render_borders() */ typedef helpers::VolumeGridHelper< base::IntensityVolumeUInt8 > UInt8GridHelper; UInt8GridHelper gridHelper( scene.volume().size ); - gridHelper.setIntensityVolumeRole( mr->maskRole ); + gridHelper.setIntensitiesRole( mr->roleMask ); gridHelper.loadIntensities( [&scene]( const base::math::Vector3ui& voxel ) { return ( scene.volume()( voxel ) + 1024 ) * 16 > 10000 ? 1.f : 0.f; diff --git a/test/ModuleTests/MaskRenderingStageTest.cpp b/test/ModuleTests/MaskRenderingStageTest.cpp index bc659681..04230ac4 100644 --- a/test/ModuleTests/MaskRenderingStageTest.cpp +++ b/test/ModuleTests/MaskRenderingStageTest.cpp @@ -66,7 +66,7 @@ void MaskRenderingStageTest::test_shared_geometry_node() base::BufferedVectorFieldTexture< base::IntensityVolumeUInt8 >& maskTexture = base::BufferedVectorFieldTexture< base::IntensityVolumeUInt8 >::create( *mask ); - geometry.putFeature( mr->maskRole, maskTexture ); + geometry.putFeature( mr->roleMask, maskTexture ); maskTexture.release(); renderer->render( scene->cam(), *scene->root ); @@ -93,7 +93,7 @@ void MaskRenderingStageTest::test_dedicated_geometry_node() base::BufferedVectorFieldTexture< base::IntensityVolumeUInt8 >& maskTexture = base::BufferedVectorFieldTexture< base::IntensityVolumeUInt8 >::create( *mask ); base::Geometry* const geometry = new base::Geometry( GEOMETRY_TYPE_MASK ); - geometry->putFeature( mr->maskRole, maskTexture ); + geometry->putFeature( mr->roleMask, maskTexture ); geometry->localTransform = base::math::scaling4f( scene->scale() ); scene->root->attachChild( geometry ); maskTexture.release(); diff --git a/test/ModuleTests/VolumeGridTest.cpp b/test/ModuleTests/VolumeGridTest.cpp index f92ebfd0..8389b02b 100644 --- a/test/ModuleTests/VolumeGridTest.cpp +++ b/test/ModuleTests/VolumeGridTest.cpp @@ -70,7 +70,7 @@ void VolumeGridTestUInt16::test_parenthesisOperator() { base::VolumeSegment< base::IntensityVolumeUInt16, void >& segment = grid->segmentAt( segCoord.x(), segCoord.y(), segCoord.z() ); base::IntensityVolumeUInt16* const volume = new base::IntensityVolumeUInt16( grid->maxSegmentSize ); - segment.setIntensityVolume( new base::Composition< base::IntensityVolumeUInt16 >( volume ) ); + segment.setIntensities( new base::Composition< base::IntensityVolumeUInt16 >( volume ) ); /* Load segment volume data. */ @@ -156,7 +156,7 @@ void VolumeGridTestUInt8::test_parenthesisOperator1() { base::VolumeSegment< base::IntensityVolumeUInt8, void >& segment = grid->segmentAt( segCoord.x(), segCoord.y(), segCoord.z() ); base::IntensityVolumeUInt8* const volume = new base::IntensityVolumeUInt8( grid->maxSegmentSize ); - segment.setIntensityVolume( new base::Composition< base::IntensityVolumeUInt8 >( volume ) ); + segment.setIntensities( new base::Composition< base::IntensityVolumeUInt8 >( volume ) ); /* Load segment volume data. */ @@ -210,7 +210,7 @@ void VolumeGridTestUInt8::test_parenthesisOperator2() { base::VolumeSegment< base::IntensityVolumeUInt8, void >& segment = grid->segmentAt( segCoord.x(), segCoord.y(), segCoord.z() ); base::IntensityVolumeUInt8* const volume = new base::IntensityVolumeUInt8( grid->maxSegmentSize ); - segment.setIntensityVolume( new base::Composition< base::IntensityVolumeUInt8 >( volume ) ); + segment.setIntensities( new base::Composition< base::IntensityVolumeUInt8 >( volume ) ); /* Load segment volume data. */ diff --git a/test/UnitTests/VolumeGridHelperTest.cpp b/test/UnitTests/VolumeGridHelperTest.cpp index f5576f51..5c189021 100644 --- a/test/UnitTests/VolumeGridHelperTest.cpp +++ b/test/UnitTests/VolumeGridHelperTest.cpp @@ -24,7 +24,7 @@ void verifyPartitioning( const TestedHelperType& helper ) { CARNA_FOR_VECTOR3UI( coord, helper.grid().segmentCounts ) { - const Carna::base::math::Vector3ui& size = helper.grid().segmentAt( coord ).intensityVolume().size; + const Carna::base::math::Vector3ui& size = helper.grid().segmentAt( coord ).intensities().size; QCOMPARE( size.x() % 2, 0u ); QCOMPARE( size.y() % 2, 0u ); QCOMPARE( size.z() % 2, 0u );