29 template<
unsigned int VOffsetDimension >
54 template<
unsigned int VOffsetDimension = 2 >
62 itkStaticConstMacro(
Dimension,
unsigned int, VOffsetDimension);
80 for (
unsigned int i = 0; i < VOffsetDimension; i++ )
81 { result[i] =
m_Offset[i] + offset[i]; }
91 for (
unsigned int i = 0; i < VOffsetDimension; i++ )
92 { result[i] =
m_Offset[i] + size[i]; }
100 for (
unsigned int i = 0; i < VOffsetDimension; i++ )
110 for (
unsigned int i = 0; i < VOffsetDimension; i++ )
122 for (
unsigned int i = 0; i < VOffsetDimension; i++ )
131 for (
unsigned int i = 0; i < VOffsetDimension; i++ )
141 for (
unsigned int i = 0; i < VOffsetDimension; i++ )
153 for (
unsigned int i = 0; i < VOffsetDimension && same; i++ )
164 for (
unsigned int i = 0; i < VOffsetDimension && same; i++ )
191 val+VOffsetDimension,
203 {
for (
unsigned int i = 0; i < VOffsetDimension; ++i ) {
m_Offset[i] = value; } }
214 #if defined( ITK_WRAPPING_PARSER )
215 Offset() ITK_DELETE_FUNCTION;
217 void operator=(const
Self &) ITK_DELETE_FUNCTION;
232 template<
unsigned int VOffsetDimension >
233 class OffsetLexicographicCompare
239 for (
unsigned int i = 0; i < VOffsetDimension; ++i )
255 template<
unsigned int VOffsetDimension >
256 Offset< VOffsetDimension >
267 template<
unsigned int VOffsetDimension >
268 std::ostream & operator<<(std::ostream & os, const Offset< VOffsetDimension > & ind)
271 unsigned int dimlim = VOffsetDimension - 1;
272 for (
unsigned int i = 0; i < dimlim; ++i )
274 os << ind[i] <<
", ";
276 if ( VOffsetDimension >= 1 )
278 os << ind[VOffsetDimension - 1];
OffsetValueType m_Offset[VOffsetDimension]
Represent the offset between two n-dimensional indexes in a n-dimensional image.
const Self & operator-=(const Self &vec)
Represent the size (bounds) of a n-dimensional image.
signed long OffsetValueType
const Self operator+(const Size< VOffsetDimension > &size) const
const OffsetValueType * GetOffset() const
Order Offset instances lexicographically.
const Self & operator+=(const Self &vec)
bool operator==(const Self &vec) const
OffsetValueType operator[](unsigned int dim) const
bool operator()(Offset< VOffsetDimension > const &l, Offset< VOffsetDimension > const &r) const
static const unsigned int Dimension
void SetOffset(const OffsetValueType val[VOffsetDimension])
void Fill(OffsetValueType value)
static unsigned int GetOffsetDimension()
bool operator!=(const Self &vec) const
const Self operator-(const Self &vec)
Functor::OffsetLexicographicCompare< VOffsetDimension > LexicographicCompare
OffsetValueType & operator[](unsigned int dim)
const Self & operator-=(const Size< VOffsetDimension > &size)
itk::OffsetValueType OffsetValueType
Offset< VOffsetDimension > OffsetType
const Self & operator+=(const Size< VOffsetDimension > &size)
static Self GetBasisOffset(unsigned int dim)
const Self operator+(const Self &offset) const