Carna  Version 3.3.2
Classes | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Carna::helpers::VolumeGridHelperBase Class Referenceabstract

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

#include <VolumeGridHelper.h>

+ Inheritance diagram for Carna::helpers::VolumeGridHelperBase:

Classes

struct  Dimensions
 Specifies the dimensions of the whole dataset in millimeters. More...
 
struct  Spacing
 Specifies the spacing between two succeeding voxel centers in millimeters. More...
 

Public Member Functions

 VolumeGridHelperBase (const base::math::Vector3ui &nativeResolution)
 Instantiates. More...
 
virtual ~VolumeGridHelperBase ()
 Does nothing.
 
virtual void releaseGeometryFeatures ()=0
 Releases all previously acquired textures. Invoke this method when the volume data changes. More...
 
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. More...
 
virtual base::NodecreateNode (unsigned int geometryType, const Dimensions &dimensions) 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. More...
 
virtual void loadIntensities (const std::function< float(const base::math::Vector3ui &) > &intensityData)=0
 Updates the data of the volume grid. More...
 
template<typename LoadIntensitiesFunction >
void loadIntensities (const LoadIntensitiesFunction &intensityData)
 
void loadHUData (const std::function< base::HUV(const base::math::Vector3ui &) > &huData)
 Updates the data of the volume grid. More...
 
template<typename LoadHUDataFunction >
void loadHUData (const LoadHUDataFunction &huData)
 

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. More...
 

Detailed Description

Defines type-parameters-independent VolumeGridHelper base interface.

Author
Leonid Kostrykin
Date
3.4.15

Definition at line 48 of file VolumeGridHelper.h.

Constructor & Destructor Documentation

◆ VolumeGridHelperBase()

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

Instantiates.

Parameters
nativeResolutionis the resolution the grid is to be prepared for.
Since
API Version 3.0.1

Member Function Documentation

◆ createNode() [1/2]

virtual base::Node* Carna::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 in millimeters.

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

◆ createNode() [2/2]

virtual base::Node* Carna::helpers::VolumeGridHelperBase::createNode ( unsigned int  geometryType,
const Dimensions dimensions 
) 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.
dimensionsSpecifies the dimensions of the whole dataset in millimeters.

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

◆ loadHUData() [1/2]

void Carna::helpers::VolumeGridHelperBase::loadHUData ( const std::function< base::HUV(const base::math::Vector3ui &) > &  huData)

Updates the data of the volume grid.

The huData must be scaled to \(\left[-1024, 3071\right]\).

◆ loadHUData() [2/2]

template<typename LoadHUDataFunction >
void Carna::helpers::VolumeGridHelperBase::loadHUData ( const LoadHUDataFunction &  huData)

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 197 of file VolumeGridHelper.h.

◆ loadIntensities() [1/2]

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

Updates the data of the volume grid.

The intensityData must be scaled to \(\left[0, 1\right]\).

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

◆ loadIntensities() [2/2]

template<typename LoadIntensitiesFunction >
void Carna::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 183 of file VolumeGridHelper.h.

◆ releaseGeometryFeatures()

virtual void Carna::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 Carna::helpers::VolumeGridHelper< SegmentIntensityVolumeType, SegmentNormalsVolumeType >.

Member Data Documentation

◆ DEFAULT_MAX_SEGMENT_BYTESIZE

const std::size_t Carna::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.

Since
API Version 3.0.1

Definition at line 59 of file VolumeGridHelper.h.


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