Orfeo Toolbox  4.0
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
itk::Offset< VOffsetDimension > Class Template Reference

Represent the offset between two n-dimensional indexes in a n-dimensional image. More...

#include <itkOffset.h>

+ Inheritance diagram for itk::Offset< VOffsetDimension >:

Public Types

typedef
Functor::OffsetLexicographicCompare
< VOffsetDimension > 
LexicographicCompare
 
typedef Offset< VOffsetDimension > OffsetType
 
typedef itk::OffsetValueType OffsetValueType
 
typedef Offset Self
 

Public Member Functions

void Fill (OffsetValueType value)
 
const OffsetValueTypeGetOffset () const
 
bool operator!= (const Self &vec) const
 
const Self operator+ (const Self &offset) const
 
const Self operator+ (const Size< VOffsetDimension > &size) const
 
const Selfoperator+= (const Size< VOffsetDimension > &size)
 
const Selfoperator+= (const Self &vec)
 
const Self operator- (const Self &vec)
 
const Selfoperator-= (const Size< VOffsetDimension > &size)
 
const Selfoperator-= (const Self &vec)
 
bool operator== (const Self &vec) const
 
OffsetValueTypeoperator[] (unsigned int dim)
 
OffsetValueType operator[] (unsigned int dim) const
 
void SetOffset (const OffsetValueType val[VOffsetDimension])
 

Static Public Member Functions

static Self GetBasisOffset (unsigned int dim)
 
static unsigned int GetOffsetDimension ()
 

Public Attributes

OffsetValueType m_Offset [VOffsetDimension]
 

Static Public Attributes

static const unsigned int Dimension = VOffsetDimension
 

Detailed Description

template<unsigned int VOffsetDimension = 2>
class itk::Offset< VOffsetDimension >

Represent the offset between two n-dimensional indexes in a n-dimensional image.

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.

See Also
Index

{SimpleOperations/Offset,Add an offset to a pixel index}

Definition at line 55 of file itkOffset.h.

Member Typedef Documentation

template<unsigned int VOffsetDimension = 2>
typedef Functor::OffsetLexicographicCompare< VOffsetDimension > itk::Offset< VOffsetDimension >::LexicographicCompare

Lexicographic ordering functor type.

Definition at line 72 of file itkOffset.h.

template<unsigned int VOffsetDimension = 2>
typedef Offset< VOffsetDimension > itk::Offset< VOffsetDimension >::OffsetType

Compatible offset typedefs.

Definition at line 68 of file itkOffset.h.

template<unsigned int VOffsetDimension = 2>
typedef itk::OffsetValueType itk::Offset< VOffsetDimension >::OffsetValueType

Definition at line 69 of file itkOffset.h.

template<unsigned int VOffsetDimension = 2>
typedef Offset itk::Offset< VOffsetDimension >::Self

Standard class typedefs.

Definition at line 59 of file itkOffset.h.

Member Function Documentation

template<unsigned int VOffsetDimension = 2>
void itk::Offset< VOffsetDimension >::Fill ( OffsetValueType  value)
inline

Set one value for the offset in all dimensions. Useful for initializing an offset to zero.

Definition at line 198 of file itkOffset.h.

Referenced by itk::UpdateMalcolmSparseLevelSet< VDimension, TEquationContainer >::CompactLayersToSinglePixelThickness(), otb::Functor::ShapeAttributesLabelObjectFunctor< TLabelObject, TLabelImage >::ComputePerimeter(), itk::UpdateShiSparseLevelSet< VDimension, TEquationContainer >::Con(), itk::FlatStructuringElement< VDimension >::Cross(), itk::UpdateMalcolmSparseLevelSet< VDimension, TEquationContainer >::EvolveWithPhasedPropagation(), itk::UpdateMalcolmSparseLevelSet< VDimension, TEquationContainer >::EvolveWithUnPhasedPropagation(), itk::Statistics::ScalarImageToCooccurrenceListSampleFilter< TImage >::GenerateData(), itk::MakeChainCodeTracePath(), itk::UpdateWhitakerSparseLevelSet< VDimension, TLevelSetValueType, TEquationContainer >::MovePointFromMinus1(), itk::UpdateWhitakerSparseLevelSet< VDimension, TLevelSetValueType, TEquationContainer >::MovePointFromPlus1(), otb::Functor::ShapeAttributesLabelObjectFunctor< TLabelObject, TLabelImage >::PerimeterFromInterceptCount(), otb::LineDetectorImageFilterBase< TInputImage, TOutputImage, TOutputImageDirection, TInterpolator >::ThreadedGenerateData(), itk::UpdateShiSparseLevelSet< VDimension, TEquationContainer >::Update(), itk::UpdateWhitakerSparseLevelSet< VDimension, TLevelSetValueType, TEquationContainer >::Update(), itk::UpdateWhitakerSparseLevelSet< VDimension, TLevelSetValueType, TEquationContainer >::UpdateLayerMinus1(), itk::UpdateWhitakerSparseLevelSet< VDimension, TLevelSetValueType, TEquationContainer >::UpdateLayerMinus2(), itk::UpdateShiSparseLevelSet< VDimension, TEquationContainer >::UpdateLayerMinusOne(), itk::UpdateWhitakerSparseLevelSet< VDimension, TLevelSetValueType, TEquationContainer >::UpdateLayerPlus1(), itk::UpdateWhitakerSparseLevelSet< VDimension, TLevelSetValueType, TEquationContainer >::UpdateLayerPlus2(), itk::UpdateShiSparseLevelSet< VDimension, TEquationContainer >::UpdateLayerPlusOne(), and itk::UpdateWhitakerSparseLevelSet< VDimension, TLevelSetValueType, TEquationContainer >::UpdateLayerZero().

template<unsigned int VOffsetDimension>
Offset< VOffsetDimension > itk::Offset< VOffsetDimension >::GetBasisOffset ( unsigned int  dim)
static

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 254 of file itkOffset.h.

References itk::Offset< VOffsetDimension >::m_Offset.

template<unsigned int VOffsetDimension = 2>
const OffsetValueType* itk::Offset< VOffsetDimension >::GetOffset ( ) const
inline

Get the index. This provides a read only reference to the index.

See Also
SetOffset()

Definition at line 178 of file itkOffset.h.

template<unsigned int VOffsetDimension = 2>
static unsigned int itk::Offset< VOffsetDimension >::GetOffsetDimension ( )
inlinestatic
template<unsigned int VOffsetDimension = 2>
bool itk::Offset< VOffsetDimension >::operator!= ( const Self vec) const
inline

Compare two offsets.

Definition at line 156 of file itkOffset.h.

template<unsigned int VOffsetDimension = 2>
const Self itk::Offset< VOffsetDimension >::operator+ ( const Self offset) const
inline

Add an offset to an offset.

Definition at line 76 of file itkOffset.h.

template<unsigned int VOffsetDimension = 2>
const Self itk::Offset< VOffsetDimension >::operator+ ( const Size< VOffsetDimension > &  size) const
inline

Add a size to an offset.

Definition at line 87 of file itkOffset.h.

template<unsigned int VOffsetDimension = 2>
const Self& itk::Offset< VOffsetDimension >::operator+= ( const Size< VOffsetDimension > &  size)
inline

Increment index by a size.

Definition at line 98 of file itkOffset.h.

template<unsigned int VOffsetDimension = 2>
const Self& itk::Offset< VOffsetDimension >::operator+= ( const Self vec)
inline

Increment offset by an offset.

Definition at line 127 of file itkOffset.h.

template<unsigned int VOffsetDimension = 2>
const Self itk::Offset< VOffsetDimension >::operator- ( const Self vec)
inline

Subtract two offsets.

Definition at line 116 of file itkOffset.h.

template<unsigned int VOffsetDimension = 2>
const Self& itk::Offset< VOffsetDimension >::operator-= ( const Size< VOffsetDimension > &  size)
inline

Decrement index by a size.

Definition at line 107 of file itkOffset.h.

template<unsigned int VOffsetDimension = 2>
const Self& itk::Offset< VOffsetDimension >::operator-= ( const Self vec)
inline

Decrement offset by an offset.

Definition at line 136 of file itkOffset.h.

template<unsigned int VOffsetDimension = 2>
bool itk::Offset< VOffsetDimension >::operator== ( const Self vec) const
inline

Compare two offsets.

Definition at line 145 of file itkOffset.h.

template<unsigned int VOffsetDimension = 2>
OffsetValueType& itk::Offset< VOffsetDimension >::operator[] ( unsigned int  dim)
inline

Access an element of the offset. Elements are numbered 0, ..., VOffsetDimension-1. No bounds checking is performed.

Definition at line 167 of file itkOffset.h.

template<unsigned int VOffsetDimension = 2>
OffsetValueType itk::Offset< VOffsetDimension >::operator[] ( unsigned int  dim) const
inline

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 173 of file itkOffset.h.

template<unsigned int VOffsetDimension = 2>
void itk::Offset< VOffsetDimension >::SetOffset ( const OffsetValueType  val[VOffsetDimension])
inline

Set the index. Try to prototype this function so that val has to point to a block of memory that is the appropriate size.

See Also
GetOffset()

Definition at line 184 of file itkOffset.h.

Member Data Documentation

template<unsigned int VOffsetDimension = 2>
const unsigned int itk::Offset< VOffsetDimension >::Dimension = VOffsetDimension
static

Dimension constant

Definition at line 62 of file itkOffset.h.

template<unsigned int VOffsetDimension = 2>
OffsetValueType itk::Offset< VOffsetDimension >::m_Offset[VOffsetDimension]

The documentation for this class was generated from the following file:

Generated at Sat Mar 8 2014 17:33:21 for Orfeo Toolbox with doxygen 1.8.3.1