Package com.openinventor.imageviz
Class SbImageDataAccessor.SubVolumeRegion
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.imageviz.SbImageDataAccessor.SubVolumeRegion
-
- All Implemented Interfaces:
SbImageDataAccessor.Region
- Enclosing class:
- SbImageDataAccessor
public static class SbImageDataAccessor.SubVolumeRegion extends Inventor implements SbImageDataAccessor.Region
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)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SubVolumeRegion(SbBox3i32 subVolume)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SbBox4i32
getExtent()
Returns extent of region.long
getNumVoxel()
Returns number of voxels contained in the region.SbVec4i32
getPosition(long i)
Returns position of the ith voxel of the region.SbVec4i32
getSize()
Returns the dimensions of the region.-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-
-
-
Constructor Detail
-
SubVolumeRegion
public SubVolumeRegion(SbBox3i32 subVolume)
Constructor.
-
-
Method Detail
-
getSize
public SbVec4i32 getSize()
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 ofSbBox3i32
given in constructor.- Specified by:
getSize
in interfaceSbImageDataAccessor.Region
-
getExtent
public SbBox4i32 getExtent()
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 theSbBox3i32
given in the constructor.- Specified by:
getExtent
in interfaceSbImageDataAccessor.Region
-
getNumVoxel
public long getNumVoxel()
Returns number of voxels contained in the region.- Specified by:
getNumVoxel
in interfaceSbImageDataAccessor.Region
-
getPosition
public SbVec4i32 getPosition(long i)
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()
- Specified by:
getPosition
in interfaceSbImageDataAccessor.Region
-
-