![]() |
Orfeo Toolbox
3.16
|
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 long | OffsetValueType |
| typedef Offset | Self |
Public Member Functions | |
| void | Fill (OffsetValueType value) |
| const OffsetValueType * | GetOffset () const |
| bool | operator!= (const Self &vec) const |
| 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 Self &vec) |
| const Self | operator- (const Self &vec) |
| const Self & | operator-= (const Size< VOffsetDimension > &size) |
| const Self & | operator-= (const Self &vec) |
| bool | operator== (const Self &vec) const |
| OffsetValueType & | operator[] (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] |
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.
Definition at line 59 of file itkOffset.h.
| typedef Functor::OffsetLexicographicCompare<VOffsetDimension> itk::Offset< VOffsetDimension >::LexicographicCompare |
Lexicographic ordering functor type.
Definition at line 72 of file itkOffset.h.
| typedef Offset<VOffsetDimension> itk::Offset< VOffsetDimension >::OffsetType |
Compatible offset typedefs.
Definition at line 68 of file itkOffset.h.
| typedef long itk::Offset< VOffsetDimension >::OffsetValueType |
Definition at line 69 of file itkOffset.h.
| typedef Offset itk::Offset< VOffsetDimension >::Self |
Standard class typedefs.
Definition at line 62 of file itkOffset.h.
|
inline |
Set one value for the offset in all dimensions. Useful for initializing an offset to zero.
Definition at line 189 of file itkOffset.h.
Referenced by itk::Statistics::ImageToCooccurrenceListAdaptor< TImage >::Compute(), itk::BinaryCrossStructuringElement< TPixel, VDimension, TAllocator >::CreateStructuringElement(), itk::FlatStructuringElement< VDimension >::Cross(), and otb::LineDetectorImageFilterBase< TInputImage, TOutputImage, TOutputImageDirection, TInterpolator >::ThreadedGenerateData().
|
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 245 of file itkOffset.h.
References itk::Offset< VOffsetDimension >::m_Offset.
|
inline |
Get the index. This provides a read only reference to the index.
Definition at line 173 of file itkOffset.h.
Referenced by itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::ConstIterator::GetNeighborhoodOffset().
|
inlinestatic |
Get the dimension (size) of the index.
Definition at line 65 of file itkOffset.h.
|
inline |
Compare two offsets.
Definition at line 152 of file itkOffset.h.
|
inline |
Add an offset to an offset.
Definition at line 76 of file itkOffset.h.
|
inline |
Add a size to an offset.
Definition at line 86 of file itkOffset.h.
|
inline |
Increment index by a size.
Definition at line 96 of file itkOffset.h.
|
inline |
Increment offset by an offset.
Definition at line 124 of file itkOffset.h.
|
inline |
Subtract two offsets.
Definition at line 114 of file itkOffset.h.
|
inline |
Decrement index by a size.
Definition at line 105 of file itkOffset.h.
|
inline |
Decrement offset by an offset.
Definition at line 133 of file itkOffset.h.
|
inline |
Compare two offsets.
Definition at line 142 of file itkOffset.h.
|
inline |
Access an element of the offset. Elements are numbered 0, ..., VOffsetDimension-1. No bounds checking is performed.
Definition at line 162 of file itkOffset.h.
|
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 168 of file itkOffset.h.
|
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.
Definition at line 179 of file itkOffset.h.
| OffsetValueType itk::Offset< VOffsetDimension >::m_Offset[VOffsetDimension] |
Offset is an "aggregate" class. Its data is public (m_Offset) allowing for fast and convenient instantiations/assignments.
The following syntax for assigning an index is allowed/suggested: Offset<3> index = {5, 2, 7};
Definition at line 197 of file itkOffset.h.
Referenced by itk::Offset< VDimension >::Fill(), itk::Offset< VOffsetDimension >::GetBasisOffset(), itk::Offset< VDimension >::GetOffset(), itk::Offset< VDimension >::operator!=(), itk::Functor::OffsetLexicographicCompare< VOffsetDimension >::operator()(), itk::Offset< VDimension >::operator+(), itk::Offset< VDimension >::operator+=(), itk::Offset< VDimension >::operator-(), itk::Index< itkGetStaticConstMacro(Dimension)>::operator-(), itk::Offset< VDimension >::operator-=(), itk::Offset< VDimension >::operator==(), itk::Offset< VDimension >::operator[](), and itk::Offset< VDimension >::SetOffset().