Carna  Version 3.0.1
Carna.h
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 CARNA_GLOBAL_H_6014714286
13 #define CARNA_GLOBAL_H_6014714286
14 
15 #if defined( CARNA_EXPORT )
16 # if defined( _MSC_VER )
17 # define CARNA_LIB __declspec( dllexport )
18 # pragma warning( disable : 4251 )
19 # elif defined( _GCC )
20 # define CARNA_LIB __attribute__( ( visibility( "default" ) ) )
21 # else
22 # define CARNA_LIB
23 # endif
24 #else
25 # if defined( _MSC_VER )
26 # define CARNA_LIB __declspec( dllimport )
27 # else
28 # define CARNA_LIB
29 # endif
30 #endif
31 #if defined( NO_OVERRIDE_KEYWORD )
32 # define override
33 #endif
34 
35 #include <vector>
36 #include <cstdint>
37 
38 
39 
40 // ----------------------------------------------------------------------------------
41 // Forward Declarations
42 // ----------------------------------------------------------------------------------
43 
44 namespace Carna
45 {
46 
50  namespace base
51  {
52 
56  typedef signed short HUV;
57 
58  class Application;
59  class AssertionFailure;
60  class BoundingBox;
61  class BoundingVolume;
62  class CameraControl;
63  class CarnaException;
64  class Log;
65  class HUVolume;
66  class BaseBuffer;
67  class BlendFunction;
68  class Camera;
69  class Color;
70  class Framebuffer;
71  class FrameRenderer;
72  class Geometry;
73  class GeometryFeature;
74  class GLContext;
75  class IndexBufferBase;
76  class MeshBase;
77  class ManagedMeshBase;
80  class Node;
81  class ProjectionControl;
82  class Releasable;
83  class Renderable;
84  class RenderStage;
85  class RenderState;
86  class RenderTask;
87  class RotatingColor;
88  class Sampler;
89  class Shader;
91  class Material;
92  class ShaderManager;
93  class ShaderProgram;
94  class ShaderUniformBase;
95  class Spatial;
96  class SpatialMovement;
97  class ManagedTexture3D;
99  struct VertexBase;
100  struct VertexNormal;
101  struct VertexColor;
102  struct ColoredVertex;
103  struct VertexAttribute;
104  class VertexBufferBase;
105  class Viewport;
106  class NormalMap3D;
107  class NormalMap3DTexture;
108  class TextureBase;
109  class RenderStageSequence;
110  class RenderStageListener;
111  class NodeListener;
112 
113  template< typename AssociatedObjectType > class Aggregation;
114  template< typename AssociatedObjectType > class Association;
115  template< typename BufferedVectorComponentType, typename BufferType = std::vector< BufferedVectorComponentType > >
116  class BufferedNormalMap3D;
117  template< typename VoxelType, typename BufferType = std::vector< VoxelType > > class BufferedHUVolume;
118  template< typename BufferedVectorFieldType > struct BufferedVectorFieldFormat;
119  template< typename BufferedVectorFieldType > class BufferedVectorFieldTexture;
120  template< typename AssociatedObjectType > class Composition;
121  template< typename RenderableCompare > class GeometryStage;
122  template< typename SegmentHUVolumeType, typename SegmentNormalsVolumeType > class VolumeGrid;
123  template< typename SegmentHUVolumeType, typename SegmentNormalsVolumeType > class VolumeSegment;
124  template< typename IndexType > class IndexBuffer;
125  template< typename VertexType, typename IndexType > class Mesh;
126  template< typename VertexType, typename IndexType > class ManagedMesh;
127  template< typename VertexType > class MeshFactory;
128  template< typename RenderableCompare > class MeshRenderingStage;
129  template< typename RenderableCompare > class RenderQueue;
130  template< typename VertexType > class VertexBuffer;
131  template< typename ValueType > class ShaderUniform;
132  template< typename ValueType > struct ShaderUniformType;
133  template< typename InstanceType > class Singleton;
134  template< unsigned int dimension > class Texture;
135 
140 
145 
149  namespace math
150  {
151 
152  class Ray3f;
153 
154  template< typename VectorType > class Ray;
155  template< typename ValueType > class VectorField;
156  template< typename T > class Span;
157  template< typename VectorType, typename ScalarType = typename VectorType::Scalar > class RayPlaneHitTest;
158 
159  }
160 
161  }
162 
167  namespace presets
168  {
169 
171  class CameraShowcaseControl;
172  class PerspectiveControl;
173  class OrthogonalControl;
174  class MeshColorCodingStage;
175  class VolumeRenderingStage;
176  class MIPStage;
177  class MIPLayer;
178  class DRRStage;
179  class DVRStage;
180  class CuttingPlanesStage;
183  class CompositionStage;
184 
185  }
186 
191  namespace helpers
192  {
193 
194  class PointMarkerHelper;
196  class VolumeGridHelperBase;
197 
198  template< typename RenderStageOrder = DefaultRenderStageOrder > class FrameRendererHelper;
199  template< typename SegmentHUVolumeType, typename SegmentNormalsVolumeType = void > class VolumeGridHelper;
200 
204  namespace details
205  {
206  }
207 
208  }
209 
210 } // namespace Carna
211 
212 #endif // CARNA_GLOBAL_H_6014714286
213 
Specializes VertexBufferBase for particular VertexType.
Definition: VertexBuffer.h:75
Implements HUVolume generically for a particular VoxelType.
Maps math::VectorField implementations to Texture formats.
Renders digital radiograph reconstructs of volume geometries in the scene.
Definition: DRRStage.h:105
Defines default rendering stages order used by FrameRendererHelper.
Simplifies the creation and maintenance of point markers.
Defines rendering stage that combines two other renderings either by putting them next to each other ...
Implements a geometry rendering stage that renders meshes.
Implements rendering stage that renders transparent meshes.
Implements MeshBase class for particular VertexType and IndexType.
Definition: Mesh.h:135
Specializes the ManagedTexture3D class s.t. the texture's data is initialized from a math::VectorFiel...
Carna exception that indicates a failed assertion.
Declares a vertex attribute.
Manages the OpenGL render state.
Definition: RenderState.h:85
Defines scene graph leafs. Instances of this class represent visible geometry that can be rendered...
Definition: Geometry.h:59
Maps ShaderUniform value types to actually uploaded data types. This general case maps T to T...
Definition: ShaderUniform.h:41
Controls projection matrices.
Supplies colors from a predefined, distinctive palette.
Definition: RotatingColor.h:40
Implements a simple interface for mapping frame coordinates to base::Mesh objects.
Defines vertex component for normal vectors. Usage is explained here.
Definition: Vertex.h:149
Controls projection matrices that induce frustum-shaped visible volume.
Singleton base class
Definition: Singleton.h:59
Interfaces the Texture<3> that a ManagedTexture3D represents.
Partially implements a rendering stage that uses at least one render queue for rendering geometry fro...
Definition: GeometryStage.h:59
Defines type-parameters-independent VolumeGridHelper base interface.
Thrown when shader compilation fails.
Implements NormalMap3D generically for a particular VoxelType.
Represents an aggregation, i.e. a weak reference.
Definition: Aggregation.h:40
Represents a single volumetric data partition.
Defines callbacks for RenderStage lifetime events.
BufferedHUVolume< uint16_t > HUVolumeUInt16
Defines 16bit unsigned integer HU volume data.
Definition: Carna.h:134
Represents 3D OpenGL texture object whose lifetime is managed by instances of this class...
Controls orthogonal projection matrices, that induce box-shaped visible volume, and base::Camera obje...
Gathers renderable geometry nodes from scene graph and provides those in a particular order...
Definition: RenderQueue.h:63
Represents "components" that are aggregated by Geometry objects. Closer description is given here...
Handles the displacement of a Spatial object in a drag-&-drop like manner.
Defines a Geometry minimal boundary box.
Definition: BoundingBox.h:40
Maintains GL_ARRAY_BUFFER object that holds vertices. This class realizes the RAII-idiom.
Definition: VertexBuffer.h:42
Defines vertex component for colors. Usage is explained here.
Definition: Vertex.h:180
Type-independent abstract ShaderUniform base class.
Definition: ShaderUniform.h:76
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
Represents MeshBase object whose lifetime is managed by instances of this class. This is a format-ind...
Definition: ManagedMesh.h:56
Creates simple predefined ManagedMesh instances.
Definition: MeshFactory.h:49
Base exception class that provides distinct attributes for the type (category) of the exception...
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
Defines simple-most vertex that only consists of a positional attribute.
Definition: Vertex.h:108
Represents a spatial scene element. It's location is determined relatively to another spatial that is...
Definition: Spatial.h:44
Renders maximum intensity projections of volume geometries in the scene.
Definition: MIPStage.h:64
Maintains an OpenGL texture sampler object. This class realizes the RAII-idiom.
Definition: Sampler.h:44
Renders cutting planes of volume geometries in the scene.
Notified by Node objects.
Definition: NodeListener.h:39
Defines abstract base class for rendering stages that render volume geometries in the scene...
Represents a color. Objects from this class are copyable and assignable.
Definition: Color.h:41
Defines an HUV range and the way it's visualized within a MIPStage.
Definition: MIPLayer.h:42
Specifies the shader and it's configuration that are to be used for rendering a Geometry node with a ...
Definition: Material.h:174
Represents a Geometry minimal boundary volume of simple geometric shape. The volume is centered withi...
Renders geometry that is actually depth-occluded. The occluded geometry is rendered with reduced opac...
Defines interface to volumetric data.
Definition: HUVolume.h:45
Implements base::CameraControl, rotates the camera around its parent node. The camera movement is bou...
Base abstract class of each rendering stage. Refer to the documentation of the rendering process...
Definition: RenderStage.h:42
Interfaces the MeshBase that a ManagedMeshBase represents.
Records log messages. The log writing is delegated to implementations of the Log::Writer interface...
Definition: Log.h:46
Defines a rendering viewport. The viewport is a property of the current OpenGL context.
Definition: Viewport.h:48
Defines MeshRenderingStage class template instance invariants.
Format-independent abstract Mesh base class. Each mesh consists of a VertexBuffer, an IndexBuffer and a vertex array. This class realizes the RAII-idiom w.r.t. the vertex array.
Definition: Mesh.h:63
BufferedNormalMap3D< int8_t > NormalMap3DInt8
Defines 8bit signed integer BufferedNormalMap3D.
Definition: Carna.h:144
Defines interface to mapping.
Definition: NormalMap3D.h:46
Ensures that each shader is built just once and not each time someone requests it.
Definition: ShaderManager.h:43
Implements base::CameraControl, rotates the camera around itself and allows completely free camera mo...
Specializes IndexBufferBase for particular IndexType.
Definition: IndexBuffer.h:204
Defines interface for intuitive Camera control.
Definition: CameraControl.h:39
Implements MeshBase class for particular VertexType and IndexType.
Definition: ManagedMesh.h:147
Represents an OpenGL texture object. This class realizes the RAII-idiom.
Definition: Texture.h:152
Represents a Geometry object that has been queued into a RenderQueue. The object's model-view transfo...
Definition: Renderable.h:45
Represents the point-of-view and defines the 3D to 2D projection.
Definition: Camera.h:39
Implements OpenGL buffer objects maintenance RAII base class.
Definition: BaseBuffer.h:39
Computes the partitioning of volumetric data and the corresponding normal map. Also creates scene nod...
Definition: Carna.h:199
Defines how alpha blending is to be performed.
Definition: BlendFunction.h:39
signed short HUV
Represents values in .
Definition: Carna.h:56
Represents a composition, i.e. a strong reference. This basically is a std::unique_ptr that supports ...
Definition: Composition.h:52
Represents an association.
Definition: Association.h:44
Maintains an OpenGL shader object. Realizes the RAII-idiom.
Definition: Shader.h:47
Wraps and represents an OpenGL context.
Definition: GLContext.h:62
Texture base class with dimension-independent definitions.
Definition: Texture.h:77
Maintains a framebuffer object that supports up to 8 color components simultaneously.
Definition: Framebuffer.h:49
Performs direct volume renderings of the volume geometries in the scene.
Definition: DVRStage.h:101
Defines vertex that consists of the two attributes position and color.
Definition: Vertex.h:209
Represents a particular partitioning of volumetric data.
Definition: VolumeGrid.h:63
Adds rendering stages to a base::FrameRenderer object according to RenderStageOrder.
Definition: Carna.h:198
Represents a rendering stages sequence.
Implements ShaderUniformBase class for particular ValueType.
Maintains GL_ELEMENT_ARRAY_BUFFER object that holds the vertex indices, that interconnect the vertice...
Definition: IndexBuffer.h:43