#include <itkIndex.h>
template<unsigned int VDimension = 2>
struct itk::Index< VDimension >
Represent a n-dimensional index in a n-dimensional image.
Index is a templated class to represent a multi-dimensional index, i.e. (i,j,k,...). Index is templated over the dimension of the index. ITK assumes the first element of an index is the fastest moving index.
For efficiency sake, Index does not define a default constructor, a copy constructor, or an operator=. We rely on the compiler to provide efficient bitwise copies.
Index 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:
Index<3> var{{ 256, 256, 20 }}; // Also prevent narrowing conversions Index<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.
- Wiki Examples:
-
- Examples:
- SphinxExamples/src/Core/Common/AddOffsetToIndex/Code.cxx, SphinxExamples/src/Core/Common/CreateAIndex/Code.cxx, SphinxExamples/src/Core/Common/CreateAnother/Code.cxx, SphinxExamples/src/Filtering/ImageGrid/ResampleAnImage/Code.cxx, WikiExamples/Curves/ContourMeanDistanceImageFilter.cxx, WikiExamples/Developer/ImageFilter.cxx, WikiExamples/Developer/InplaceImageFilter.cxx, WikiExamples/EdgesAndGradients/SobelEdgeDetectionImageFilter.cxx, WikiExamples/Functions/MedianImageFunction.cxx, WikiExamples/Functions/NeighborhoodOperatorImageFunction.cxx, WikiExamples/ImageProcessing/ApproximateSignedDistanceMapImageFilter.cxx, WikiExamples/ImageProcessing/BinaryFunctorImageFilter.cxx, WikiExamples/ImageProcessing/BinaryFunctorImageFilterCustom.cxx, WikiExamples/ImageProcessing/BinaryThinningImageFilter.cxx, WikiExamples/ImageProcessing/Compose3DCovariantVectorImageFilter.cxx, WikiExamples/ImageProcessing/DanielssonDistanceMapImageFilter.cxx, WikiExamples/ImageProcessing/ExtractImageFilter.cxx, WikiExamples/ImageProcessing/ImageAdaptorExtractVectorComponent.cxx, WikiExamples/ImageProcessing/ImageFilterOnARegion.cxx, WikiExamples/ImageProcessing/ManuallyRemovingLabels.cxx, WikiExamples/ImageProcessing/MultiplyByConstantImageFilter.cxx, WikiExamples/ImageProcessing/NthElementImageAdaptor.cxx, WikiExamples/ImageProcessing/ObjectByObjectLabelMapFilter.cxx, WikiExamples/ImageProcessing/ResampleImageFilter.cxx, WikiExamples/ImageProcessing/RGBToLuminanceImageFilter.cxx, WikiExamples/ImageProcessing/ScaleTransform.cxx, WikiExamples/ImageProcessing/SignedDanielssonDistanceMapImageFilter.cxx, WikiExamples/ImageProcessing/SignedMaurerDistanceMapImageFilter.cxx, WikiExamples/ImageProcessing/ZeroCrossingImageFilter.cxx, WikiExamples/Images/FFTNormalizedCorrelationImageFilter.cxx, WikiExamples/Images/ImageRegion.cxx, WikiExamples/Images/Index.cxx, WikiExamples/Images/MaskedFFTNormalizedCorrelationImageFilter.cxx, WikiExamples/Images/MaskNeighborhoodOperatorImageFilter.cxx, WikiExamples/Images/NormalizedCorrelationImageFilter.cxx, WikiExamples/Morphology/BinaryMorphologicalClosingImageFilter.cxx, WikiExamples/Morphology/BinaryMorphologicalOpeningImageFilter.cxx, WikiExamples/Segmentation/ContourExtractor2DImageFilter.cxx, WikiExamples/Segmentation/SimpleContourExtractorImageFilter.cxx, WikiExamples/Segmentation/WatershedImageFilter.cxx, WikiExamples/SimpleOperations/BresenhamLine.cxx, WikiExamples/SimpleOperations/DistanceBetweenIndices.cxx, WikiExamples/SimpleOperations/Offset.cxx, WikiExamples/SimpleOperations/ParaviewColormap.cxx, WikiExamples/SimpleOperations/PixelInsideRegion.cxx, WikiExamples/SimpleOperations/RequestedRegion.cxx, WikiExamples/SimpleOperations/ScalarToRGBColormapImageFilter.cxx, WikiExamples/SimpleOperations/WidthHeight.cxx, WikiExamples/SpectralAnalysis/ForwardFFTImageFilter.cxx, WikiExamples/SpectralAnalysis/InverseFFTImageFilter.cxx, WikiExamples/SpectralAnalysis/VnlFFTRealToComplexConjugateImageFilter.cxx, WikiExamples/Statistics/ImageToHistogramFilterGrayscale.cxx, WikiExamples/Statistics/ImageToHistogramFilterRGB.cxx, WikiExamples/Statistics/ImageToHistogramFilterVectorImage.cxx, WikiExamples/VectorImages/JoinImageFilter.cxx, WikiExamples/VectorImages/VectorImageToImageAdaptor.cxx, WikiExamples/VectorImages/VectorNeighborhoodIterator.cxx, and WikiExamples/VectorImages/VectorResampleImageFilter.cxx.
Definition at line 66 of file itkIndex.h.
|
static constexpr unsigned int | Dimension = VDimension |
|
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
Standard class type aliases.
Definition at line 73 of file itkIndex.h.
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
Mirror the std::array type aliases and member function so that the Index class can be treated as a container class in a way that is similar to the std::array.
Definition at line 314 of file itkIndex.h.
template<unsigned int VDimension = 2>
Mirror behavior of the std::array manipulations See std::array for documentation on these methods
Definition at line 328 of file itkIndex.h.
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<typename TCoordRep >
template<unsigned int VDimension = 2>
template<typename TCoordRep >
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
constexpr bool itk::Index< VDimension >::empty |
( |
| ) |
const |
|
inline |
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension>
Index< VDimension > itk::Index< VDimension >::GetBasisIndex |
( |
unsigned int |
dim | ) |
|
|
static |
Return a basis vector of the form [0, ..., 0, 1, 0, ... 0] where the "1" is positioned in the location specified by the parameter "dim". Valid values of "dim" are 0, ..., VDimension-1.
Definition at line 457 of file itkIndex.h.
References itk::Index< VDimension >::m_InternalArray.
template<unsigned int VDimension = 2>
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
- GetIndex()
-
SetElement()
Definition at line 250 of file itkIndex.h.
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
static constexpr unsigned int itk::Index< VDimension >::GetIndexDimension |
( |
| ) |
|
|
inlinestatic |
Get the dimension.
Definition at line 90 of file itkIndex.h.
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
Multiply an index by a size (elementwise product).
Definition at line 204 of file itkIndex.h.
template<unsigned int VDimension = 2>
Add a size to an index.
Definition at line 97 of file itkIndex.h.
template<unsigned int VDimension = 2>
Add an offset to an index.
Definition at line 144 of file itkIndex.h.
template<unsigned int VDimension = 2>
Increment index by a size.
Definition at line 109 of file itkIndex.h.
template<unsigned int VDimension = 2>
Increment index by an offset.
Definition at line 156 of file itkIndex.h.
template<unsigned int VDimension = 2>
Subtract a size from an index.
Definition at line 121 of file itkIndex.h.
template<unsigned int VDimension = 2>
Subtract an offset from an index.
Definition at line 178 of file itkIndex.h.
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
Decrement index by a size.
Definition at line 133 of file itkIndex.h.
template<unsigned int VDimension = 2>
Decrement index by an offset.
Definition at line 167 of file itkIndex.h.
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
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
- SetIndex()
-
GetElement()
Definition at line 239 of file itkIndex.h.
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
template<unsigned int VDimension = 2>
constexpr unsigned int itk::Index< VDimension >::Dimension = VDimension |
|
static |
Dimension constant
Definition at line 87 of file itkIndex.h.
template<unsigned int VDimension = 2>
The documentation for this struct was generated from the following file: