A region must be an ordered set with a first voxel and for each voxel a next voxel, else we cannot associate a buffer to this region. More...
#include <ImageViz/SbImageDataAccessor.h>
Public Member Functions | |
virtual SbVec4i32 | getPosition (uint64_t i) const =0 |
Returns position of the ith voxel in the region. | |
virtual SbVec4i32 | getSize () const =0 |
Returns dimensions of the region. | |
virtual uint64_t | getNumVoxel () const =0 |
Returns number of voxels contained in the region. | |
virtual SbBox4i32 | getExtent () const =0 |
Returns extent of the region in image space. | |
A region must be an ordered set with a first voxel and for each voxel a next voxel, else we cannot associate a buffer to this region.
A region DOES NOT depend on any image. It is a subspace of Z^4 (signed integer). It can be described with floating values (ex. A plane defined by its equation) but the space it represents is always discretized. For a plane, it represents voxels intersecting the plane.
A region is immutable once created (no set method). This avoids unwanted border effects in a multi threaded environment.
Definition at line 71 of file SbImageDataAccessor.h.
|
pure virtual |
Returns extent of the region in image space.
A dummy implementation could be: for ( int i = rangeMin..rangeMax ) { bbox.extend(getPosition(i)); }
Implemented in SbImageDataAccessor::SubVolumeRegion.
|
pure virtual |
Returns number of voxels contained in the region.
Implemented in SbImageDataAccessor::SubVolumeRegion.
|
pure virtual |
Returns position of the ith voxel in the region.
ex: If it is a line, 0 is the begining of the line, then 1, 2, 3, ... represent voxels accross the line.
Throws out of range exception if i >= getNumVoxel()
Implemented in SbImageDataAccessor::SubVolumeRegion.
|
pure virtual |
Returns dimensions of the region.
If the region represents a slice or a plane, getDimension will return (width, height, 1, 1), with width * height = getNumVoxel(). The difference with getExtent() is that, for an oblique plane for example, getExtent() will return the bounding box of the plane, whereas getSize() will return a 2D space.
Implemented in SbImageDataAccessor::SubVolumeRegion.