VolumeBrick< T > Class Template Reference
VolumeBricks are used to divide a large volume into several smaller ones. More...
#include <brick.h>
Public Member Functions | |
| VolumeBrick (tgt::ivec3 position, tgt::vec3 llf, tgt::ivec3 dimensions) | |
| ~VolumeBrick () | |
| Deletes this VolumeBrick, including all data at all levels of detail. | |
| char * | getLodVolume (size_t i) |
| Returns the volumedata of this brick with resolution i (original resolution * 2^-i). | |
| char * | getVolume () |
| Same as getLodVolume(0). | |
| bool | addLodVolume (char *volume, size_t lod) |
| Adds volumedata at a certain level of detail to the levelOfDetailMap_. | |
| bool | deleteLodVolume (size_t lod) |
| Deletes volumdata from the levelOfDetailMap_, also frees the memory. | |
| void | setRamManager (RamManager< T > *ramManager) |
| Sets the RamManager. | |
| void | setCurrentLevelOfDetail (size_t i) |
| Sets the level of detail at which this VolumeBrick should be rendered. | |
| size_t | getCurrentLevelOfDetail () |
| Returns the level of detail at which this VolumeBrick is to be rendered. | |
| tgt::vec3 | getLlf () |
| Returns the VolumeBricks lower-left-front corner. | |
| bool | getLevelOfDetailChanged () |
| Returns if the desired level of detail, at which this VolumeBrick should be rendered, has changed. | |
| void | setLevelOfDetailChanged (bool b) |
| Sets whether or not the desired level of detail at which this VolumeBrick should be rendered has changed. | |
| size_t | getOldLevelOfDetail () |
| If the level of detail at which this VolumeBrick should be rendered has changed, returns the old one. | |
| void | setOldLevelOfDetail (size_t lod) |
| Sets the old level of detail if there is a new one. | |
| void | setAllVoxelsEqual (bool b) |
| Sets whether or not all voxels in this brick have the same value. | |
| bool | getAllVoxelsEqual () |
| Returns if all voxels in the volumedata of this brick have the same value. | |
| void | setBvFilePosition (uint64_t pos) |
| Sets the position at which the volumedata of this brick can be found in the Bv File (Bricked Volume File). | |
| uint64_t | getBvFilePosition () |
| Gets the position at which the volumedata of this brick can be found in the Bv File (Bricked Volume File). | |
| PackingBrick< T > * | getPackingBrick () |
| Returns the PackingBrick of this VolumeBrick. | |
| void | setPackingBrick (PackingBrick< T > *brick) |
| Sets the PackingBrick of this VolumeBrick. | |
| float | getError (size_t levelOfDetail) |
| Returns the error the volume data at the given level of detail has compared to the volume data at the highest level of detail. | |
| void | addError (float error) |
| Adds an error to the errors_ vector. | |
Protected Attributes | |
| std::map< size_t, char * > | levelOfDetailMap_ |
| A map holding the different levels of detail of the volumedata for this brick. | |
| bool | allVoxelsEqual_ |
| Have all voxels of this bricks' volumedata the same value? | |
| size_t | currentLevelOfDetail_ |
| The level of detail the volumdata in this brick should be rendered. | |
| size_t | oldLevelOfDetail_ |
| If this brick has been rendered at a different resolution previously, this is its former level of detail. | |
| bool | levelOfDetailChanged_ |
| If the bricks level of detail has changed this variable is set to true. | |
| tgt::vec3 | llf_ |
| The bricks lower-left-front corner in world coordinates. | |
| PackingBrick< T > * | packingBrick_ |
| The PackingBrick this volumebrick is inserted into. | |
| uint64_t | bvFilePosition_ |
| The position at which the volumedata of this brick can be found in the Bv File (Bricked Volume File). | |
| RamManager< T > * | ramManager_ |
| The RamManager. | |
| std::vector< float > | errors_ |
Detailed Description
template<class T>
class voreen::VolumeBrick< T >
VolumeBricks are used to divide a large volume into several smaller ones.
A VolumeBrick holds a part the original volumedata at (maybe) several resolution levels.
Definition at line 202 of file brick.h.
Constructor & Destructor Documentation
| VolumeBrick | ( | tgt::ivec3 | position, | |
| tgt::vec3 | llf, | |||
| tgt::ivec3 | dimensions | |||
| ) | [inline] |
Member Function Documentation
| void addError | ( | float | error | ) | [inline, virtual] |
Adds an error to the errors_ vector.
This vector holds the errors of the volume data at different levels of detail compared to the volume data at highest resolution. As it is absolutely necessary to know the error of each and every level of detail, this has been realized by a vector and not a map. All errors have to be added in the correct order, starting with the error of LOD 0 (which is obviously 0.0 every time).
Reimplemented from Brick.
| tgt::vec3 getLlf | ( | ) | [inline, virtual] |
| char * getVolume | ( | ) | [inline, virtual] |
Member Data Documentation
RamManager<T>* ramManager_ [protected] |
The RamManager.
Whenever volumedata at a specific level of detail of this brick is accessed and it's not currently in the RAM, the RamManager will load it from disk.