Region representing a 3D box. More...
#include <ImageViz/SbImageDataAccessor.h>
Public Member Functions | |
SubVolumeRegion (const SbBox3i32 &subVolume) | |
virtual SbVec4i32 | getPosition (uint64_t i) const |
virtual SbVec4i32 | getSize () const |
virtual uint64_t | getNumVoxel () const |
virtual SbBox4i32 | getExtent () const |
Region representing a 3D box.
Voxels are ordered line by line, slice by slice. 1st voxel is in corner (minX, minY, minZ). 2nd voxel is in (minX+1, minY, minZ). Last voxel is in (maxX, maxY, maxZ)
SbImageDataAccessor::SubVolumeRegion::SubVolumeRegion | ( | const SbBox3i32 & | subVolume | ) |
Constructor.
virtual SbBox4i32 SbImageDataAccessor::SubVolumeRegion::getExtent | ( | ) | const [inline, virtual] |
Returns extent of region.
As this region is a 3D space, the last coordinates of the extent are always 0. The 3 first coordinates correspond to the SbBox3i32 given in the constructor.
Implements SbImageDataAccessor::Region.
virtual uint64_t SbImageDataAccessor::SubVolumeRegion::getNumVoxel | ( | ) | const [virtual] |
Returns number of voxels contained in the region.
Implements SbImageDataAccessor::Region.
virtual SbVec4i32 SbImageDataAccessor::SubVolumeRegion::getPosition | ( | uint64_t | i | ) | const [virtual] |
Returns position of the ith voxel of the region.
ie. getPosition(0) returns the lower left corner of box given in constructor.
Throws out of range exception if i >= getNumVoxel()
Implements SbImageDataAccessor::Region.
virtual SbVec4i32 SbImageDataAccessor::SubVolumeRegion::getSize | ( | ) | const [inline, virtual] |
Returns the dimensions of the region.
As this region represent a 3D space, getDimension()[3] is always 1. getDimension()[0], [1] and [2] correspond to size of SbBox3i32 given in constructor.
Implements SbImageDataAccessor::Region.