#include <itkOffset.h>
Public Types | |
typedef Offset | Self |
typedef Offset< VOffsetDimension > | OffsetType |
typedef long | OffsetValueType |
Public Member Functions | |
OffsetValueType & | operator[] (unsigned int dim) |
OffsetValueType | operator[] (unsigned int dim) const |
const OffsetValueType * | GetOffset () const |
void | SetOffset (const OffsetValueType val[VOffsetDimension]) |
void | Fill (OffsetValueType value) |
const Self | operator+ (const Self &offset) const |
const Self | operator+ (const Size< VOffsetDimension > &size) const |
const Self & | operator+= (const Size< VOffsetDimension > &size) |
const Self & | operator-= (const Size< VOffsetDimension > &size) |
const Self | operator- (const Self &vec) |
const Self & | operator+= (const Self &vec) |
const Self & | operator-= (const Self &vec) |
bool | operator== (const Self &vec) const |
bool | operator!= (const Self &vec) const |
Static Public Member Functions | |
unsigned int | GetOffsetDimension () |
Self | GetBasisOffset (unsigned int dim) |
Public Attributes | |
OffsetValueType | m_Offset [VOffsetDimension] |
Offset is a templated class to represent a multi-dimensional offset, i.e. (i,j,k,...). Offset is templated over the dimension of the space.
For the sake of efficiency, Offset does not define a default constructor, a copy constructor, or an operator=. We rely on the compiler to provide efficient bitwise copies.
Definition at line 48 of file itkOffset.h.
|
Compatible offset typedefs. Definition at line 57 of file itkOffset.h. |
|
Definition at line 58 of file itkOffset.h. |
|
Standard class typedefs. Definition at line 51 of file itkOffset.h. Referenced by itk::Offset< VOffsetDimension >::operator+(), itk::Offset< VOffsetDimension >::operator-=(), and itk::Offset< VOffsetDimension >::operator==(). |
|
Set one value for the offset in all dimensions. Useful for initializing an offset to zero. Definition at line 184 of file itkOffset.h. |
|
Return a basis vector of the form [0, ..., 0, 1, 0, ... 0] where the "1" is positioned in the location specified by the parameter "dim". Valid values of "dim" are 0, ..., VOffsetDimension-1. Definition at line 200 of file itkOffset.h. |
|
Get the index. This provides a read only reference to the index.
Definition at line 168 of file itkOffset.h. |
|
Get the dimension (size) of the index. Definition at line 54 of file itkOffset.h. |
|
Compare two offsets. Definition at line 146 of file itkOffset.h. |
|
Add a size to an offset. Definition at line 73 of file itkOffset.h. References itk::Offset< VOffsetDimension >::m_Offset, and itk::Offset< VOffsetDimension >::Self. |
|
Add an offset to an offset. Definition at line 62 of file itkOffset.h. References itk::Offset< VOffsetDimension >::m_Offset, and itk::Offset< VOffsetDimension >::Self. |
|
Increment offset by an offset. Definition at line 115 of file itkOffset.h. |
|
Increment index by a size. Definition at line 84 of file itkOffset.h. References itk::Offset< VOffsetDimension >::m_Offset. |
|
Subtract two offsets. Definition at line 104 of file itkOffset.h. References itk::Offset< VOffsetDimension >::m_Offset. |
|
Decrement offset by an offset. Definition at line 125 of file itkOffset.h. References itk::Offset< VOffsetDimension >::m_Offset, and itk::Offset< VOffsetDimension >::Self. |
|
Decrement index by a size. Definition at line 94 of file itkOffset.h. References itk::Offset< VOffsetDimension >::m_Offset. |
|
Compare two offsets. Definition at line 135 of file itkOffset.h. References itk::Offset< VOffsetDimension >::m_Offset, and itk::Offset< VOffsetDimension >::Self. |
|
Access an element of the index. Elements are numbered 0, ..., VOffsetDimension-1. This version can only be an rvalue. No bounds checking is performed. Definition at line 163 of file itkOffset.h. |
|
Access an element of the offset. Elements are numbered 0, ..., VOffsetDimension-1. No bounds checking is performed. Definition at line 157 of file itkOffset.h. |
|
Set the index. Try to prototype this function so that val has to point to a block of memory that is the appropriate size.
Definition at line 174 of file itkOffset.h. |
|
Offset is an "aggregate" class. Its data is public (m_Offset) allowing for fast and convienent instantiations/assignments. The following syntax for assigning an index is allowed/suggested: Offset<3> index = {5, 2, 7}; Definition at line 192 of file itkOffset.h. Referenced by itk::Offset< VOffsetDimension >::operator+(), itk::Offset< VOffsetDimension >::operator+=(), itk::Offset< VOffsetDimension >::operator-(), itk::Offset< VOffsetDimension >::operator-=(), itk::Index< VSetDimension >::operator-=(), and itk::Offset< VOffsetDimension >::operator==(). |