User Documentation |
RAVL, Recognition And Vision Library |
VoxelSetC
|
|
A cuboid of volume cells (voxels) in 3D space
|
|
include | "Ravl/3D/VoxelSet.hh" |
User Level: | Normal |
Library: | Ravl3D |
In Scope: | Ravl3DN |
Comments:
Each voxel has an 8-bit flag for storing any user-defined attributes.
The voxel set has a coordinate system with xyz corresponding to index 0,1,2.
The origin of the coordinate system is at the centre of the voxel with index (0,0,0)
Voxel subsets created with ContiguousPortion(...) have the same world
to voxel set transformation but different ranges of indices
Parent Classes:
Methods:
- VoxelSetC()
-
Default constructor
- VoxelSetC(BinIStreamC & is)
-
Stream constructor
- VoxelSetC(const Matrix3dC & R,const Vector3dC & t,RealT voxel_size,UIntT cube_side_num_voxels,ByteT occupied_threshold = 1)
-
Construct a cube of voxels
R*x + t transforms a 3D point x from world co-ordinates to voxel co-ordinates
voxel_size is the length of each side of a single voxel
Units of voxel_size must match those of t
cube_side_num_voxels is the number of voxels along each side of the cube
- RealT voxelSize() const
-
Length of a side of a single voxel
- const Matrix3dC & R() const
-
Orientation
R*x + t transforms a 3D point x from world co-ordinates to voxel co-ordinates
- const Vector3dC & t() const
-
Position
R*x + t transforms a 3D point x from world co-ordinates to voxel co-ordinates
- void Fill(ByteT v)
-
Set all voxel attributes equal to v
- bool IsOccupied(const Vector3dC & x)
-
Checks the specified location against the occupied threshold.
Returns true if the voxel is occupied, false if unoccupied or if x is not
in the voxel set.
- bool GetVoxelCheck(ByteT & v,const Vector3dC & x) const
-
Get the current attributes of voxel at location x
returns true if x is inside the voxel array, 0 otherwise
- bool GetVoxelPointerCheck(ByteT *& v,const Vector3dC & x)
-
Get a pointer to voxel attributes at location x
returns true if x is inside the voxel array, 0 otherwise
- const Array3dC<ByteT> & Array() const
-
Direct access to voxel attributes(const)
- Array3dC<ByteT> & Array()
-
Direct access to voxel attributes
- Index3dC VoxelIndex(const Vector3dC & x) const
-
Index of voxel corresponding to point x in space
Can be used to index Array() directly, but GetVoxelCheck does this for you
- ByteT & OccupiedThreshold()
-
A voxel is said to be occupied if it has an attributes >= OccupiedThreshold
- const ByteT & OccupiedThreshold() const
-
A voxel is said to be occupied if it has an attributes >= OccupiedThreshold
- const RCHandleC<VoxelSetBodyC> & operator =(const RCHandleC<VoxelSetBodyC> & oth)
-
Assign handle.
- RCHandleC<VoxelSetBodyC> DeepCopy(UIntT levels = ((UIntT))) const
-
Do a deep copy of the object.
- bool operator ==(const RCHandleC<VoxelSetBodyC> & oth) const
-
Are handles to the same object ?
- bool operator !=(const RCHandleC<VoxelSetBodyC> & oth) const
-
Are handles to different objects ?
- UIntT Hash() const
-
Default hash function.
This hashes on the address of the body.
- bool IsValid() const
-
Test if this is a valid handle.
- void Invalidate()
-
Invalidate this handle.
Unattaches the body from the handle.
- bool IsHandleType(const DT &) const
-
Is handle of given type ?
- void CheckHandleType(const DT & dummy) const
-
Check handle type. Throw an expception if not.
- UIntT References() const
-
Find the number of references to the body of this object.
- ostream & operator <<(ostream & strm,const RCHandleC<VoxelSetBodyC> & obj)
-
- istream & operator >>(istream & strm,RCHandleC<VoxelSetBodyC> & obj)
-
Maintainer:Joel Mitchelson, Documentation by CxxDoc: Tue Aug 13 09:59:02 2002
|