ITK
5.2.0
Insight Toolkit
|
#include <itkSize.h>
Public Types | |
using | Self = Size |
using | SizeType = Size< VDimension > |
using | SizeValueType = ::itk::SizeValueType |
Public Member Functions | |
const Self | operator+ (const Self &vec) const |
Static Public Member Functions | |
static constexpr unsigned int | GetSizeDimension () |
Represent a n-dimensional size (bounds) of a n-dimensional image.
Size is a templated class to represent multi-dimensional array bounds, i.e. (I,J,K,...). Size is templated over teh dimension of the bounds. ITK assumes the first element of a size (bounds) is the fastest moving index.
For 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_InternalArray) allowing for fast and convenient instantiations/assignments.
The following syntax for assigning an aggregate type like this is allowed/suggested:
Size<3> var{{ 256, 256, 20 }}; // Also prevent narrowing conversions Size<3> var = {{ 256, 256, 20 }};
The doubled braces {{ and }} are required to prevent ‘gcc -Wall’ (and perhaps other compilers) from complaining about a partly bracketed initializer.
As an aggregate type that is intended to provide highest performance characteristics, this class is not appropriate to inherit from, so setting this struct as final.
using itk::Size< VDimension >::const_iterator = const value_type * |
using itk::Size< VDimension >::const_reference = const value_type & |
using itk::Size< VDimension >::const_reverse_iterator = std::reverse_iterator<const_iterator> |
using itk::Size< VDimension >::difference_type = std::ptrdiff_t |
using itk::Size< VDimension >::iterator = value_type * |
using itk::Size< VDimension >::reference = value_type & |
using itk::Size< VDimension >::reverse_iterator = std::reverse_iterator<iterator> |
using itk::Size< VDimension >::SizeValueType = ::itk::SizeValueType |
using itk::Size< VDimension >::value_type = ::itk::SizeValueType |
|
inline |
|
inline |
|
inline |
Mirror the std::array type aliases and member function so that the Size class can be treated as a container class in a way that is similar to the std::array.
Definition at line 267 of file itkSize.h.
Referenced by itk::RectangularImageNeighborhoodShape< VImageDimension >::FillOffsets(), itk::operator<(), and itk::operator==().
|
inline |
|
inline |
|
inline |
|
inlineconstexpr |
Mirror the std::array type aliases and member function so that the Size class can be treated as a container class in a way that is similar to the std::array.
Definition at line 279 of file itkSize.h.
Referenced by itk::RectangularImageNeighborhoodShape< VImageDimension >::FillOffsets(), itk::operator<(), and itk::operator==().
|
inline |
|
inline |
Set one value for the index in all dimensions. Useful for initializing an offset to zero.
Definition at line 211 of file itkSize.h.
Referenced by itk::BinaryCrossStructuringElement< TPixel, VDimension, TAllocator >::BinaryCrossStructuringElement(), itk::BoxAccumulateFunction(), itk::BoxSquareAccumulateFunction(), itk::CornerOffsets(), and itk::Size< Self::ImageDimension >::Filled().
|
inlinestatic |
|
inline |
|
inline |
Gets the value of one of the elements. This method is mainly intended to facilitate the access to elements from Tcl and Python where C++ notation is not very convenient.
|
inline |
Get the size. This provides a read only pointer to the size.
|
inlinestaticconstexpr |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Sets the value of one of the elements. 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 179 of file itkSize.h.
Referenced by itk::ScanlineFilterCommon< TInputImage, TOutputImage >::SetupLineOffsets().
|
staticconstexpr |
SizeValueType itk::Size< VDimension >::m_InternalArray[VDimension] |
Size is an "aggregate" class. Its data is public (m_InternalArray) allowing for fast and convenient instantiations/assignments. ( See main class documentation for an example of initialization)
Definition at line 230 of file itkSize.h.
Referenced by itk::RectangularImageNeighborhoodShape< VImageDimension >::CalculateNumberOfOffsets(), itk::Size< Self::ImageDimension >::operator*(), itk::Index< Self::ImageDimension >::operator*(), itk::Size< Self::ImageDimension >::operator*=(), itk::Size< Self::ImageDimension >::operator+(), itk::Size< Self::ImageDimension >::operator+=(), itk::Size< Self::ImageDimension >::operator-(), itk::Size< Self::ImageDimension >::operator-=(), itk::MultiThreaderBase::ParallelizeImageRegion(), itk::Neighborhood< char, TImage::ImageDimension >::SetRadius(), itk::Size< Self::ImageDimension >::swap(), and itk::swap().