Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SbImageDataAccessor::SubVolumeRegion Class Reference

Region representing a 3D box. More...

#include <ImageViz/SbImageDataAccessor.h>

+ Inheritance diagram for SbImageDataAccessor::SubVolumeRegion:

Public Member Functions

 SubVolumeRegion (const SbBox3i32 &subVolume)
 Constructor.
 
virtual SbVec4i32 getPosition (uint64_t i) const
 Returns position of the ith voxel of the region.
 
virtual SbVec4i32 getSize () const
 Returns the dimensions of the region.
 
virtual uint64_t getNumVoxel () const
 Returns number of voxels contained in the region.
 
virtual SbBox4i32 getExtent () const
 Returns extent of region.
 

Detailed Description

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)

Definition at line 104 of file SbImageDataAccessor.h.

Constructor & Destructor Documentation

◆ SubVolumeRegion()

SbImageDataAccessor::SubVolumeRegion::SubVolumeRegion ( const SbBox3i32 subVolume)

Constructor.

Member Function Documentation

◆ getExtent()

virtual SbBox4i32 SbImageDataAccessor::SubVolumeRegion::getExtent ( ) const
inlinevirtual

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.

Definition at line 128 of file SbImageDataAccessor.h.

◆ getNumVoxel()

virtual uint64_t SbImageDataAccessor::SubVolumeRegion::getNumVoxel ( ) const
virtual

Returns number of voxels contained in the region.

Implements SbImageDataAccessor::Region.

◆ getPosition()

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.

◆ getSize()

virtual SbVec4i32 SbImageDataAccessor::SubVolumeRegion::getSize ( ) const
inlinevirtual

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.

Definition at line 120 of file SbImageDataAccessor.h.


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