BrickedVolume Class Reference
BrickedVolumes are used when rendering large volumes with bricking. More...
#include <brickedvolume.h>
Public Member Functions | |
| BrickedVolume (Volume *indexVolume, Volume *packedVolume, Volume *eepVolume) | |
| Volume * | getIndexVolume () const |
| Volume * | getPackedVolume () const |
| Volume * | getEepVolume () const |
| void | setIndexVolume (Volume *indexVolume) |
| void | setPackedVolume (Volume *packedVolume) |
| void | setEepVolume (Volume *eepVolume) |
| int | getBitsStored () const |
| Returns the volume's bit depth. | |
| tgt::ivec3 | getDimensions () const |
| overwritten to redirect to the eepVolume (for use by proxy geometry) | |
| tgt::vec3 | getCubeSize () const |
| overwritten to redirect to the eepVolume (for use by proxy geometry) | |
| tgt::vec3 | getLLF () const |
| overwritten to redirect to the eepVolume (for use by proxy geometry) | |
| tgt::vec3 | getURB () const |
| overwritten to redirect to the eepVolume (for use by proxy geometry) | |
| virtual Volume * | clone () const throw (std::bad_alloc) |
| Use this as a kind of a virtual constructor. | |
| virtual Volume * | clone (void *) const throw (std::bad_alloc) |
| Use this as a kind of a virtual constructor that does _NOT_ copy over the voxels but uses the given pointer instead as a voxel data. | |
| virtual int | getBitsAllocated () const |
| Returns the number of bits that are allocated by each voxel. | |
| virtual int | getNumChannels () const |
| Returns the number of channels of this volume. | |
| virtual int | getBytesPerVoxel () const |
| Returns the number of bytes that are allocated for each voxel. | |
| virtual size_t | getNumBytes () const |
| Returns the number of bytes held in the data_ array. | |
| virtual tgt::vec2 | elementRange () const |
| Returns the data set's minimal and maximal possible element values according to its data type converted to float. | |
| virtual float | getVoxelFloat (const tgt::ivec3 &, size_t) const |
| Returns the voxel of a given postion and channel, converted to a float. | |
| virtual float | getVoxelFloat (size_t, size_t, size_t, size_t) const |
| Returns the voxel of a given postion and channel, converted to a float. | |
| virtual float | getVoxelFloat (size_t, size_t) const |
| Returns the voxel of a given position and channel, converted to a float. | |
| virtual void | setVoxelFloat (float, const tgt::ivec3 &, size_t) |
| Sets the voxel of a given postion and channel, converted from a float. | |
| virtual void | setVoxelFloat (float, size_t, size_t, size_t, size_t) |
| Sets the voxel of a given postion and channel, converted from a float. | |
| virtual void | setVoxelFloat (float, size_t, size_t) |
| Sets the voxel of a given postion and channel, converted from a float. | |
| virtual void | clear () |
| Set all volume data to zero. | |
| virtual void * | getData () |
| Gets a void* to the data stored with this Volume. | |
| virtual Volume * | mirrorZ () const |
| virtual Volume * | createSubset (tgt::ivec3, tgt::ivec3) const throw (std::bad_alloc) |
| virtual void | resize (tgt::ivec3, bool) throw (std::bad_alloc) |
| Resizes the volume to the specified dimensions by keeping its remaining properties. | |
| virtual Volume * | resample (tgt::ivec3, Filter) const throw (std::bad_alloc) |
| Returns a volume that has been resampled to the specified dimensions by using the given filtering mode. | |
| virtual float | calcError (Volume *) |
| virtual bool | isUniform () const |
Protected Attributes | |
| Volume * | indexVolume_ |
| Volume * | packedVolume_ |
| Volume * | eepVolume_ |
Detailed Description
BrickedVolumes are used when rendering large volumes with bricking.
A BrickedVolume is only a container for three other volumes, the index volume, the packed volume, and the eep volume. This is basically a hack in order to use bricking in standard networks.
Definition at line 42 of file brickedvolume.h.
Member Function Documentation
| virtual Volume* clone | ( | void * | data | ) | const throw (std::bad_alloc) [inline, virtual] |
Use this as a kind of a virtual constructor that does _NOT_ copy over the voxels but uses the given pointer instead as a voxel data.
If this pointer is 0, an empty volume without voxel data is created.
Implements Volume.
Definition at line 76 of file brickedvolume.h.
| virtual int getBitsAllocated | ( | ) | const [inline, virtual] |
Returns the number of bits that are allocated by each voxel.
For technical reasons, it may exceed the volume's bit depth.
Implements Volume.
Definition at line 80 of file brickedvolume.h.
| virtual float getVoxelFloat | ( | size_t | index, | |
| size_t | channel | |||
| ) | const [inline, virtual] |
Returns the voxel of a given position and channel, converted to a float.
BEWARE: Since this method is virtual it can be considered as slow.
- Parameters:
-
index the index of the voxel channel the channel of the voxel
Implements Volume.
Definition at line 108 of file brickedvolume.h.
| virtual float getVoxelFloat | ( | size_t | x, | |
| size_t | y, | |||
| size_t | z, | |||
| size_t | channel | |||
| ) | const [inline, virtual] |
Returns the voxel of a given postion and channel, converted to a float.
BEWARE: Since this method is virtual it can be considered as slow.
- Parameters:
-
x the x-coordinate of the voxel y the y-coordinate of the voxel z the z-coordinate of the voxel channel the channel of the voxel
Implements Volume.
Definition at line 104 of file brickedvolume.h.
| virtual float getVoxelFloat | ( | const tgt::ivec3 & | pos, | |
| size_t | channel | |||
| ) | const [inline, virtual] |
Returns the voxel of a given postion and channel, converted to a float.
BEWARE: Since this method is virtual it can be considered as slow.
- Parameters:
-
pos the position of the voxel channel the channel of the voxel
Implements Volume.
Definition at line 100 of file brickedvolume.h.
| virtual Volume* resample | ( | tgt::ivec3 | newDims, | |
| Filter | filter | |||
| ) | const throw (std::bad_alloc) [inline, virtual] |
Returns a volume that has been resampled to the specified dimensions by using the given filtering mode.
- Returns:
- the resampled volume
Implements Volume.
Definition at line 141 of file brickedvolume.h.
| virtual void resize | ( | tgt::ivec3 | newDims, | |
| bool | allocMem | |||
| ) | throw (std::bad_alloc) [inline, virtual] |
Resizes the volume to the specified dimensions by keeping its remaining properties.
- Note:
- The volume data is is cleared by this operation.
- Parameters:
-
newDims the volume's new dimensions allocMem if true, a new data buffer is allocated
Implements Volume.
Definition at line 138 of file brickedvolume.h.
| virtual void setVoxelFloat | ( | float | value, | |
| size_t | index, | |||
| size_t | channel | |||
| ) | [inline, virtual] |
Sets the voxel of a given postion and channel, converted from a float.
BEWARE: Since this method is virtual it can be considered as slow.
- Parameters:
-
value The float value to be set. index the index of the voxel channel the channel of the voxel
Implements Volume.
Definition at line 120 of file brickedvolume.h.
| virtual void setVoxelFloat | ( | float | value, | |
| size_t | x, | |||
| size_t | y, | |||
| size_t | z, | |||
| size_t | channel | |||
| ) | [inline, virtual] |
Sets the voxel of a given postion and channel, converted from a float.
BEWARE: Since this method is virtual it can be considered as slow.
- Parameters:
-
value The float value to be set. x the x-coordinate of the voxel y the y-coordinate of the voxel z the z-coordinate of the voxel channel the channel of the voxel
Implements Volume.
Definition at line 116 of file brickedvolume.h.
| virtual void setVoxelFloat | ( | float | value, | |
| const tgt::ivec3 & | pos, | |||
| size_t | channel | |||
| ) | [inline, virtual] |
Sets the voxel of a given postion and channel, converted from a float.
BEWARE: Since this method is virtual it can be considered as slow.
- Parameters:
-
value The float value to be set. pos the position of the voxel channel the channel of the voxel
Implements Volume.
Definition at line 112 of file brickedvolume.h.