LibCarna Version 3.4.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
LibCarna::base::BufferedIntensityVolume< VoxelType, BufferType > Class Template Reference

Implements IntensityVolume generically for a particular VoxelType. More...

#include <BufferedIntensityVolume.hpp>

+ Inheritance diagram for LibCarna::base::BufferedIntensityVolume< VoxelType, BufferType >:
+ Collaboration diagram for LibCarna::base::BufferedIntensityVolume< VoxelType, BufferType >:

Public Types

typedef BufferType Buffer
 Holds the used buffer type.
 
typedef VoxelType Voxel
 Holds the type used to store the value of a single voxel.
 
- Public Types inherited from LibCarna::base::math::VectorField< float >
typedef float Value
 Holds the co-domain type of the vector field.
 

Public Member Functions

 BufferedIntensityVolume (const math::Vector3ui &size, Association< BufferType > *buffer)
 Instantiates \(D \to \left[0, 1\right]\) with \(D = [0, s_x) \times [0, s_y) \times [0, s_z)\), where \(s_x, s_y, s_z\) is size.
 
 BufferedIntensityVolume (const math::Vector3ui &size)
 
float operator() (unsigned int x, unsigned int y, unsigned int z) const
 Returns intensity of specified voxel.
 
float operator() (const math::Vector3ui &at) const
 
void setVoxel (unsigned int x, unsigned int y, unsigned int z, float intensity)
 Sets the intensity value of a voxel.
 
void setVoxel (const math::Vector3ui &at, float intensity)
 
BufferTypebuffer ()
 References the underlying buffer.
 
const BufferTypebuffer () const
 References the underlying buffer.
 
- Public Member Functions inherited from LibCarna::base::IntensityVolume
 IntensityVolume ()
 Instantiates.
 
 IntensityVolume (const math::Vector3ui &size)
 Instantiates.
 
- Public Member Functions inherited from LibCarna::base::math::VectorField< float >
virtual ~VectorField ()
 Does nothing.
 

Static Public Member Functions

static float bufferValueToIntensity (VoxelType bufferValue)
 Returns the intensity value corresponding to bufferValue.
 
static VoxelType intensityToBufferValue (float intensity)
 Returns the buffer value corresponding to an intensity.
 

Protected Attributes

const std::unique_ptr< Association< BufferType > > myBuffer
 Holds the underlying buffer.
 

Additional Inherited Members

- Public Attributes inherited from LibCarna::base::IntensityVolume
math::Vector3ui size
 Holds the resolution.
 

Detailed Description

template<typename VoxelType, typename BufferType>
class LibCarna::base::BufferedIntensityVolume< VoxelType, BufferType >

Implements IntensityVolume generically for a particular VoxelType.

Parameters
VoxelTypeis the data type used to store the value of a single voxel.
BufferTypeis the data type used as voxel container.
Author
Leonid Kostrykin

Definition at line 50 of file BufferedIntensityVolume.hpp.

Member Typedef Documentation

◆ Buffer

Holds the used buffer type.

Definition at line 58 of file BufferedIntensityVolume.hpp.

◆ Voxel

template<typename VoxelType , typename BufferType >
typedef VoxelType LibCarna::base::BufferedIntensityVolume< VoxelType, BufferType >::Voxel

Holds the type used to store the value of a single voxel.

Definition at line 63 of file BufferedIntensityVolume.hpp.

Constructor & Destructor Documentation

◆ BufferedIntensityVolume() [1/2]

template<typename VoxelType , typename BufferType >
LibCarna::base::BufferedIntensityVolume< VoxelType, BufferType >::BufferedIntensityVolume ( const math::Vector3ui size,
Association< BufferType > *  buffer 
)
inline

Instantiates \(D \to \left[0, 1\right]\) with \(D = [0, s_x) \times [0, s_y) \times [0, s_z)\), where \(s_x, s_y, s_z\) is size.

Precondition
buffer != nullptr && buffer->get() != nullptr
(**buffer).size() >= size.x * size.y * size.z

Definition at line 73 of file BufferedIntensityVolume.hpp.

◆ BufferedIntensityVolume() [2/2]

template<typename VoxelType , typename BufferType >
LibCarna::base::BufferedIntensityVolume< VoxelType, BufferType >::BufferedIntensityVolume ( const math::Vector3ui size)
inlineexplicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 82 of file BufferedIntensityVolume.hpp.

Member Function Documentation

◆ buffer() [1/2]

template<typename VoxelType , typename BufferType >
BufferType & LibCarna::base::BufferedIntensityVolume< VoxelType, BufferType >::buffer ( )
inline

References the underlying buffer.

Definition at line 147 of file BufferedIntensityVolume.hpp.

◆ buffer() [2/2]

template<typename VoxelType , typename BufferType >
const BufferType & LibCarna::base::BufferedIntensityVolume< VoxelType, BufferType >::buffer ( ) const
inline

References the underlying buffer.

Definition at line 155 of file BufferedIntensityVolume.hpp.

◆ bufferValueToIntensity()

template<typename VoxelType , typename BufferType >
static float LibCarna::base::BufferedIntensityVolume< VoxelType, BufferType >::bufferValueToIntensity ( VoxelType  bufferValue)
inlinestatic

Returns the intensity value corresponding to bufferValue.

Definition at line 92 of file BufferedIntensityVolume.hpp.

◆ intensityToBufferValue()

template<typename VoxelType , typename BufferType >
static VoxelType LibCarna::base::BufferedIntensityVolume< VoxelType, BufferType >::intensityToBufferValue ( float  intensity)
inlinestatic

Returns the buffer value corresponding to an intensity.

Definition at line 100 of file BufferedIntensityVolume.hpp.

◆ operator()() [1/2]

template<typename VoxelType , typename BufferType >
float LibCarna::base::BufferedIntensityVolume< VoxelType, BufferType >::operator() ( const math::Vector3ui at) const
inlinevirtual

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Implements LibCarna::base::IntensityVolume.

Definition at line 122 of file BufferedIntensityVolume.hpp.

◆ operator()() [2/2]

template<typename VoxelType , typename BufferType >
float LibCarna::base::BufferedIntensityVolume< VoxelType, BufferType >::operator() ( unsigned int  x,
unsigned int  y,
unsigned int  z 
) const
inlinevirtual

Returns intensity of specified voxel.

Implements LibCarna::base::IntensityVolume.

Definition at line 112 of file BufferedIntensityVolume.hpp.

◆ setVoxel() [1/2]

template<typename VoxelType , typename BufferType >
void LibCarna::base::BufferedIntensityVolume< VoxelType, BufferType >::setVoxel ( const math::Vector3ui at,
float  intensity 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 139 of file BufferedIntensityVolume.hpp.

◆ setVoxel() [2/2]

template<typename VoxelType , typename BufferType >
void LibCarna::base::BufferedIntensityVolume< VoxelType, BufferType >::setVoxel ( unsigned int  x,
unsigned int  y,
unsigned int  z,
float  intensity 
)
inline

Sets the intensity value of a voxel.

Definition at line 130 of file BufferedIntensityVolume.hpp.

Member Data Documentation

◆ myBuffer

template<typename VoxelType , typename BufferType >
const std::unique_ptr< Association< BufferType > > LibCarna::base::BufferedIntensityVolume< VoxelType, BufferType >::myBuffer
protected

Holds the underlying buffer.

The voxels are written \(x\)- \(y\)-plane wise, each plane \(x\)-row wise. To compute the index of some voxel \(\left(x, y, z\right)\), use the following computation rule:

\[ x + \mathrm{width} \cdot y + \mathrm{height} \cdot \mathrm{width} \cdot z \]

Definition at line 171 of file BufferedIntensityVolume.hpp.


The documentation for this class was generated from the following file: