Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::Size< VDimension > Class Template Reference
[Image Representation Objects]

#include <itkSize.h>

Inheritance diagram for itk::Size< VDimension >:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<unsigned int VDimension = 2>
class itk::Size< VDimension >

Represent the size (bounds) of a n-dimensional image.

Size is a class to represent multi-dimensional array bounds, templated over the dimension. Insight assumes that the first element of Size is the fastest moving index.

For the sake of efficiency, Size does not define a default constructor, a copy constructor, or an operator=. We rely on the compiler to provide efficient bitwise copies.

Size is an "aggregate" class. Its data is public (m_Size) allowing for fast and convienent instantiations/assignments.

The following syntax for assigning a size is allowed/suggested: Size<3> size = {256, 256, 20};

See also:
Index

Definition at line 46 of file itkSize.h.

Public Types

typedef Size Self
typedef Size< VDimension > SizeType
typedef unsigned long SizeValueType

Public Member Functions

void Fill (SizeValueType value)
SizeValueType GetElement (unsigned long element) const
Add two sizes *const Self operator+ (const Self &vec)
Increment size by a size
*const Self
operator+= (const Self &vec)
Subtract two sizes *const Self operator- (const Self &vec)
Decrement size by a size
*const Self
operator-= (const Self &vec)
Size is an aggregate class
Its data is 
public (m_Size)*allowing for fast and convenient instantiations/assignments.**The following syntax for assigning a size is allowed/suggested
void SetElement (unsigned long element, SizeValueType val)
void SetSize (const SizeValueType val[VDimension])
Multiply two sizes (elementwise product).*/const Self &operator *
Multiply two sizes (elementwise product).*/const Self operator *(const Self &vec)

Static Public Member Functions

static unsigned int GetSizeDimension (void)


Member Typedef Documentation

template<unsigned int VDimension = 2>
typedef Size itk::Size< VDimension >::Self
 

Standard class typedefs.

Definition at line 49 of file itkSize.h.

template<unsigned int VDimension = 2>
typedef Size<VDimension> itk::Size< VDimension >::SizeType
 

Compatible Size and value typedef

Definition at line 52 of file itkSize.h.

template<unsigned int VDimension = 2>
typedef unsigned long itk::Size< VDimension >::SizeValueType
 

Definition at line 53 of file itkSize.h.


Member Function Documentation

template<unsigned int VDimension = 2>
void itk::Size< VDimension >::Fill SizeValueType  value  )  [inline]
 

Set one value for the index in all dimensions. Useful for initializing an offset to zero.

Definition at line 184 of file itkSize.h.

Referenced by itk::Neighborhood< TImage::InternalPixelType *,::itk::GetImageDimension< TImage >::ImageDimension >::Neighborhood().

template<unsigned int VDimension = 2>
SizeValueType itk::Size< VDimension >::GetElement unsigned long  element  )  const [inline]
 

Get an element of the Size. gets the value of one of the elements in the size This method is mainly intended to facilitate the access to elements from Tcl and Python where C++ notation is not very convenient.

Warning:
No bound checking is performed
See also:
GetSize()

SetElement()

Definition at line 179 of file itkSize.h.

template<unsigned int VDimension = 2>
static unsigned int itk::Size< VDimension >::GetSizeDimension void   )  [inline, static]
 

Get the dimension of the size object.

Definition at line 56 of file itkSize.h.

template<unsigned int VDimension = 2>
Add two sizes* const Self itk::Size< VDimension >::operator+ const Self vec  )  [inline]
 

Definition at line 60 of file itkSize.h.

template<unsigned int VDimension = 2>
Increment size by a size* const Self& itk::Size< VDimension >::operator+= const Self vec  )  [inline]
 

Definition at line 71 of file itkSize.h.

template<unsigned int VDimension = 2>
Subtract two sizes* const Self itk::Size< VDimension >::operator- const Self vec  )  [inline]
 

Definition at line 81 of file itkSize.h.

template<unsigned int VDimension = 2>
Decrement size by a size* const Self& itk::Size< VDimension >::operator-= const Self vec  )  [inline]
 

Definition at line 92 of file itkSize.h.

template<unsigned int VDimension = 2>
Size is an aggregate class Its data is itk::Size< VDimension >::public m_Size< VDimension >   )  [inline]
 

Definition at line 187 of file itkSize.h.

template<unsigned int VDimension = 2>
void itk::Size< VDimension >::SetElement unsigned long  element,
SizeValueType  val
[inline]
 

Set an element of the Size. sets the value of one of the elements in the Size This method is mainly intended to facilitate the access to elements from Tcl and Python where C++ notation is not very convenient.

Warning:
No bound checking is performed.
See also:
SetSize()

GetElement()

Definition at line 170 of file itkSize.h.

template<unsigned int VDimension = 2>
void itk::Size< VDimension >::SetSize const SizeValueType  val[VDimension]  )  [inline]
 

Set the size. Try to prototype this function so that val has to point to a block of memory that is the appropriate size.

See also:
GetSize

Definition at line 161 of file itkSize.h.

template<unsigned int VDimension = 2>
Multiply two itk::Size< VDimension >::sizes elementwise  product  )  const
 

template<unsigned int VDimension = 2>
Multiply two itk::Size< VDimension >::sizes elementwise  product  )  const [inline]
 

Definition at line 100 of file itkSize.h.


The documentation for this class was generated from the following file:
Generated at Sun Jul 9 21:29:38 2006 for ITK by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2000