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++ )
228 #if defined( __GNUC__ )
229 #if ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ == 9 )
230 #pragma GCC diagnostic push
231 #pragma GCC diagnostic ignored "-Warray-bounds"
240 #if defined( __GNUC__ )
241 #if ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ == 9 )
242 #pragma GCC diagnostic pop
293 {
for (
unsigned int i = 0; i < VIndexDimension; ++i ) {
m_Index[i] = value; } }
303 template<
typename TCoordRep >
306 itkForLoopRoundingAndAssignmentMacro(
IndexType,
323 template<
typename TCoordRep >
326 for (
unsigned int i = 0; i < VIndexDimension; ++i )
335 #if defined( CABLE_CONFIGURATION )
338 void operator=(
const Self &);
353 template<
unsigned int VIndexDimension >
354 class IndexLexicographicCompare
360 for (
unsigned int i = 0; i < VIndexDimension; ++i )
376 template<
unsigned int VIndexDimension >
377 Index< VIndexDimension >
388 template<
unsigned int VIndexDimension >
389 std::ostream & operator<<(std::ostream & os, const Index< VIndexDimension > & ind)
392 for (
unsigned int i = 0; i + 1 < VIndexDimension; ++i )
394 os << ind[i] <<
", ";
396 if ( VIndexDimension >= 1 )
398 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