Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

vlOffset Class Reference

This class defines an offset. More...

#include <vloffset.h>

Inheritance diagram for vlOffset:

vlTriple< int16 > List of all members.

Public Member Functions

 vlOffset (const uint16 dim=3)
 Constructor in which the number of dimensions is specified.

 vlOffset (const vlTriple< int16 > &triple)
 Constructor in which a triple is given.

 vlOffset (const int16 x, const int16 y, const int16 z)
 Special constructor for 3D.

 vlOffset (const int16 x, const int16 y, const int16 z, const int16 t)
 Special constructor for 4D.

 ~vlOffset ()
int16 t () const
 Returns the t component of the offset.

int16 operator[] (const uint16 dim) const
 Returns the offset at the given dimension.

int16operator[] (const uint16 dim)
 Returns the offset at the given dimension.

uint16 dim () const
 Returns the dimensionality of the offset.


Private Attributes

std::vector< int16m_offset
 store the offsets greater than the first 3 dims

int16 m_dummy
 Some dummy which will be returned when offset of dimension greater than the real is accessed.

uint16 m_dim
 Dimensions of the offset.


Friends

std::ostream & operator<< (std::ostream &os, vlOffset const *const o)
 overriding << to enable writing offset to a stream

std::ostream & operator<< (std::ostream &os, vlOffset const &o)
 overriding << to enable writing offset to a stream


Detailed Description

Offset is the relative location of one voxel with respect to another.

The offset can be accessed using either x(), y(), z() and t() functions or using the overloaded [] operator. The offset is optimized for 3D & 4D access.

Definition at line 44 of file vloffset.h.


Constructor & Destructor Documentation

vlOffset::vlOffset const uint16  dim = 3  )  [inline]
 

Definition at line 48 of file vloffset.h.

References dim(), int16, m_dim, m_dummy, and m_offset.

vlOffset::vlOffset const vlTriple< int16 > &  triple  )  [inline]
 

Definition at line 58 of file vloffset.h.

References int16, m_dim, and m_dummy.

vlOffset::vlOffset const int16  x,
const int16  y,
const int16  z
[inline]
 

Definition at line 66 of file vloffset.h.

References int16, m_dim, m_dummy, x, y, and vlTriple< int16 >::z().

vlOffset::vlOffset const int16  x,
const int16  y,
const int16  z,
const int16  t
[inline]
 

Definition at line 74 of file vloffset.h.

References int16, m_dim, m_dummy, m_offset, t(), x, y, and z.

vlOffset::~vlOffset  )  [inline]
 

Definition at line 82 of file vloffset.h.


Member Function Documentation

uint16 vlOffset::dim  )  const [inline]
 

Definition at line 138 of file vloffset.h.

References m_dim, and uint16.

Referenced by vlNeighborhood::add(), and vlOffset().

int16& vlOffset::operator[] const uint16  dim  )  [inline]
 

Definition at line 115 of file vloffset.h.

References int16, m_dim, m_dummy, m_offset, vlTriple< int16 >::m_x, vlTriple< int16 >::m_y, and vlTriple< int16 >::m_z.

int16 vlOffset::operator[] const uint16  dim  )  const [inline]
 

Definition at line 93 of file vloffset.h.

References int16, m_dim, m_offset, vlTriple< int16 >::m_x, vlTriple< int16 >::m_y, and vlTriple< int16 >::m_z.

int16 vlOffset::t  )  const [inline]
 

Also available via offset[3]

Definition at line 87 of file vloffset.h.

References int16, and m_offset.

Referenced by vlOffset().


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  os,
vlOffset const &  o
[friend]
 

Definition at line 146 of file vloffset.h.

std::ostream& operator<< std::ostream &  os,
vlOffset const *const  o
[friend]
 

Definition at line 141 of file vloffset.h.


Member Data Documentation

uint16 vlOffset::m_dim [private]
 

Definition at line 174 of file vloffset.h.

Referenced by dim(), operator[](), and vlOffset().

int16 vlOffset::m_dummy [private]
 

Definition at line 171 of file vloffset.h.

Referenced by operator[](), and vlOffset().

std::vector<int16> vlOffset::m_offset [private]
 

Definition at line 165 of file vloffset.h.

Referenced by operator[](), t(), and vlOffset().


The documentation for this class was generated from the following file:
Generated on Fri Mar 18 11:33:19 2005 for OpenVL by doxygen 1.3.3