ITK
4.8.0
Insight Segmentation and Registration Toolkit
|
#include <itkSize.h>
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 convenient instantiations/assignments.
The following syntax for assigning a size is allowed/suggested: Size<3> size = {256, 256, 20};
Public Types | |
typedef Size | Self |
typedef Size< VDimension > | SizeType |
typedef itk::SizeValueType | SizeValueType |
Public Member Functions | |
void | Fill (SizeValueType value) |
SizeValueType | GetElement (unsigned long element) const |
const SizeValueType * | GetSize () const |
bool | operator!= (const Self &vec) const |
const Self | operator* (const Self &vec) const |
const Self | operator+ (const Self &vec) const |
const Self | operator- (const Self &vec) const |
bool | operator== (const Self &vec) const |
SizeValueType & | operator[] (unsigned int dim) |
SizeValueType | operator[] (unsigned int dim) const |
void | SetElement (unsigned long element, SizeValueType val) |
void | SetSize (const SizeValueType val[VDimension]) |
const Self & | operator+= (const Self &vec) |
const Self & | operator-= (const Self &vec) |
const Self & | operator*= (const Self &vec) |
Static Public Member Functions | |
static unsigned int | GetSizeDimension (void) |
Public Attributes | |
SizeValueType | m_Size [VDimension] |
Static Public Attributes | |
static const unsigned int | Dimension = VDimension |
typedef itk::SizeValueType itk::Size< VDimension >::SizeValueType |
|
inline |
Set one value for the index in all dimensions. Useful for initializing an offset to zero.
Definition at line 198 of file itkSize.h.
Referenced by itk::ImageIORegionAdaptor< VDimension >::Convert().
|
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.
|
inline |
|
inlinestatic |
|
inline |
|
inline |
|
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.
|
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.
Definition at line 171 of file itkSize.h.
Referenced by itk::ImageRegionSplitter< VImageDimension >::GetNumberOfSplitsInternal(), and itk::ImageRegionSplitter< VImageDimension >::GetSplitInternal().
|
static |
SizeValueType itk::Size< VDimension >::m_Size[VDimension] |
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 211 of file itkSize.h.
Referenced by itk::Size< itkGetStaticConstMacro(ImageDimension) >::Fill(), itk::Size< itkGetStaticConstMacro(ImageDimension) >::GetElement(), itk::Size< itkGetStaticConstMacro(ImageDimension) >::GetSize(), itk::Size< itkGetStaticConstMacro(ImageDimension) >::operator!=(), itk::Size< itkGetStaticConstMacro(ImageDimension) >::operator*(), itk::Index< itkGetStaticConstMacro(ImageDimension) >::operator*(), itk::Size< itkGetStaticConstMacro(ImageDimension) >::operator*=(), itk::Size< itkGetStaticConstMacro(ImageDimension) >::operator+(), itk::Size< itkGetStaticConstMacro(ImageDimension) >::operator+=(), itk::Size< itkGetStaticConstMacro(ImageDimension) >::operator-(), itk::Size< itkGetStaticConstMacro(ImageDimension) >::operator-=(), itk::Size< itkGetStaticConstMacro(ImageDimension) >::operator==(), itk::Size< itkGetStaticConstMacro(ImageDimension) >::operator[](), itk::Size< itkGetStaticConstMacro(ImageDimension) >::SetElement(), and itk::Size< itkGetStaticConstMacro(ImageDimension) >::SetSize().