Blue Brain BioExplorer
core::Volume Class Referenceabstract

A base class for volumes. More...

#include <Volume.h>

Inheritance diagram for core::Volume:
Collaboration diagram for core::Volume:

Public Member Functions

PLATFORM_API Volume (const Vector3ui &dimensions, const Vector3f &spacing, const DataType type)
 Constructs a Volume object. More...
 
virtual PLATFORM_API void setDataRange (const Vector2f &range)=0
 
PLATFORM_API Vector2f getDataRange () const
 
virtual PLATFORM_API void commit ()=0
 Commits changes to the volume. More...
 
PLATFORM_API size_t getSizeInBytes () const
 Gets the size of the volume in bytes. More...
 
PLATFORM_API Boxd getBounds () const
 Gets the bounding box of the volume. More...
 
PLATFORM_API Vector3f getDimensions () const
 Get the Dimensions object. More...
 
PLATFORM_API Vector3f getElementSpacing () const
 Get the Element Spacing object. More...
 
PLATFORM_API Vector3f getOffset () const
 Get the Offset object. More...
 
PLATFORM_API Vector2f getValueRange () const
 Get the Value Range object. More...
 
- Public Member Functions inherited from core::BaseObject
 BaseObject ()=default
 
virtual ~BaseObject ()=default
 
 BaseObject (const BaseObject &)
 
BaseObjectoperator= (const BaseObject &rhs)
 
bool isModified () const
 
void resetModified ()
 
void markModified (const bool triggerCallback=true)
 
void onModified (const ModifiedCallback &callback)
 
void clearModifiedCallback ()
 

Protected Attributes

std::atomic_size_t _sizeInBytes {0}
 
const Vector3ui _dimensions
 
const Vector3f _spacing
 
Vector3f _offset
 
const DataType _dataType
 
Vector2f _valueRange {-1e6f, 1e6f}
 

Additional Inherited Members

- Public Types inherited from core::BaseObject
using ModifiedCallback = std::function< void(const BaseObject &)>
 
- Protected Member Functions inherited from core::BaseObject
template<typename T >
void _updateValue (T &member, const T &newValue, const bool triggerCallback=true)
 
template<class T >
bool _isEqual (const T &a, const T &b, typename std::enable_if< std::is_floating_point< T >::value >::type *=0)
 
template<class T >
bool _isEqual (const T &a, const T &b, typename std::enable_if<!std::is_floating_point< T >::value >::type *=0)
 

Detailed Description

A base class for volumes.

Definition at line 33 of file Volume.h.

Constructor & Destructor Documentation

◆ Volume()

core::Volume::Volume ( const Vector3ui dimensions,
const Vector3f spacing,
const DataType  type 
)

Constructs a Volume object.

Parameters
dimensionsThe dimensions of the volume as a Vector3ui object.
spacingThe spacing between voxels as a Vector3f object.
typeThe data type of the volume.

Definition at line 26 of file Volume.cpp.

Member Function Documentation

◆ commit()

virtual PLATFORM_API void core::Volume::commit ( )
pure virtual

Commits changes to the volume.

Implemented in core::engine::ospray::OSPRayVolume, and core::engine::optix::OptiXVolume.

◆ getBounds()

PLATFORM_API Boxd core::Volume::getBounds ( ) const
inline

Gets the bounding box of the volume.

Returns
The bounding box of the volume as a Boxd object.

Definition at line 70 of file Volume.h.

◆ getDataRange()

PLATFORM_API Vector2f core::Volume::getDataRange ( ) const
inline

Definition at line 53 of file Volume.h.

◆ getDimensions()

PLATFORM_API Vector3f core::Volume::getDimensions ( ) const
inline

Get the Dimensions object.

Returns
The dimensions of the volume in the 3D scene

Definition at line 77 of file Volume.h.

◆ getElementSpacing()

PLATFORM_API Vector3f core::Volume::getElementSpacing ( ) const
inline

Get the Element Spacing object.

Returns
The voxel size

Definition at line 84 of file Volume.h.

◆ getOffset()

PLATFORM_API Vector3f core::Volume::getOffset ( ) const
inline

Get the Offset object.

Returns
The location of the volume in the 3D scene

Definition at line 91 of file Volume.h.

◆ getSizeInBytes()

PLATFORM_API size_t core::Volume::getSizeInBytes ( ) const
inline

Gets the size of the volume in bytes.

Returns
The size of the volume in bytes.

Definition at line 64 of file Volume.h.

◆ getValueRange()

PLATFORM_API Vector2f core::Volume::getValueRange ( ) const
inline

Get the Value Range object.

Returns
The range of values in the volume

Definition at line 98 of file Volume.h.

◆ setDataRange()

virtual PLATFORM_API void core::Volume::setDataRange ( const Vector2f range)
pure virtual

Member Data Documentation

◆ _dataType

const DataType core::Volume::_dataType
protected

Definition at line 105 of file Volume.h.

◆ _dimensions

const Vector3ui core::Volume::_dimensions
protected

Definition at line 102 of file Volume.h.

◆ _offset

Vector3f core::Volume::_offset
protected

Definition at line 104 of file Volume.h.

◆ _sizeInBytes

std::atomic_size_t core::Volume::_sizeInBytes {0}
protected

Definition at line 101 of file Volume.h.

◆ _spacing

const Vector3f core::Volume::_spacing
protected

Definition at line 103 of file Volume.h.

◆ _valueRange

Vector2f core::Volume::_valueRange {-1e6f, 1e6f}
protected

Definition at line 106 of file Volume.h.


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