31 template<
unsigned int VIndexDimension >
70 template<
unsigned int VIndexDimension = 2 >
82 itkStaticConstMacro(
Dimension,
unsigned int, VIndexDimension);
103 for (
unsigned int i = 0; i < VIndexDimension; i++ )
112 for (
unsigned int i = 0; i < VIndexDimension; i++ )
125 for (
unsigned int i = 0; i < VIndexDimension; i++ )
134 for (
unsigned int i = 0; i < VIndexDimension; i++ )
146 for (
unsigned int i = 0; i < VIndexDimension; i++ )
147 { result[i] =
m_Index[i] + offset[i]; }
155 for (
unsigned int i = 0; i < VIndexDimension; i++ )
165 for (
unsigned int i = 0; i < VIndexDimension; i++ )
177 for (
unsigned int i = 0; i < VIndexDimension; i++ )
188 for (
unsigned int i = 0; i < VIndexDimension; i++ )
200 for (
unsigned int i = 0; i < VIndexDimension; i++ )
211 for (
unsigned int i = 0; i < VIndexDimension && same; i++ )
222 for (
unsigned int i = 0; i < VIndexDimension && same; i++ )
279 {
for (
unsigned int i = 0; i < VIndexDimension; ++i ) {
m_Index[i] = value; } }
289 template<
typename TCoordRep >
292 itkForLoopRoundingAndAssignmentMacro(
IndexType,
309 template<
typename TCoordRep >
312 for (
unsigned int i = 0; i < VIndexDimension; ++i )
321 #if defined( CABLE_CONFIGURATION )
324 void operator=(
const Self &);
339 template<
unsigned int VIndexDimension >
340 class IndexLexicographicCompare
346 for (
unsigned int i = 0; i < VIndexDimension; ++i )
362 template<
unsigned int VIndexDimension >
363 Index< VIndexDimension >
374 template<
unsigned int VIndexDimension >
375 std::ostream & operator<<(std::ostream & os, const Index< VIndexDimension > & ind)
378 for (
unsigned int i = 0; i + 1 < VIndexDimension; ++i )
380 os << ind[i] <<
", ";
382 if ( VIndexDimension >= 1 )
384 os << ind[VIndexDimension - 1];
bool operator()(Index< VIndexDimension > const &l, Index< VIndexDimension > const &r) const
const IndexValueType * GetIndex() const
OffsetValueType m_Offset[VOffsetDimension]
const Self & operator-=(const OffsetType &offset)
const Self operator-(const OffsetType &off) const
IndexValueType & operator[](unsigned int dim)
Represent the offset between two n-dimensional indexes in a n-dimensional image.
bool operator!=(const Self &vec) const
IndexValueType m_Index[VIndexDimension]
Represent the size (bounds) of a n-dimensional image.
Size< VIndexDimension > SizeType
signed long OffsetValueType
signed long IndexValueType
const OffsetType operator-(const Self &vec) const
Order Index instances lexicographically.
Index< VIndexDimension > IndexType
Offset< VIndexDimension > OffsetType
void CopyWithRound(const FixedArray< TCoordRep, VIndexDimension > &point)
Simulate a standard C array with copy semnatics.
static Self GetBasisIndex(unsigned int dim)
::itk::IndexValueType IndexValueType
const Self & operator+=(const OffsetType &offset)
bool operator==(const Self &vec) const
static unsigned int GetIndexDimension()
void Fill(IndexValueType value)
const Self operator*(const SizeType &vec) const
SizeValueType m_Size[VDimension]
const Self operator+(const SizeType &size) const
const Self operator+(const OffsetType &offset) const
void CopyWithCast(const FixedArray< TCoordRep, VIndexDimension > &point)
static const unsigned int Dimension
const Self operator-(const SizeType &size) const
const Self & operator-=(const SizeType &size)
Functor::IndexLexicographicCompare< VIndexDimension > LexicographicCompare
void SetElement(unsigned long element, IndexValueType val)
const Self & operator+=(const SizeType &size)
IndexValueType GetElement(unsigned long element) const
Represent a n-dimensional index in a n-dimensional image.
::itk::OffsetValueType OffsetValueType
void SetIndex(const IndexValueType val[VIndexDimension])
IndexValueType operator[](unsigned int dim) const