ITK  5.2.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Member Functions | List of all members
itk::Size< VDimension > Struct Template Referencefinal

#include <itkSize.h>

+ Inheritance diagram for itk::Size< VDimension >:

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 ()
 

Static Public Attributes

static constexpr unsigned int Dimension = VDimension
 
using value_type = ::itk::SizeValueType
 
using reference = value_type &
 
using const_reference = const value_type &
 
using iterator = value_type *
 
using const_iterator = const value_type *
 
using size_type = unsigned int
 
using difference_type = std::ptrdiff_t
 
using reverse_iterator = std::reverse_iterator< iterator >
 
using const_reverse_iterator = std::reverse_iterator< const_iterator >
 
SizeValueType m_InternalArray [VDimension]
 
static Self Filled (const SizeValueType value)
 
const Selfoperator+= (const Self &vec)
 
const Self operator- (const Self &vec) const
 
const Selfoperator-= (const Self &vec)
 
const Self operator* (const Self &vec) const
 
const Selfoperator*= (const Self &vec)
 
const SizeValueTypeGetSize () const
 
void SetSize (const SizeValueType val[VDimension])
 
void SetElement (unsigned long element, SizeValueType val)
 
SizeValueType GetElement (unsigned long element) const
 
void Fill (SizeValueType value)
 
void assign (const value_type &newValue)
 
void swap (Size &other)
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
constexpr size_type size () const
 
constexpr size_type max_size () const
 
constexpr bool empty () const
 
reference operator[] (size_type pos)
 
const_reference operator[] (size_type pos) const
 
reference at (size_type pos)
 
const_reference at (size_type pos) const
 
reference front ()
 
const_reference front () const
 
reference back ()
 
const_reference back () const
 
SizeValueTypedata ()
 
const SizeValueTypedata () const
 
void ExceptionThrowingBoundsCheck (size_type pos) const
 

Detailed Description

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

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.

See also
Index
ITK Sphinx Examples:
Examples
SphinxExamples/src/Core/Common/CreateABackwardDifferenceOperator/Code.cxx, and SphinxExamples/src/Core/Common/CreateASize/Code.cxx.

Definition at line 69 of file itkSize.h.

Member Typedef Documentation

◆ const_iterator

template<unsigned int VDimension = 2>
using itk::Size< VDimension >::const_iterator = const value_type *

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 244 of file itkSize.h.

◆ const_reference

template<unsigned int VDimension = 2>
using itk::Size< VDimension >::const_reference = const value_type &

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 242 of file itkSize.h.

◆ const_reverse_iterator

template<unsigned int VDimension = 2>
using itk::Size< VDimension >::const_reverse_iterator = std::reverse_iterator<const_iterator>

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 248 of file itkSize.h.

◆ difference_type

template<unsigned int VDimension = 2>
using itk::Size< VDimension >::difference_type = std::ptrdiff_t

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 246 of file itkSize.h.

◆ iterator

template<unsigned int VDimension = 2>
using itk::Size< VDimension >::iterator = value_type *

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 243 of file itkSize.h.

◆ reference

template<unsigned int VDimension = 2>
using itk::Size< VDimension >::reference = value_type &

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 241 of file itkSize.h.

◆ reverse_iterator

template<unsigned int VDimension = 2>
using itk::Size< VDimension >::reverse_iterator = std::reverse_iterator<iterator>

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 247 of file itkSize.h.

◆ Self

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

Standard class type aliases.

Definition at line 76 of file itkSize.h.

◆ size_type

template<unsigned int VDimension = 2>
using itk::Size< VDimension >::size_type = unsigned int

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 245 of file itkSize.h.

◆ SizeType

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

Compatible Size and value type alias

Definition at line 79 of file itkSize.h.

◆ SizeValueType

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

Definition at line 80 of file itkSize.h.

◆ value_type

template<unsigned int VDimension = 2>
using itk::Size< VDimension >::value_type = ::itk::SizeValueType

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 240 of file itkSize.h.

Member Function Documentation

◆ assign()

template<unsigned int VDimension = 2>
void itk::Size< VDimension >::assign ( const value_type newValue)
inline

Mirror behavior of the std::array manipulations See std::array for documentation on these methods

Definition at line 255 of file itkSize.h.

◆ at() [1/2]

template<unsigned int VDimension = 2>
reference itk::Size< VDimension >::at ( size_type  pos)
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 337 of file itkSize.h.

◆ at() [2/2]

template<unsigned int VDimension = 2>
const_reference itk::Size< VDimension >::at ( size_type  pos) const
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 344 of file itkSize.h.

◆ back() [1/2]

template<unsigned int VDimension = 2>
reference itk::Size< VDimension >::back ( )
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 363 of file itkSize.h.

◆ back() [2/2]

template<unsigned int VDimension = 2>
const_reference itk::Size< VDimension >::back ( ) const
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 369 of file itkSize.h.

◆ begin() [1/2]

template<unsigned int VDimension = 2>
iterator itk::Size< VDimension >::begin ( )
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==().

◆ begin() [2/2]

template<unsigned int VDimension = 2>
const_iterator itk::Size< VDimension >::begin ( ) const
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 273 of file itkSize.h.

◆ data() [1/2]

template<unsigned int VDimension = 2>
SizeValueType* itk::Size< VDimension >::data ( )
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 375 of file itkSize.h.

◆ data() [2/2]

template<unsigned int VDimension = 2>
const SizeValueType* itk::Size< VDimension >::data ( ) const
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 381 of file itkSize.h.

◆ empty()

template<unsigned int VDimension = 2>
constexpr bool itk::Size< VDimension >::empty ( ) const
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 327 of file itkSize.h.

◆ end() [1/2]

template<unsigned int VDimension = 2>
iterator itk::Size< VDimension >::end ( )
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 279 of file itkSize.h.

Referenced by itk::RectangularImageNeighborhoodShape< VImageDimension >::FillOffsets(), itk::operator<(), and itk::operator==().

◆ end() [2/2]

template<unsigned int VDimension = 2>
const_iterator itk::Size< VDimension >::end ( ) const
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 285 of file itkSize.h.

◆ ExceptionThrowingBoundsCheck()

template<unsigned int VDimension = 2>
void itk::Size< VDimension >::ExceptionThrowingBoundsCheck ( size_type  pos) const
inlineprivate

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 388 of file itkSize.h.

◆ Fill()

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.

Examples
SphinxExamples/src/Bridge/VtkGlue/VisualizeEvolvingDense2DLevelSetAsElevationMap/Code.cxx, SphinxExamples/src/Bridge/VtkGlue/VisualizeEvolvingDense2DLevelSetZeroSet/Code.cxx, SphinxExamples/src/Core/Common/ApplyAFilterOnlyToASpecifiedRegionOfAnImage/Code.cxx, SphinxExamples/src/Core/Common/CreateAnImageRegion/Code.cxx, SphinxExamples/src/Core/Common/CreateAnother/Code.cxx, SphinxExamples/src/Core/Common/CreateVectorImage/Code.cxx, SphinxExamples/src/Core/Common/CropImageBySpecifyingRegion/Code.cxx, SphinxExamples/src/Core/Common/IsPixelInsideRegion/Code.cxx, SphinxExamples/src/Core/Common/IterateLineThroughImage/Code.cxx, SphinxExamples/src/Core/Common/IterateLineThroughImageWithoutWriteAccess/Code.cxx, SphinxExamples/src/Core/Common/IterateOverARegionWithAShapedNeighborhoodIterator/Code.cxx, SphinxExamples/src/Core/Common/IterateOverARegionWithAShapedNeighborhoodIteratorManual/Code.cxx, SphinxExamples/src/Core/Common/IterateOverSpecificRegion/Code.cxx, SphinxExamples/src/Core/Common/ObserveAnEvent/Code.cxx, SphinxExamples/src/Core/Common/RandomSelectPixelFromRegionWithoutReplacee/Code.cxx, SphinxExamples/src/Core/Common/StoreNonPixelDataInImage/Code.cxx, SphinxExamples/src/Core/Common/StreamAPipeline/Code.cxx, SphinxExamples/src/Core/Common/WatchAFilter/Code.cxx, SphinxExamples/src/Core/ImageAdaptors/AddConstantToPixelsWithoutDuplicatingImage/Code.cxx, SphinxExamples/src/Core/ImageAdaptors/ExtractChannelOfImageWithMultipleComponents/Code.cxx, SphinxExamples/src/Core/ImageAdaptors/PresentImageAfterOperation/Code.cxx, SphinxExamples/src/Core/ImageAdaptors/ProcessNthComponentOfVectorImage/Code.cxx, SphinxExamples/src/Core/ImageAdaptors/ViewComponentVectorImageAsScaleImage/Code.cxx, SphinxExamples/src/Core/ImageFunction/MultiplyKernelWithAnImageAtLocation/Code.cxx, SphinxExamples/src/Core/TestKernel/GenerateRandomImage/Code.cxx, SphinxExamples/src/Core/Transform/GlobalRegistrationTwoImagesBSpline/Code.cxx, SphinxExamples/src/Filtering/BinaryMathematicalMorphology/ThinImage/Code.cxx, SphinxExamples/src/Filtering/Convolution/ColorNormalizedCorrelation/Code.cxx, SphinxExamples/src/Filtering/Convolution/ConvolveImageWithKernel/Code.cxx, SphinxExamples/src/Filtering/Convolution/NormalizedCorrelation/Code.cxx, SphinxExamples/src/Filtering/Convolution/NormalizedCorrelationOfMaskedImage/Code.cxx, SphinxExamples/src/Filtering/Convolution/NormalizedCorrelationUsingFFT/Code.cxx, SphinxExamples/src/Filtering/Convolution/NormalizedCorrelationUsingFFTWithMaskImages/Code.cxx, SphinxExamples/src/Filtering/ImageCompare/AbsValueOfTwoImages/Code.cxx, SphinxExamples/src/Filtering/ImageCompare/CombineTwoImagesWithCheckerBoardPattern/Code.cxx, SphinxExamples/src/Filtering/ImageCompare/SquaredDifferenceOfTwoImages/Code.cxx, SphinxExamples/src/Filtering/ImageCompose/ComposeVectorFromThreeScalarImages/Code.cxx, SphinxExamples/src/Filtering/ImageCompose/CreateVectorImageFromScalarImages/Code.cxx, SphinxExamples/src/Filtering/ImageCompose/JoinImages/Code.cxx, SphinxExamples/src/Filtering/ImageFilterBase/ApplyKernelToEveryPixel/Code.cxx, SphinxExamples/src/Filtering/ImageFilterBase/ComputeLocalNoise/Code.cxx, SphinxExamples/src/Filtering/ImageFilterBase/CustomOperationToCorrespondingPixelsInTwoImages/Code.cxx, SphinxExamples/src/Filtering/ImageFilterBase/PredefinedOperationToCorrespondingPixelsInTwoImages/Code.cxx, SphinxExamples/src/Filtering/ImageFusion/ColorBoundariesOfRegions/Code.cxx, SphinxExamples/src/Filtering/ImageFusion/ColorLabeledRegions/Code.cxx, SphinxExamples/src/Filtering/ImageFusion/OverlayLabelMapOnImage/Code.cxx, SphinxExamples/src/Filtering/ImageGrid/FitSplineIntoPointSet/Code.cxx, SphinxExamples/src/Filtering/ImageGrid/PadAnImageWithAConstant/Code.cxx, SphinxExamples/src/Filtering/ImageGrid/ShrinkImage/Code.cxx, SphinxExamples/src/Filtering/ImageIntensity/AddConstantToEveryPixel/Code.cxx, SphinxExamples/src/Filtering/ImageIntensity/ApplyAtanImageFilter/Code.cxx, SphinxExamples/src/Filtering/ImageIntensity/BinaryANDTwoImages/Code.cxx, SphinxExamples/src/Filtering/ImageIntensity/BinaryORTwoImages/Code.cxx, SphinxExamples/src/Filtering/ImageIntensity/BinaryXORTwoImages/Code.cxx, SphinxExamples/src/Filtering/ImageIntensity/CompareTwoImagesAndSetOutputPixelToMax/Code.cxx, SphinxExamples/src/Filtering/ImageIntensity/CompareTwoImagesAndSetOutputPixelToMin/Code.cxx, SphinxExamples/src/Filtering/ImageIntensity/ComputeEdgePotential/Code.cxx, SphinxExamples/src/Filtering/ImageIntensity/ExtractComponentOfVectorImage/Code.cxx, SphinxExamples/src/Filtering/ImageIntensity/IntensityWindowing/Code.cxx, SphinxExamples/src/Filtering/ImageIntensity/InverseOfMaskToImage/Code.cxx, SphinxExamples/src/Filtering/ImageIntensity/ScalePixelSumToConstant/Code.cxx, SphinxExamples/src/Filtering/ImageIntensity/SquareEveryPixel/Code.cxx, SphinxExamples/src/Filtering/ImageIntensity/SubtractConstantFromEveryPixel/Code.cxx, SphinxExamples/src/Filtering/ImageLabel/ExtractInnerAndOuterBoundariesOfBlobsInBinaryImage/Code.cxx, SphinxExamples/src/Filtering/ImageStatistics/StatisticalPropertiesOfRegions/Code.cxx, SphinxExamples/src/Filtering/LabelMap/ConvertLabelMapToImage/Code.cxx, SphinxExamples/src/Filtering/LabelMap/InvertImageUsingBinaryNot/Code.cxx, SphinxExamples/src/Filtering/LabelMap/KeepRegionsAboveLevel/Code.cxx, SphinxExamples/src/Filtering/LabelMap/KeepRegionsThatMeetSpecific/Code.cxx, SphinxExamples/src/Filtering/LabelMap/LabelBinaryRegionsAndGetProperties/Code.cxx, SphinxExamples/src/Filtering/LabelMap/LabelBinaryRegionsInImage/Code.cxx, SphinxExamples/src/Filtering/LabelMap/MaskOneImageGivenLabelMap/Code.cxx, SphinxExamples/src/Filtering/LabelMap/RemoveLabelsFromLabelMap/Code.cxx, SphinxExamples/src/Filtering/Thresholding/SeparateGroundUsingOtsu/Code.cxx, SphinxExamples/src/ImageCompareCommand.cxx, SphinxExamples/src/Nonunit/Review/GeometricPropertiesOfRegion/Code.cxx, SphinxExamples/src/Registration/Common/MultiresolutionPyramidFromImage/Code.cxx, SphinxExamples/src/Registration/Common/RegisterImageToAnotherUsingLandmarks/Code.cxx, and SphinxExamples/src/Segmentation/Voronoi/VoronoiDiagram/Code.cxx.

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().

◆ Filled()

template<unsigned int VDimension = 2>
static Self itk::Size< VDimension >::Filled ( const SizeValueType  value)
inlinestatic

Returns a Size object, filled with the specified value for each element.

Definition at line 400 of file itkSize.h.

◆ front() [1/2]

template<unsigned int VDimension = 2>
reference itk::Size< VDimension >::front ( )
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 351 of file itkSize.h.

◆ front() [2/2]

template<unsigned int VDimension = 2>
const_reference itk::Size< VDimension >::front ( ) const
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 357 of file itkSize.h.

◆ GetElement()

template<unsigned int VDimension = 2>
SizeValueType itk::Size< VDimension >::GetElement ( unsigned long  element) const
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.

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

Definition at line 203 of file itkSize.h.

◆ GetSize()

template<unsigned int VDimension = 2>
const SizeValueType* itk::Size< VDimension >::GetSize ( ) const
inline

Get the size. This provides a read only pointer to the size.

See also
SetSize
Examples
Examples/DataRepresentation/Path/PolyLineParametricPath1.cxx, Examples/Filtering/DigitallyReconstructedRadiograph1.cxx, Examples/Filtering/FFTDirectInverse.cxx, Examples/Filtering/ResampleImageFilter4.cxx, Examples/Filtering/ResampleImageFilter5.cxx, Examples/Filtering/ResampleImageFilter7.cxx, Examples/Filtering/ResampleImageFilter8.cxx, Examples/Filtering/ResampleVolumesToBeIsotropic.cxx, Examples/Filtering/SubsampleVolume.cxx, Examples/IO/ImageReadDicomSeriesWrite.cxx, Examples/IO/ImageReadExtractFilterInsertWrite.cxx, Examples/IO/ImageReadExtractWrite.cxx, Examples/IO/ImageReadImageSeriesWrite.cxx, Examples/Iterators/ImageRegionIteratorWithIndex.cxx, Examples/RegistrationITKv4/BSplineWarping1.cxx, Examples/RegistrationITKv4/BSplineWarping2.cxx, Examples/RegistrationITKv4/DeformableRegistration2.cxx, Examples/RegistrationITKv4/DeformableRegistration5.cxx, Examples/RegistrationITKv4/ImageRegistration14.cxx, Examples/RegistrationITKv4/ImageRegistration15.cxx, Examples/RegistrationITKv4/ImageRegistration5.cxx, Examples/RegistrationITKv4/ImageRegistration8.cxx, Examples/RegistrationITKv4/ModelToImageRegistration2.cxx, Examples/RegistrationITKv4/MultiStageImageRegistration1.cxx, Examples/RegistrationITKv4/ThinPlateSplineWarp.cxx, SphinxExamples/src/Core/Common/GetImageSize/Code.cxx, SphinxExamples/src/Core/ImageFunction/ResampleSegmentedImage/Code.cxx, SphinxExamples/src/Core/Transform/ApplyAffineTransformFromHomogeneousMatrixAndResample/Code.cxx, SphinxExamples/src/Core/Transform/GlobalRegistrationTwoImagesBSpline/Code.cxx, SphinxExamples/src/Filtering/FFT/FilterImageInFourierDomain/Code.cxx, SphinxExamples/src/Filtering/ImageGrid/ProcessA2DSliceOfA3DImage/Code.cxx, SphinxExamples/src/Filtering/ImageGrid/ResampleAnImage/Code.cxx, SphinxExamples/src/Filtering/ImageGrid/ResampleAScalarImage/Code.cxx, SphinxExamples/src/Filtering/ImageGrid/UpsampleAnImage/Code.cxx, SphinxExamples/src/Filtering/ImageIntensity/InverseOfMaskToImage/Code.cxx, SphinxExamples/src/Filtering/ImageIntensity/MaskImage/Code.cxx, SphinxExamples/src/ImageCompareCommand.cxx, SphinxExamples/src/IO/GDCM/ResampleDICOMSeries/Code.cxx, SphinxExamples/src/IO/ImageBase/GenerateSlicesFromVolume/Code.cxx, and SphinxExamples/src/IO/ImageBase/ProcessImageChunks/Code.cxx.

Definition at line 169 of file itkSize.h.

◆ GetSizeDimension()

template<unsigned int VDimension = 2>
static constexpr unsigned int itk::Size< VDimension >::GetSizeDimension ( )
inlinestaticconstexpr

Get the dimension.

Definition at line 87 of file itkSize.h.

◆ max_size()

template<unsigned int VDimension = 2>
constexpr size_type itk::Size< VDimension >::max_size ( ) const
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 321 of file itkSize.h.

◆ operator*()

template<unsigned int VDimension = 2>
const Self itk::Size< VDimension >::operator* ( const Self vec) const
inline

Multiply two sizes (elementwise product).

Definition at line 143 of file itkSize.h.

◆ operator*=()

template<unsigned int VDimension = 2>
const Self& itk::Size< VDimension >::operator*= ( const Self vec)
inline

Multiply two sizes (elementwise product).

Definition at line 156 of file itkSize.h.

◆ operator+()

template<unsigned int VDimension = 2>
const Self itk::Size< VDimension >::operator+ ( const Self vec) const
inline

Add two sizes.

Definition at line 94 of file itkSize.h.

◆ operator+=()

template<unsigned int VDimension = 2>
const Self& itk::Size< VDimension >::operator+= ( const Self vec)
inline

Increment size by a size.

Definition at line 107 of file itkSize.h.

◆ operator-()

template<unsigned int VDimension = 2>
const Self itk::Size< VDimension >::operator- ( const Self vec) const
inline

Subtract two sizes.

Definition at line 119 of file itkSize.h.

◆ operator-=()

template<unsigned int VDimension = 2>
const Self& itk::Size< VDimension >::operator-= ( const Self vec)
inline

Decrement size by a size.

Definition at line 132 of file itkSize.h.

◆ operator[]() [1/2]

template<unsigned int VDimension = 2>
reference itk::Size< VDimension >::operator[] ( size_type  pos)
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 332 of file itkSize.h.

◆ operator[]() [2/2]

template<unsigned int VDimension = 2>
const_reference itk::Size< VDimension >::operator[] ( size_type  pos) const
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 334 of file itkSize.h.

◆ rbegin() [1/2]

template<unsigned int VDimension = 2>
reverse_iterator itk::Size< VDimension >::rbegin ( )
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 291 of file itkSize.h.

◆ rbegin() [2/2]

template<unsigned int VDimension = 2>
const_reverse_iterator itk::Size< VDimension >::rbegin ( ) const
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 297 of file itkSize.h.

◆ rend() [1/2]

template<unsigned int VDimension = 2>
reverse_iterator itk::Size< VDimension >::rend ( )
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 303 of file itkSize.h.

◆ rend() [2/2]

template<unsigned int VDimension = 2>
const_reverse_iterator itk::Size< VDimension >::rend ( ) const
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 309 of file itkSize.h.

◆ SetElement()

template<unsigned int VDimension = 2>
void itk::Size< VDimension >::SetElement ( unsigned long  element,
SizeValueType  val 
)
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.

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

Definition at line 191 of file itkSize.h.

◆ SetSize()

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
Examples
Examples/Filtering/DigitallyReconstructedRadiograph1.cxx, Examples/Filtering/ResampleImageFilter.cxx, Examples/Filtering/ResampleImageFilter2.cxx, Examples/Filtering/ResampleImageFilter3.cxx, Examples/Filtering/ResampleImageFilter6.cxx, Examples/Filtering/ResampleImageFilter9.cxx, Examples/Filtering/ResampleOrientedImageFilter.cxx, Examples/Filtering/SpatialObjectToImage1.cxx, Examples/Filtering/SpatialObjectToImage2.cxx, Examples/Filtering/SpatialObjectToImage3.cxx, Examples/RegistrationITKv4/DeformableRegistration2.cxx, Examples/RegistrationITKv4/DeformableRegistration5.cxx, Examples/RegistrationITKv4/ImageRegistration14.cxx, Examples/RegistrationITKv4/ImageRegistration15.cxx, Examples/RegistrationITKv4/ImageRegistrationHistogramPlotter.cxx, Examples/RegistrationITKv4/ModelToImageRegistration1.cxx, SphinxExamples/src/Core/Common/ApplyCustomOperationToEachPixelInImage/Code.cxx, SphinxExamples/src/Core/Common/MakeOutOfBoundsPixelsReturnConstValue/Code.cxx, SphinxExamples/src/Core/Common/MakePartOfImageTransparent/Code.cxx, SphinxExamples/src/Core/Common/SetPixelValueInOneImage/Code.cxx, SphinxExamples/src/Core/ImageFunction/LinearlyInterpolatePositionInImage/Code.cxx, SphinxExamples/src/Core/ImageFunction/ResampleSegmentedImage/Code.cxx, SphinxExamples/src/Core/SpatialObjects/ConvertSpatialObjectToImage/Code.cxx, SphinxExamples/src/Core/SpatialObjects/Ellipse/Code.cxx, SphinxExamples/src/Core/Transform/GlobalRegistrationTwoImagesAffine/Code.cxx, SphinxExamples/src/Core/Transform/GlobalRegistrationTwoImagesBSpline/Code.cxx, SphinxExamples/src/Filtering/ImageGrid/CropImageBySpecifyingRegion2/Code.cxx, SphinxExamples/src/Filtering/ImageGrid/FitSplineIntoPointSet/Code.cxx, SphinxExamples/src/Filtering/ImageGrid/PadImageByWrapping/Code.cxx, SphinxExamples/src/Filtering/ImageGrid/ResampleAVectorImage/Code.cxx, SphinxExamples/src/Filtering/ImageIntensity/AbsValueOfImage/Code.cxx, SphinxExamples/src/Filtering/ImageIntensity/AddTwoImages/Code.cxx, SphinxExamples/src/Filtering/ImageIntensity/InvertImage/Code.cxx, SphinxExamples/src/Filtering/ImageIntensity/PixelDivisionOfTwoImages/Code.cxx, SphinxExamples/src/Filtering/ImageIntensity/SubtractTwoImages/Code.cxx, SphinxExamples/src/Filtering/ImageLabel/ExtractBoundariesOfConnectedRegionsInBinaryImage/Code.cxx, SphinxExamples/src/Filtering/ImageLabel/LabelContoursOfConnectComponent/Code.cxx, SphinxExamples/src/Filtering/ImageStatistics/ComputeMinMaxVarianceMeanOfImage/Code.cxx, SphinxExamples/src/Filtering/LabelMap/ConvertImageToLabelMap/Code.cxx, SphinxExamples/src/Filtering/LabelMap/ConvertImageWithLabelsToShapeLabelMap/Code.cxx, SphinxExamples/src/Filtering/LabelMap/KeepBinaryRegionsThatMeetSpecific/Code.cxx, SphinxExamples/src/Filtering/MathematicalMorphology/RegionalMaximal/Code.cxx, SphinxExamples/src/Filtering/MathematicalMorphology/ValuedRegionalMaximaImage/Code.cxx, SphinxExamples/src/Filtering/MathematicalMorphology/ValuedRegionalMinimalImage/Code.cxx, SphinxExamples/src/IO/ImageBase/WriteAnImage/Code.cxx, SphinxExamples/src/IO/TIFF/WriteATIFFImage/Code.cxx, SphinxExamples/src/Numerics/Statistics/DistributionOfPixelsUsingGMM/Code.cxx, SphinxExamples/src/Registration/Common/GlobalRegistrationOfTwoImages/Code.cxx, SphinxExamples/src/Segmentation/Classifiers/ClusterPixelsInGrayscaleImage/Code.cxx, SphinxExamples/src/Segmentation/Classifiers/KMeansClusterOfPixelsInImage/Code.cxx, SphinxExamples/src/Segmentation/ConnectedComponents/AssignContiguousLabelsToConnectedRegions/Code.cxx, SphinxExamples/src/Segmentation/KLMRegionGrowing/BasicRegionGrowing/Code.cxx, and SphinxExamples/src/Segmentation/RegionGrowing/ConnectedComponentsInImage/Code.cxx.

Definition at line 179 of file itkSize.h.

Referenced by itk::ScanlineFilterCommon< TInputImage, TOutputImage >::SetupLineOffsets().

◆ size()

template<unsigned int VDimension = 2>
constexpr size_type itk::Size< VDimension >::size ( ) const
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 315 of file itkSize.h.

◆ swap()

template<unsigned int VDimension = 2>
void itk::Size< VDimension >::swap ( Size< VDimension > &  other)
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 261 of file itkSize.h.

Member Data Documentation

◆ Dimension

template<unsigned int VDimension = 2>
constexpr unsigned int itk::Size< VDimension >::Dimension = VDimension
staticconstexpr

Dimension constant

Definition at line 83 of file itkSize.h.

◆ m_InternalArray

template<unsigned int VDimension = 2>
SizeValueType itk::Size< VDimension >::m_InternalArray[VDimension]

The documentation for this struct was generated from the following file: