![]() |
Orfeo Toolbox
3.16
|
A templated class holding a n-Dimensional vector. More...
#include <itkVector.h>
Inheritance diagram for itk::Vector< T, NVectorDimension >:
Collaboration diagram for itk::Vector< T, NVectorDimension >:Public Types | |
| typedef FixedArray< T, NVectorDimension > | BaseArray |
| typedef ValueType | CArray [VLength] |
| typedef T | ComponentType |
| typedef const ValueType * | const_pointer |
| typedef const ValueType & | const_reference |
| typedef const ValueType * | ConstIterator |
| typedef ValueType * | Iterator |
| typedef ValueType * | pointer |
| typedef NumericTraits < ValueType >::RealType | RealValueType |
| typedef ValueType & | reference |
| typedef Vector | Self |
| typedef unsigned int | SizeType |
| typedef FixedArray< T, NVectorDimension > | Superclass |
| typedef T | ValueType |
| typedef Self | VectorType |
Public Member Functions | |
| Vector () | |
| Vector (const ValueType &r) | |
| template<class TVectorValueType > | |
| Vector (const Vector< TVectorValueType, NVectorDimension > &r) | |
| Vector (const ValueType r[Dimension]) | |
| Iterator | Begin () |
| ConstIterator | Begin () const |
| template<typename TCoordRepB > | |
| void | CastFrom (const Vector< TCoordRepB, NVectorDimension > &pa) |
| Iterator | End () |
| ConstIterator | End () const |
| void | Fill (const ValueType &) |
| vnl_vector_ref< T > | Get_vnl_vector (void) |
| vnl_vector< T > | Get_vnl_vector (void) const |
| ValueType * | GetDataPointer () |
| const ValueType * | GetDataPointer () const |
| const_reference | GetElement (unsigned short index) const |
| RealValueType | GetNorm (void) const |
| RealValueType | GetSquaredNorm (void) const |
| vnl_vector_ref< T > | GetVnlVector (void) |
| vnl_vector< T > | GetVnlVector (void) const |
| void | Normalize (void) |
| bool | operator!= (const FixedArray &r) const |
| bool | operator!= (const Self &v) const |
| ValueType | operator* (const Self &vec) const |
| Self | operator* (const ValueType &value) const |
| template<class Tt > | |
| const Self & | operator*= (const Tt &value) |
| Self | operator+ (const Self &vec) const |
| const Self & | operator+= (const Self &vec) |
| Self | operator- () const |
| Self | operator- (const Self &vec) const |
| const Self & | operator-= (const Self &vec) |
| template<class Tt > | |
| Self | operator/ (const Tt &value) const |
| template<class Tt > | |
| const Self & | operator/= (const Tt &value) |
| template<class TVectorValueType > | |
| Vector & | operator= (const Vector< TVectorValueType, NVectorDimension > &r) |
| Vector & | operator= (const ValueType r[NVectorDimension]) |
| bool | operator== (const FixedArray &r) const |
| bool | operator== (const Self &v) const |
| reference | operator[] (short index) |
| const_reference | operator[] (short index) const |
| reference | operator[] (unsigned short index) |
| const_reference | operator[] (unsigned short index) const |
| reference | operator[] (int index) |
| const_reference | operator[] (int index) const |
| reference | operator[] (unsigned int index) |
| const_reference | operator[] (unsigned int index) const |
| reference | operator[] (long index) |
| const_reference | operator[] (long index) const |
| reference | operator[] (unsigned long index) |
| const_reference | operator[] (unsigned long index) const |
| ReverseIterator | rBegin () |
| ConstReverseIterator | rBegin () const |
| ReverseIterator | rEnd () |
| ConstReverseIterator | rEnd () const |
| void | Set_vnl_vector (const vnl_vector< T > &) |
| void | SetElement (unsigned short index, const_reference value) |
| void | SetNthComponent (int c, const ComponentType &v) |
| void | SetVnlVector (const vnl_vector< T > &) |
| SizeType | Size () const |
Static Public Member Functions | |
| static FixedArray | Filled (const ValueType &) |
| static unsigned int | GetNumberOfComponents () |
| static unsigned int | GetVectorDimension () |
Static Public Attributes | |
| static const unsigned int | Dimension = NVectorDimension |
| static const unsigned int | Length |
A templated class holding a n-Dimensional vector.
Vector is a templated class that holds a single vector (i.e., an array of values). Vector can be used as the data type held at each pixel in an Image or at each vertex of an Mesh. The template parameter T can be any data type that behaves like a primitive (or atomic) data type (int, short, float, complex). The NVectorDimension defines the number of components in the vector array.
Vector is not a dynamically extendible array like std::vector. It is intended to be used like a mathematical vector.
If you wish a simpler pixel types, you can use Scalar, which represents a single data value at a pixel. There is also the more complex type ScalarVector, which supports (for a given pixel) a single scalar value plus an array of vector values. (The scalar and vectors can be of different data type.)
Definition at line 58 of file itkVector.h.
| typedef FixedArray<T, NVectorDimension> itk::Vector< T, NVectorDimension >::BaseArray |
The Array type from which this vector is derived.
Definition at line 80 of file itkVector.h.
|
inherited |
A type representing the C-array version of this FixedArray.
Definition at line 77 of file itkFixedArray.h.
| typedef T itk::Vector< T, NVectorDimension >::ComponentType |
Component value type
Definition at line 77 of file itkVector.h.
|
inherited |
A const pointer to the ValueType.
Definition at line 129 of file itkFixedArray.h.
|
inherited |
A const reference to the ValueType.
Definition at line 135 of file itkFixedArray.h.
|
inherited |
A const iterator through the array.
Definition at line 83 of file itkFixedArray.h.
|
inherited |
An iterator through the array.
Definition at line 80 of file itkFixedArray.h.
|
inherited |
A pointer to the ValueType.
Definition at line 126 of file itkFixedArray.h.
| typedef NumericTraits< ValueType >::RealType itk::Vector< T, NVectorDimension >::RealValueType |
Definition at line 68 of file itkVector.h.
|
inherited |
A reference to the ValueType.
Definition at line 132 of file itkFixedArray.h.
| typedef Vector itk::Vector< T, NVectorDimension >::Self |
Standard class typedefs.
Definition at line 62 of file itkVector.h.
|
inherited |
Definition at line 137 of file itkFixedArray.h.
| typedef FixedArray<T,NVectorDimension> itk::Vector< T, NVectorDimension >::Superclass |
Definition at line 63 of file itkVector.h.
| typedef T itk::Vector< T, NVectorDimension >::ValueType |
ValueType can be used to declare a variable that is the same type as a data element held in an Vector.
Definition at line 67 of file itkVector.h.
| typedef Self itk::Vector< T, NVectorDimension >::VectorType |
I am a vector type.
Definition at line 74 of file itkVector.h.
|
inline |
Default constructor and copy constructors.
Definition at line 109 of file itkVector.h.
| itk::Vector< T, TVectorDimension >::Vector | ( | const ValueType & | r | ) |
Constructor to initialize entire vector to one value.
Definition at line 36 of file itkVector.txx.
|
inline |
Pass-through constructor for the Array base class.
Definition at line 114 of file itkVector.h.
|
inline |
Definition at line 115 of file itkVector.h.
|
inherited |
Get various iterators to the array.
Get an Iterator for the beginning of the FixedArray.
|
inherited |
Get a ConstIterator for the beginning of the FixedArray.
|
inline |
Copy from another Vector with a different representation type. Casting is done with C-Like rules
Definition at line 218 of file itkVector.h.
Referenced by otb::VectorDataProjectionFilter< TInputVectorData, TOutputVectorData >::SetInputSpacing(), otb::VectorDataIntoImageProjectionFilter< TInputVectorData, TInputImage >::SetOutputSpacing(), otb::VectorDataProjectionFilter< TInputVectorData, TOutputVectorData >::SetOutputSpacing(), otb::VectorData< TPrecision, VDimension, TValuePrecision >::SetSpacing(), and itk::ImageBase< VImageDimension >::SetSpacing().
|
inherited |
Get an Iterator for the end of the FixedArray.
|
inherited |
Get a ConstIterator for the end of the FixedArray.
|
inherited |
Fill all elements of the array with the given value.
Referenced by itk::VectorFuzzyConnectednessImageFilter< TInputImage, TOutputImage >::Compute_Scale(), and itk::MetaDTITubeConverter< NDimensions >::MetaDTITubeToDTITubeSpatialObject().
|
staticinherited |
Return an FixedArray with all elements assigned to the given value.
| vnl_vector_ref< T > itk::Vector< T, TVectorDimension >::Get_vnl_vector | ( | void | ) |
Get a vnl_vector_ref referencing the same memory block.
Return a vnl_vector_ref
Definition at line 201 of file itkVector.txx.
Referenced by itk::DeformableSimplexMesh3DFilter< TInputMesh, TOutputMesh >::ComputeBarycentricCoordinates(), and itk::DeformableSimplexMesh3DFilter< TInputMesh, TOutputMesh >::ComputeGeometry().
| vnl_vector< T > itk::Vector< T, TVectorDimension >::Get_vnl_vector | ( | void | ) | const |
Get a vnl_vector with a copy of the internal memory block.
Return a vnl_vector const
Definition at line 213 of file itkVector.txx.
|
inlineinherited |
Return a pointer to the data.
Definition at line 216 of file itkFixedArray.h.
Referenced by itk::MetaArrayWriter::SetInput().
|
inlineinherited |
Definition at line 217 of file itkFixedArray.h.
|
inlineinherited |
Definition at line 213 of file itkFixedArray.h.
| Vector< T, TVectorDimension >::RealValueType itk::Vector< T, TVectorDimension >::GetNorm | ( | void | ) | const |
Returns the Euclidean Norm of the vector
Returns vector's Euclidean Norm
Definition at line 159 of file itkVector.txx.
Referenced by itk::bio::CellularAggregate< NSpaceDimension >::Add(), itk::bio::Cell< NSpaceDimension >::AddForce(), itk::bio::CellularAggregate< NSpaceDimension >::ComputeClosestPoints(), itk::ThinPlateSplineKernelTransform< TScalarType, NDimensions >::ComputeDeformationContribution(), itk::ThinPlateR2LogRSplineKernelTransform< TScalarType, NDimensions >::ComputeDeformationContribution(), itk::VolumeSplineKernelTransform< TScalarType, NDimensions >::ComputeDeformationContribution(), itk::DeformableSimplexMesh3DFilter< TInputMesh, TOutputMesh >::ComputeExternalForce(), itk::bio::CellularAggregate< NSpaceDimension >::ComputeForces(), itk::SimplexMeshGeometry::ComputeGeometry(), itk::SymmetricEllipsoidInteriorExteriorSpatialFunction< VDimension, TInput >::Evaluate(), itk::BloxBoundaryProfileImageToBloxCoreAtomImageFilter< TInputImage, TOutputImage, TSourceImage >::FindCoreAtomsAtBoundaryPoint(), itk::BloxBoundaryPointToCoreAtomImageFilter< dim >::FindCoreAtomsAtBoundaryPoint(), itk::Versor< T >::Set(), itk::VersorTransformOptimizer::StepAlongGradient(), itk::VersorRigid3DTransformOptimizer::StepAlongGradient(), and itk::bio::CellularAggregate< NSpaceDimension >::UpdatePositions().
|
inlinestatic |
Returns the number of components in this vector type
Definition at line 207 of file itkVector.h.
| Vector< T, TVectorDimension >::RealValueType itk::Vector< T, TVectorDimension >::GetSquaredNorm | ( | void | ) | const |
Returns vector's Squared Euclidean Norm
Definition at line 142 of file itkVector.txx.
Referenced by itk::DeformableSimplexMesh3DFilter< TInputMesh, TOutputMesh >::ComputeBarycentricCoordinates(), itk::SimplexMeshGeometry::ComputeGeometry(), itk::ActiveShapeModelCalculator< TImage >::GenerateData(), and itk::ArrowSpatialObject< TDimension >::UpdateTransform().
|
inlinestatic |
Get the dimension (size) of the vector.
Definition at line 83 of file itkVector.h.
| vnl_vector_ref< T > itk::Vector< T, TVectorDimension >::GetVnlVector | ( | void | ) |
Get a vnl_vector_ref referencing the same memory block.
Return a vnl_vector_ref
Definition at line 244 of file itkVector.txx.
Referenced by itk::SimplexMeshGeometry::ComputeGeometry(), itk::FiniteCylinderSpatialFunction< VDimension, TInput >::Evaluate(), itk::BloxBoundaryProfileImageToBloxCoreAtomImageFilter< TInputImage, TOutputImage, TSourceImage >::FindCoreAtomsAtBoundaryPoint(), itk::BloxBoundaryPointToCoreAtomImageFilter< dim >::FindCoreAtomsAtBoundaryPoint(), itk::BloxBoundaryPointImageToBloxBoundaryProfileImageFilter< TSourceImage >::GenerateData(), and itk::ArrowSpatialObject< TDimension >::IsInside().
| vnl_vector< T > itk::Vector< T, TVectorDimension >::GetVnlVector | ( | void | ) | const |
Get a vnl_vector with a copy of the internal memory block.
Return a vnl_vector const
Definition at line 256 of file itkVector.txx.
| void itk::Vector< T, TVectorDimension >::Normalize | ( | void | ) |
Divides the vector componets by the vector norm
Divide vector's components by vector's norm
Definition at line 171 of file itkVector.txx.
Referenced by itk::BresenhamLine< VDimension >::BuildLine(), itk::FlatStructuringElement< VDimension >::checkParallel(), otb::SpectralAngleDataNodeFeatureFunction< TImage, TCoordRep, TPrecision >::Evaluate(), otb::RadiometryHomogenousWithNeighborhoodDataNodeFeatureFunction< TImage, TCoordRep, TPrecision >::Evaluate(), itk::ExtractOrthogonalSwath2DImageFilter< TImage >::GenerateData(), itk::ArrowSpatialObject< TDimension >::IsInside(), itk::FlatStructuringElement< VDimension >::PolySub(), and itk::Rigid3DPerspectiveTransform< TScalarType >::SetRotation().
|
inlineinherited |
Definition at line 191 of file itkFixedArray.h.
|
inline |
Definition at line 197 of file itkVector.h.
| Vector< T, TVectorDimension >::ValueType itk::Vector< T, TVectorDimension >::operator* | ( | const Self & | vec | ) | const |
Vector operator*. Performs the inner product of two vectors. this is also known as the scalar product.
Definition at line 312 of file itkVector.txx.
|
inline |
Scalar operator*. Scale the elements of a vector by a scalar. Return a new vector.
Definition at line 169 of file itkVector.h.
|
inline |
Scalar operator*=. Scales elements by a scalar.
Definition at line 128 of file itkVector.h.
| Vector< T, TVectorDimension > itk::Vector< T, TVectorDimension >::operator+ | ( | const Self & | vec | ) | const |
Vector addition. Add two vectors. Return a new vector.
Returns a temporary copy of a vector
Definition at line 109 of file itkVector.txx.
| const Vector< T, TVectorDimension >::Self & itk::Vector< T, TVectorDimension >::operator+= | ( | const Self & | vec | ) |
Vector operator+=. Adds a vectors to the current vector.
Definition at line 61 of file itkVector.txx.
| Vector< T, TVectorDimension > itk::Vector< T, TVectorDimension >::operator- | ( | ) | const |
Vector negation. Negate all the elements of a vector. Return a new vector
Returns a temporary copy of a vector
Definition at line 93 of file itkVector.txx.
| Vector< T, TVectorDimension > itk::Vector< T, TVectorDimension >::operator- | ( | const Self & | vec | ) | const |
Vector subtraction. Subtract two vectors. Return a new vector.
Returns a temporary copy of a vector
Definition at line 125 of file itkVector.txx.
| const Vector< T, TVectorDimension >::Self & itk::Vector< T, TVectorDimension >::operator-= | ( | const Self & | vec | ) |
Vector operator-=. Subtracts a vector from a current vector.
Definition at line 77 of file itkVector.txx.
|
inline |
Scalar operator/. Scale (divide) the elements of a vector by a scalar. Return a new vector.
Definition at line 181 of file itkVector.h.
|
inline |
Scalar operator/=. Scales (divides) elements by a scalar.
Definition at line 138 of file itkVector.h.
|
inline |
Pass-through assignment operator for the Array base class.
Definition at line 119 of file itkVector.h.
| Vector< T, TVectorDimension > & itk::Vector< T, TVectorDimension >::operator= | ( | const ValueType | r[TVectorDimension] | ) |
Definition at line 48 of file itkVector.txx.
|
inherited |
Operators == and != are used to compare whether two arrays are equal. Note that arrays are equal when the number of components (size) is the same, and each component value is equal.
Operator != compares different types of arrays.
Referenced by itk::Vector< CoordRepType, itkGetStaticConstMacro(SpaceDimension)>::operator==().
|
inline |
Operators == and != compare a vector component by component. All components must be equal for two vectors to be equal. (Of course compile-time constraints on the template parameters length and type prevent comparisons between vectors of different type and length.)
Definition at line 195 of file itkVector.h.
Referenced by itk::Vector< CoordRepType, itkGetStaticConstMacro(SpaceDimension)>::operator!=().
|
inlineinherited |
Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.
Definition at line 197 of file itkFixedArray.h.
Referenced by itk::Vector< CoordRepType, itkGetStaticConstMacro(SpaceDimension)>::SetNthComponent().
|
inlineinherited |
Definition at line 198 of file itkFixedArray.h.
|
inlineinherited |
Definition at line 199 of file itkFixedArray.h.
|
inlineinherited |
Definition at line 200 of file itkFixedArray.h.
|
inlineinherited |
Definition at line 201 of file itkFixedArray.h.
|
inlineinherited |
Definition at line 202 of file itkFixedArray.h.
|
inlineinherited |
Definition at line 203 of file itkFixedArray.h.
|
inlineinherited |
Definition at line 204 of file itkFixedArray.h.
|
inlineinherited |
Definition at line 205 of file itkFixedArray.h.
|
inlineinherited |
Definition at line 206 of file itkFixedArray.h.
|
inlineinherited |
Definition at line 207 of file itkFixedArray.h.
|
inlineinherited |
Definition at line 208 of file itkFixedArray.h.
|
inherited |
Get a begin ReverseIterator.
|
inherited |
Get a begin ConstReverseIterator.
|
inherited |
Get an end ReverseIterator.
|
inherited |
Get an end ConstReverseIterator.
| void itk::Vector< T, TVectorDimension >::Set_vnl_vector | ( | const vnl_vector< T > & | v | ) |
Set a vnl_vector_ref referencing the same memory block.
Set a vnl_vector
Definition at line 186 of file itkVector.txx.
Referenced by itk::DeformableSimplexMesh3DFilter< TInputMesh, TOutputMesh >::ComputeBarycentricCoordinates(), itk::DeformableSimplexMesh3DFilter< TInputMesh, TOutputMesh >::ComputeDisplacement(), itk::DeformableSimplexMesh3DFilter< TInputMesh, TOutputMesh >::ComputeGeometry(), and itk::DeformableSimplexMesh3DFilter< TInputMesh, TOutputMesh >::ComputeInternalForce().
|
inlineinherited |
Set/Get element methods are more convenient in wrapping languages
Definition at line 211 of file itkFixedArray.h.
|
inline |
Definition at line 212 of file itkVector.h.
| void itk::Vector< T, TVectorDimension >::SetVnlVector | ( | const vnl_vector< T > & | v | ) |
Set a vnl_vector_ref referencing the same memory block.
Set a vnl_vector
Definition at line 229 of file itkVector.txx.
Referenced by itk::NonUniformBSpline< TDimension >::ComputeControlPoints(), itk::SimplexMeshGeometry::ComputeGeometry(), itk::BloxBoundaryProfileImageToBloxCoreAtomImageFilter< TInputImage, TOutputImage, TSourceImage >::FindCoreAtomsAtBoundaryPoint(), itk::BloxBoundaryPointToCoreAtomImageFilter< dim >::FindCoreAtomsAtBoundaryPoint(), and itk::BloxBoundaryPointImageToBloxBoundaryProfileImageFilter< TSourceImage >::GenerateData().
|
inherited |
Get the size of the FixedArray.
|
static |
Dimension of the vector space.
Definition at line 71 of file itkVector.h.
|
staticinherited |
Length constant
Definition at line 68 of file itkFixedArray.h.