LibCarna Version 3.4.0
Loading...
Searching...
No Matches
Classes | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | List of all members
LibCarna::helpers::VolumeGridHelperBase Class Referenceabstract

Defines type-parameters-independent VolumeGridHelper base interface. More...

#include <VolumeGridHelper.hpp>

+ Inheritance diagram for LibCarna::helpers::VolumeGridHelperBase:

Classes

struct  Extent
 Specifies the extent of the whole dataset. More...
 
struct  Spacing
 Specifies the spacing between two succeeding voxel centers. More...
 

Public Member Functions

 VolumeGridHelperBase (const base::math::Vector3ui &nativeResolution)
 Instantiates.
 
virtual ~VolumeGridHelperBase ()
 Does nothing.
 
virtual void releaseGeometryFeatures ()=0
 Releases all previously acquired textures. Invoke this method when the volume data changes.
 
virtual base::NodecreateNode (unsigned int geometryType, const Spacing &spacing) const =0
 Creates renderable representation of the underlying grid, that can be put anywhere in the scene graph. The volume is centered in the node.
 
virtual base::NodecreateNode (unsigned int geometryType, const Extent &extent) const =0
 Creates renderable representation of the underlying grid, that can be put anywhere in the scene graph. The volume is centered in the node.
 
template<typename LoadIntensitiesFunction >
void loadIntensities (const LoadIntensitiesFunction &intensityData)
 

Public Attributes

const base::math::Vector3ui nativeResolution
 Holds the original resolution of the loaded data.
 

Static Public Attributes

static const std::size_t DEFAULT_MAX_SEGMENT_BYTESIZE = 2 * 300 * 300 * 300
 Default maximum memory size of a single segment volume, 50 megabytes approximately. This determines the segments partitioning.
 

Protected Member Functions

virtual void loadIntensities (const std::function< float(const base::math::Vector3ui &) > &intensityData)=0
 Updates the data of the volume grid.
 

Detailed Description

Defines type-parameters-independent VolumeGridHelper base interface.

Author
Leonid Kostrykin

Definition at line 51 of file VolumeGridHelper.hpp.

Constructor & Destructor Documentation

◆ VolumeGridHelperBase()

LibCarna::helpers::VolumeGridHelperBase::VolumeGridHelperBase ( const base::math::Vector3ui nativeResolution)

Instantiates.

Parameters
nativeResolutionis the resolution the grid is to be prepared for.

Member Function Documentation

◆ createNode() [1/2]

virtual base::Node * LibCarna::helpers::VolumeGridHelperBase::createNode ( unsigned int  geometryType,
const Extent extent 
) const
pure virtual

Creates renderable representation of the underlying grid, that can be put anywhere in the scene graph. The volume is centered in the node.

Warning
Only change the returned node's localTransform attribute when you know what you're doing! Put it into another node otherwise.
Parameters
geometryTypeWill be used for base::Geometry instantiation.
extentSpecifies the extent of the whole dataset.

Implemented in LibCarna::helpers::VolumeGridHelper< SegmentIntensityVolumeType, SegmentNormalsVolumeType >.

◆ createNode() [2/2]

virtual base::Node * LibCarna::helpers::VolumeGridHelperBase::createNode ( unsigned int  geometryType,
const Spacing spacing 
) const
pure virtual

Creates renderable representation of the underlying grid, that can be put anywhere in the scene graph. The volume is centered in the node.

Warning
Only change the returned node's localTransform attribute when you know what you're doing! Put it into another node otherwise.
Parameters
geometryTypeWill be used for base::Geometry instantiation.
spacingSpecifies the spacing between two succeeding voxel centers.

Implemented in LibCarna::helpers::VolumeGridHelper< SegmentIntensityVolumeType, SegmentNormalsVolumeType >.

◆ loadIntensities() [1/2]

template<typename LoadIntensitiesFunction >
void LibCarna::helpers::VolumeGridHelperBase::loadIntensities ( const LoadIntensitiesFunction &  intensityData)

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 169 of file VolumeGridHelper.hpp.

◆ loadIntensities() [2/2]

virtual void LibCarna::helpers::VolumeGridHelperBase::loadIntensities ( const std::function< float(const base::math::Vector3ui &) > &  intensityData)
protectedpure virtual

◆ releaseGeometryFeatures()

virtual void LibCarna::helpers::VolumeGridHelperBase::releaseGeometryFeatures ( )
pure virtual

Releases all previously acquired textures. Invoke this method when the volume data changes.

If this method is not invoked after an update of the volume data, succeeding calls to createNode will not reflect the new data. Note however, that if you call this method between two invocations of createNode without the volume data been altered, same textures will get uploaded twice to video memory, i.e. video resources will be wasted.

Implemented in LibCarna::helpers::VolumeGridHelper< SegmentIntensityVolumeType, SegmentNormalsVolumeType >.

Member Data Documentation

◆ DEFAULT_MAX_SEGMENT_BYTESIZE

const std::size_t LibCarna::helpers::VolumeGridHelperBase::DEFAULT_MAX_SEGMENT_BYTESIZE = 2 * 300 * 300 * 300
static

Default maximum memory size of a single segment volume, 50 megabytes approximately. This determines the segments partitioning.

Definition at line 60 of file VolumeGridHelper.hpp.

◆ nativeResolution

const base::math::Vector3ui LibCarna::helpers::VolumeGridHelperBase::nativeResolution

Holds the original resolution of the loaded data.

Definition at line 72 of file VolumeGridHelper.hpp.


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