Interface SbImageDataAccessor.Region

  • All Known Implementing Classes:
    Enclosing class:

    public static interface SbImageDataAccessor.Region
    As of Open Inventor 2023.2. ImageViz API is replaced by the new ImageDev toolkit.
    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.

    • Method Detail

      • getPosition

        SbVec4i32 getPosition​(long i)
        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()

      • getExtent

        SbBox4i32 getExtent()
        Returns extent of the region in image space. A dummy implementation could be: for ( int i = rangeMin..rangeMax ) { bbox.extend(getPosition(i)); }
      • getSize

        SbVec4i32 getSize()
        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.
      • getNumVoxel

        long getNumVoxel()
        Returns number of voxels contained in the region.