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; } }
212 #if defined( ITK_WRAPPING_PARSER )
219 void operator=(
const Self&);
233 template<
unsigned int VOffsetDimension >
234 class OffsetLexicographicCompare
240 for (
unsigned int i = 0; i < VOffsetDimension; ++i )
256 template<
unsigned int VOffsetDimension >
257 Offset< VOffsetDimension >
268 template<
unsigned int VOffsetDimension >
269 std::ostream & operator<<(std::ostream & os, const Offset< VOffsetDimension > & ind)
272 unsigned int dimlim = VOffsetDimension - 1;
273 for (
unsigned int i = 0; i < dimlim; ++i )
275 os << ind[i] <<
", ";
277 if ( VOffsetDimension >= 1 )
279 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