#include <itkIndex.h>
Inheritance diagram for itk::Index:
Public Types | |
typedef Index | Self |
typedef Index< VIndexDimension > | IndexType |
typedef long | IndexValueType |
typedef Size< VIndexDimension > | SizeType |
typedef Offset< VIndexDimension > | OffsetType |
typedef OffsetType::OffsetValueType | OffsetValueType |
Public Methods | |
IndexValueType & | operator[] (unsigned int dim) |
IndexValueType | operator[] (unsigned int dim) const |
const IndexValueType * | GetIndex () const |
void | SetIndex (const IndexValueType val[VIndexDimension]) |
void | SetElement (unsigned long element, IndexValueType val) |
IndexValueType | GetElement (unsigned long element) |
void | Fill (IndexValueType value) |
const Self | operator+ (const SizeType &size) const |
const Self & | operator+= (const SizeType &size) |
const Self | operator+ (const OffsetType &offset) const |
const Self & | operator+= (const OffsetType &offset) |
const Self & | operator-= (const OffsetType &offset) |
const Self | operator- (const OffsetType &off) const |
const OffsetType | operator- (const Self &vec) |
const Self | operator * (const SizeType &vec) |
bool | operator== (const Self &vec) const |
bool | operator!= (const Self &vec) const |
Static Public Methods | |
unsigned int | GetIndexDimension () |
Self | GetBasisIndex (unsigned int dim) |
Public Attributes | |
IndexValueType | m_Index [VIndexDimension] |
Index is a templated class to represent a multi-dimensional index, i.e. (i,j,k,...). Index is templated over the dimension of the index. ITK assumes the first element of an index is the fastest moving index.
For efficiency sake, Index does not define a default constructor, a copy constructor, or an operator=. We rely on the compiler to provide efficient bitwise copies.
Index is an "aggregate" class. Its data is public (m_Index) allowing for fast and convenient instantiations/assignments.
The following syntax for assigning an index is allowed/suggested:
Index<3> index = {{5, 2, 7}};
The double braces {{ and }} are needed to prevent a compiler warning about a partly bracketed initializer.
Definition at line 62 of file itkIndex.h.
|
Compatible Index and value typedef Definition at line 68 of file itkIndex.h. |
|
Definition at line 69 of file itkIndex.h. Referenced by itk::Index< VSetDimension >::GetElement(). |
|
Compatible Offset and Offset value typedef. Definition at line 78 of file itkIndex.h. |
|
Definition at line 79 of file itkIndex.h. |
|
Standard class typedefs. Definition at line 65 of file itkIndex.h. |
|
Compatible Size typedef. Definition at line 75 of file itkIndex.h. |
|
Set one value for the index in all dimensions. Useful for initializing an offset to zero. Definition at line 236 of file itkIndex.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, ..., VIndexDimension-1. Definition at line 252 of file itkIndex.h. |
|
Gets the value of one of the elements in the index. This method is mainly intended to facilitate the access to elements from Tcl and Python where C++ notation is not very convenient.
Definition at line 226 of file itkIndex.h. |
|
Get the index. This provides a read only reference to the index.
Definition at line 202 of file itkIndex.h. Referenced by itk::ImageBase< ::itk::GetImageDimension< TImage >::ImageDimension >::ComputeOffset(). |
|
Get the dimension (size) of the index. Definition at line 72 of file itkIndex.h. |
|
Multiply an index by a size (elementwise product). This method models a random access Index. Definition at line 158 of file itkIndex.h. |
|
Compare two indices. Definition at line 180 of file itkIndex.h. |
|
Add an offset to an index. Definition at line 104 of file itkIndex.h. |
|
Add a size to an index. This method models a random access Index. Definition at line 83 of file itkIndex.h. |
|
Increment index by an offset. This method models a random access Index. Definition at line 115 of file itkIndex.h. |
|
Increment index by a size. This method models a random access Index. Definition at line 94 of file itkIndex.h. |
|
Subtract two indices. This method models a random access Index. Definition at line 146 of file itkIndex.h. |
|
Subtract an offset from an index. Definition at line 135 of file itkIndex.h. |
|
Decrement index by an offset. This method models a random access Index. Definition at line 125 of file itkIndex.h. |
|
Compare two indices. Definition at line 169 of file itkIndex.h. |
|
Access an element of the index. Elements are numbered 0, ..., VIndexDimension-1. This version can only be an rvalue. No bounds checking is performed. Definition at line 197 of file itkIndex.h. |
|
Access an element of the index. Elements are numbered 0, ..., VIndexDimension-1. No bounds checking is performed. Definition at line 191 of file itkIndex.h. |
|
Sets the value of one of the elements in the index. This method is mainly intended to facilitate the access to elements from Tcl and Python where C++ notation is not very convenient.
Definition at line 217 of file itkIndex.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 208 of file itkIndex.h. |
|
Index is an "aggregate" class. Its data is public (m_Index) allowing for fast and convienent instantiations/assignments. The following syntax for assigning an index is allowed/suggested: Index<3> index = {5, 2, 7}; Definition at line 244 of file itkIndex.h. Referenced by itk::Index< VSetDimension >::GetElement(), itk::Index< VSetDimension >::operator *(), itk::Index< VSetDimension >::operator+(), itk::Index< VSetDimension >::operator+=(), itk::Index< VSetDimension >::SetElement(), and itk::Index< VSetDimension >::SetIndex(). |