SbImageDataAccessor::Region Class Reference

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:
SbImageDataAccessor::SubVolumeRegion

List of all members.

Public Member Functions

virtual SbVec4i32 getPosition (uint64_t i) const =0
virtual SbVec4i32 getSize () const =0
virtual uint64_t getNumVoxel () const =0
virtual SbBox4i32 getExtent () const =0

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.


Member Function Documentation

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.

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

Returns number of voxels contained in the region.

Implemented in SbImageDataAccessor::SubVolumeRegion.

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.

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:

Open Inventor Toolkit reference manual, generated on 4 Sep 2023
Copyright © Thermo Fisher Scientific All rights reserved.
https://www.openinventor.com/