Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SbImageDataAccessor::Region Class Referenceabstract

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>

+ Inheritance diagram for SbImageDataAccessor::Region:

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.
 

Detailed Description

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.

Member Function Documentation

◆ getExtent()

virtual SbBox4i32 SbImageDataAccessor::Region::getExtent ( ) const
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.

◆ getNumVoxel()

virtual uint64_t SbImageDataAccessor::Region::getNumVoxel ( ) const
pure virtual

Returns number of voxels contained in the region.

Implemented in SbImageDataAccessor::SubVolumeRegion.

◆ getPosition()

virtual SbVec4i32 SbImageDataAccessor::Region::getPosition ( uint64_t  i) const
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.

◆ getSize()

virtual SbVec4i32 SbImageDataAccessor::Region::getSize ( ) const
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.


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