51 template<
unsigned int VDimension = 2 >
63 itkStaticConstMacro(
Dimension,
unsigned int, VDimension);
74 for (
unsigned int i = 0; i < VDimension; i++ )
83 for (
unsigned int i = 0; i < VDimension; i++ )
95 for (
unsigned int i = 0; i < VDimension; i++ )
104 for (
unsigned int i = 0; i < VDimension; i++ )
116 for (
unsigned int i = 0; i < VDimension; i++ )
125 for (
unsigned int i = 0; i < VDimension; i++ )
137 for (
unsigned int i = 0; i < VDimension && same; i++ )
148 for (
unsigned int i = 0; i < VDimension && same; i++ )
185 {
m_Size[element] = val; }
194 {
return m_Size[element]; }
199 {
for (
unsigned int i = 0; i < VDimension; ++i ) {
m_Size[i] = value; } }
214 #if defined( ITK_WRAPPING_PARSER )
221 void operator=(
const Self&);
225 template<
unsigned int VDimension >
226 std::ostream & operator<<(std::ostream & os, const Size< VDimension > & size)
229 for (
unsigned int i = 0; i + 1 < VDimension; ++i )
231 os << size[i] <<
", ";
233 if ( VDimension >= 1 )
235 os << size[VDimension - 1];
const Self operator+(const Self &vec) const
itk::SizeValueType SizeValueType
Represent the size (bounds) of a n-dimensional image.
Size< VDimension > SizeType
const Self & operator+=(const Self &vec)
SizeValueType & operator[](unsigned int dim)
const Self & operator-=(const Self &vec)
const Self & operator*=(const Self &vec)
unsigned long SizeValueType
void SetSize(const SizeValueType val[VDimension])
const Self operator-(const Self &vec) const
bool operator==(const Self &vec) const
bool operator!=(const Self &vec) const
SizeValueType operator[](unsigned int dim) const
SizeValueType m_Size[VDimension]
SizeValueType GetElement(unsigned long element) const
void SetElement(unsigned long element, SizeValueType val)
const Self operator*(const Self &vec) const
void Fill(SizeValueType value)
const SizeValueType * GetSize() const
static const unsigned int Dimension
static unsigned int GetSizeDimension(void)