#include <itkSize.h>
Public Types | |
typedef Size | Self |
typedef Size< VDimension > | SizeType |
typedef unsigned long | SizeValueType |
Public Member Functions | |
SizeValueType & | operator[] (unsigned int dim) |
SizeValueType | operator[] (unsigned int dim) const |
const SizeValueType * | GetSize () const |
void | SetSize (const SizeValueType val[VDimension]) |
void | SetElement (unsigned long element, SizeValueType val) |
SizeValueType | GetElement (unsigned long element) const |
void | Fill (SizeValueType value) |
const Self | operator+ (const Self &vec) |
const Self & | operator+= (const Self &vec) |
const Self | operator- (const Self &vec) |
const Self & | operator-= (const Self &vec) |
const Self | operator * (const Self &vec) |
const Self & | operator *= (const Self &vec) |
bool | operator== (const Self &vec) const |
bool | operator!= (const Self &vec) const |
Static Public Member Functions | |
unsigned int | GetSizeDimension (void) |
Public Attributes | |
SizeValueType | m_Size [VDimension] |
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};
Definition at line 46 of file itkSize.h.
|
Standard class typedefs. |
|
Compatible Size and value typedef |
|
|
|
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::ImageRegion< itkGetStaticConstMacro(SpaceDimension)::ImageRegion(). |
|
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.
|
|
Get the size. This provides a read only reference to the size.
|
|
Get the dimension of the size object. |
|
Multiply two sizes (elementwise product). |
|
Multiply two sizes (elementwise product). |
|
Compare two sizes. |
|
Add two sizes. |
|
Increment size by a size. |
|
Subtract two sizes. |
|
Decrement size by a size. |
|
Compare two sizes. |
|
Access an element of the size. Elements are numbered 0, ..., VDimension-1. This version can only be an rvalue. No bounds checking is performed. |
|
Access an element of the size. Elements are numbered 0, ..., VDimension-1. No bounds checking is performed. |
|
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.
|
|
Set the size. Try to prototype this function so that val has to point to a block of memory that is the appropriate size.
|
|
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: Size<3> size = {{256, 256, 20}}; The doubled braces {{ and }} are required to prevent `gcc -Wall' (and perhaps other compilers) from complaining about a partly bracketed initializer. Definition at line 197 of file itkSize.h. Referenced by itk::Size< VSpaceDimension >::operator+(). |