![]() |
Orfeo Toolbox
3.16
|
A templated class holding a geometric point in n-Dimensional space. More...
#include <itkPoint.h>
Inheritance diagram for itk::Point< TCoordRep, NPointDimension >:
Collaboration diagram for itk::Point< TCoordRep, NPointDimension >:Public Types | |
| typedef FixedArray< TCoordRep, NPointDimension > | BaseArray |
| typedef ValueType | CArray [VLength] |
| typedef const ValueType * | const_pointer |
| typedef const ValueType & | const_reference |
| typedef BaseArray::ConstIterator | ConstIterator |
| typedef TCoordRep | CoordRepType |
| typedef BaseArray::Iterator | Iterator |
| typedef ValueType * | pointer |
| typedef NumericTraits < ValueType >::RealType | RealType |
| typedef ValueType & | reference |
| typedef Point | Self |
| typedef unsigned int | SizeType |
| typedef FixedArray< TCoordRep, NPointDimension > | Superclass |
| typedef TCoordRep | ValueType |
| typedef Vector< ValueType, NPointDimension > | VectorType |
Public Member Functions | |
| Point () | |
| template<class TPointValueType > | |
| Point (const Point< TPointValueType, NPointDimension > &r) | |
| Point (const ValueType r[PointDimension]) | |
| Iterator | Begin () |
| ConstIterator | Begin () const |
| template<typename TCoordRepB > | |
| void | CastFrom (const Point< TCoordRepB, NPointDimension > &pa) |
| Iterator | End () |
| ConstIterator | End () const |
| template<typename TCoordRepB > | |
| RealType | EuclideanDistanceTo (const Point< TCoordRepB, NPointDimension > &pa) const |
| void | Fill (const ValueType &) |
| vnl_vector_ref< TCoordRep > | Get_vnl_vector (void) |
| vnl_vector< TCoordRep > | Get_vnl_vector (void) const |
| ValueType * | GetDataPointer () |
| const ValueType * | GetDataPointer () const |
| const_reference | GetElement (unsigned short index) const |
| VectorType | GetVectorFromOrigin () const |
| vnl_vector_ref< TCoordRep > | GetVnlVector (void) |
| vnl_vector< TCoordRep > | GetVnlVector (void) const |
| bool | operator!= (const Self &pt) const |
| bool | operator!= (const FixedArray &r) const |
| Self | operator+ (const VectorType &vec) const |
| const Self & | operator+= (const VectorType &vec) |
| VectorType | operator- (const Self &pnt) const |
| Self | operator- (const VectorType &vec) const |
| const Self & | operator-= (const VectorType &vec) |
| Point & | operator= (const Self &r) |
| Point & | operator= (const ValueType r[NPointDimension]) |
| bool | operator== (const Self &pt) const |
| bool | operator== (const FixedArray &r) 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 | SetElement (unsigned short index, const_reference value) |
| void | SetToBarycentricCombination (const Self &A, const Self &B, double alpha) |
| void | SetToBarycentricCombination (const Self &A, const Self &B, const Self &C, double weightA, double weightB) |
| void | SetToBarycentricCombination (const Self *P, const double *weights, unsigned int N) |
| void | SetToMidPoint (const Self &, const Self &) |
| SizeType | Size () const |
| template<typename TCoordRepB > | |
| RealType | SquaredEuclideanDistanceTo (const Point< TCoordRepB, NPointDimension > &pa) const |
Static Public Member Functions | |
| static FixedArray | Filled (const ValueType &) |
| static unsigned int | GetPointDimension () |
Static Public Attributes | |
| static const unsigned int | Dimension |
| static const unsigned int | Length |
| static const unsigned int | PointDimension = NPointDimension |
A templated class holding a geometric point in n-Dimensional space.
Point is a templated class that holds a set of coordinates (components). Point 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 NPointDimension defines the number of components in the point array.
Definition at line 45 of file itkPoint.h.
| typedef FixedArray<TCoordRep, NPointDimension> itk::Point< TCoordRep, NPointDimension >::BaseArray |
The Array type from which this Vector is derived.
Definition at line 63 of file itkPoint.h.
|
inherited |
A type representing the C-array version of this FixedArray.
Definition at line 77 of file itkFixedArray.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.
| typedef BaseArray::ConstIterator itk::Point< TCoordRep, NPointDimension >::ConstIterator |
Definition at line 65 of file itkPoint.h.
| typedef TCoordRep itk::Point< TCoordRep, NPointDimension >::CoordRepType |
Definition at line 55 of file itkPoint.h.
| typedef BaseArray::Iterator itk::Point< TCoordRep, NPointDimension >::Iterator |
Definition at line 64 of file itkPoint.h.
|
inherited |
A pointer to the ValueType.
Definition at line 126 of file itkFixedArray.h.
| typedef NumericTraits< ValueType >::RealType itk::Point< TCoordRep, NPointDimension >::RealType |
Definition at line 57 of file itkPoint.h.
|
inherited |
A reference to the ValueType.
Definition at line 132 of file itkFixedArray.h.
| typedef Point itk::Point< TCoordRep, NPointDimension >::Self |
Standard class typedefs.
Definition at line 49 of file itkPoint.h.
|
inherited |
Definition at line 137 of file itkFixedArray.h.
| typedef FixedArray<TCoordRep,NPointDimension> itk::Point< TCoordRep, NPointDimension >::Superclass |
Definition at line 50 of file itkPoint.h.
| typedef TCoordRep itk::Point< TCoordRep, NPointDimension >::ValueType |
ValueType can be used to declare a variable that is the same type as a data element held in an Point.
Definition at line 54 of file itkPoint.h.
| typedef Vector< ValueType, NPointDimension > itk::Point< TCoordRep, NPointDimension >::VectorType |
VectorType define the difference between two Points
Definition at line 72 of file itkPoint.h.
|
inline |
Default constructor has nothing to do.
Definition at line 75 of file itkPoint.h.
|
inline |
Pass-through constructors for the Array base class.
Definition at line 79 of file itkPoint.h.
|
inline |
Definition at line 80 of file itkPoint.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 Point with a different representation type. Casting is done with C-Like rules
Definition at line 215 of file itkPoint.h.
Referenced by itk::MeanSquaresPointSetToImageMetric< TFixedPointSet, TMovingImage >::GetDerivative(), itk::NormalizedCorrelationPointSetToImageMetric< TFixedPointSet, TMovingImage >::GetDerivative(), itk::MeanReciprocalSquareDifferencePointSetToImageMetric< TFixedPointSet, TMovingImage >::GetDerivative(), itk::MeanSquaresPointSetToImageMetric< TFixedPointSet, TMovingImage >::GetValue(), itk::NormalizedCorrelationPointSetToImageMetric< TFixedPointSet, TMovingImage >::GetValue(), itk::MeanReciprocalSquareDifferencePointSetToImageMetric< TFixedPointSet, TMovingImage >::GetValue(), itk::EuclideanDistancePointMetric< TFixedPointSet, TMovingPointSet, TDistanceMap >::GetValue(), itk::MeanSquaresPointSetToImageMetric< TFixedPointSet, TMovingImage >::GetValueAndDerivative(), itk::NormalizedCorrelationPointSetToImageMetric< TFixedPointSet, TMovingImage >::GetValueAndDerivative(), itk::MeanReciprocalSquareDifferencePointSetToImageMetric< TFixedPointSet, TMovingImage >::GetValueAndDerivative(), otb::VectorDataProjectionFilter< TInputVectorData, TOutputVectorData >::SetInputOrigin(), otb::VectorData< TPrecision, VDimension, TValuePrecision >::SetOrigin(), itk::ImageBase< VImageDimension >::SetOrigin(), itk::TriangleMeshToBinaryImageFilter< TInputMesh, TOutputImage >::SetOrigin(), otb::VectorDataIntoImageProjectionFilter< TInputVectorData, TInputImage >::SetOutputOrigin(), and otb::VectorDataProjectionFilter< TInputVectorData, TOutputVectorData >::SetOutputOrigin().
|
inherited |
Get an Iterator for the end of the FixedArray.
|
inherited |
Get a ConstIterator for the end of the FixedArray.
|
inline |
Compute the Euclidean Distance from this point to another point with a different representation type. Casting is done with C-Like rules
Definition at line 244 of file itkPoint.h.
Referenced by itk::PolygonSpatialObject< TDimension >::ClosestPoint(), itk::NonUniformBSpline< TDimension >::ComputeChordLengths(), otb::GCPsToRPCSensorModelImageFilter< TImage >::ComputeErrors(), and itk::TubeSpatialObject< TDimension, TTubePointType >::IsInside().
|
inherited |
Fill all elements of the array with the given value.
Referenced by itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::EvaluateDeformationAtPhysicalPoint(), otb::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::EvaluateDeformationAtPhysicalPoint(), itk::ChangeInformationImageFilter< TInputImage >::GenerateOutputInformation(), otb::Functor::ShapeAttributesLabelObjectFunctor< TLabelObject, TLabelImage >::operator()(), and itk::ShapeLabelMapFilter< TImage, TLabelImage >::ThreadedProcessLabelObject().
|
staticinherited |
Return an FixedArray with all elements assigned to the given value.
| vnl_vector_ref< T > itk::Point< T, TPointDimension >::Get_vnl_vector | ( | void | ) |
Get a vnl_vector_ref referencing the same memory block
Return a vnl_vector_ref
Definition at line 169 of file itkPoint.txx.
Referenced by itk::DeformableSimplexMesh3DGradientConstraintForceFilter< TInputMesh, TOutputMesh >::ComputeExternalForce(), and itk::DeformableSimplexMesh3DFilter< TInputMesh, TOutputMesh >::ComputeExternalForce().
| vnl_vector< T > itk::Point< T, TPointDimension >::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 180 of file itkPoint.txx.
|
inlineinherited |
Return a pointer to the data.
Definition at line 216 of file itkFixedArray.h.
|
inlineinherited |
Definition at line 217 of file itkFixedArray.h.
|
inlineinherited |
Definition at line 213 of file itkFixedArray.h.
|
inlinestatic |
Get the dimension (size) of the point.
Definition at line 68 of file itkPoint.h.
| Point< T, TPointDimension >::VectorType itk::Point< T, TPointDimension >::GetVectorFromOrigin | ( | ) | const |
Access an element of a point.
Definition at line 193 of file itkPoint.txx.
Referenced by itk::DeformableSimplexMesh3DFilter< TInputMesh, TOutputMesh >::ComputeExternalForce().
| vnl_vector_ref< T > itk::Point< T, TPointDimension >::GetVnlVector | ( | void | ) |
Get a vnl_vector_ref referencing the same memory block
Definition at line 142 of file itkPoint.txx.
Referenced by itk::NonUniformBSpline< TDimension >::ComputeControlPoints(), itk::DeformableSimplexMesh3DBalloonForceFilter< TInputMesh, TOutputMesh >::ComputeExternalForce(), itk::BloxCoreAtomPixel< NDimensions >::DoCoreAtomEigenanalysis(), itk::NonUniformBSpline< TDimension >::EvaluateSpline(), itk::BloxBoundaryProfileImageToBloxCoreAtomImageFilter< TInputImage, TOutputImage, TSourceImage >::FindCoreAtomsAtBoundaryPoint(), itk::BloxBoundaryPointToCoreAtomImageFilter< dim >::FindCoreAtomsAtBoundaryPoint(), and itk::BloxBoundaryPointImageToBloxBoundaryProfileImageFilter< TSourceImage >::GenerateData().
| vnl_vector< T > itk::Point< T, TPointDimension >::GetVnlVector | ( | void | ) | const |
Get a vnl_vector with a copy of the internal memory block.
Return a vnl_vector const
Definition at line 153 of file itkPoint.txx.
|
inline |
Compare two points for inequality.
Definition at line 98 of file itkPoint.h.
|
inlineinherited |
Definition at line 191 of file itkFixedArray.h.
| Point< T, TPointDimension > itk::Point< T, TPointDimension >::operator+ | ( | const VectorType & | vec | ) | const |
Add a vector to a point. Return a new point.
Definition at line 94 of file itkPoint.txx.
| const Point< T, TPointDimension > & itk::Point< T, TPointDimension >::operator+= | ( | const VectorType & | vec | ) |
Point operator+=. Adds a vector to the current point.
In place increment by a vector
Definition at line 61 of file itkPoint.txx.
| Vector< T, TPointDimension > itk::Point< T, TPointDimension >::operator- | ( | const Self & | pnt | ) | const |
Computes the Vector difference between two points
Definition at line 126 of file itkPoint.txx.
| Point< T, TPointDimension > itk::Point< T, TPointDimension >::operator- | ( | const VectorType & | vec | ) | const |
Subtract a vector from a point. Return a new point.
Definition at line 110 of file itkPoint.txx.
| const Point< T, TPointDimension > & itk::Point< T, TPointDimension >::operator-= | ( | const VectorType & | vec | ) |
Point operator-=. Subtracts a vector from a current point.
In place subtract a vector
Definition at line 77 of file itkPoint.txx.
| Point< T, TPointDimension > & itk::Point< T, TPointDimension >::operator= | ( | const Self & | r | ) |
Pass-through assignment operator for the Array base class.
Assignment Operator
Definition at line 35 of file itkPoint.txx.
| Point< T, TPointDimension > & itk::Point< T, TPointDimension >::operator= | ( | const ValueType | r[TPointDimension] | ) |
Assignment from a plain array
Definition at line 48 of file itkPoint.txx.
|
inline |
Compare two points for equality.
Definition at line 88 of file itkPoint.h.
|
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.
|
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.
|
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.
|
inlineinherited |
Set/Get element methods are more convenient in wrapping languages
Definition at line 211 of file itkFixedArray.h.
| void itk::Point< T, TPointDimension >::SetToBarycentricCombination | ( | const Self & | A, |
| const Self & | B, | ||
| double | alpha | ||
| ) |
Set the current point to a barycentric combination of the two points given as arguments.
| A | First point |
| B | Second point |
| alpha | Weight for the first point |
The first point is multiplied by
, the second is multiplied by *
, and the sum is stored in the Point on which the method is invoked.
If the value of
, the resulting point will be placed in the line segment
joining
and 
If the value of
the resulting point will be placed outside the line segment
on the side of
.
If the value of
the resulting point will be placed outside the line segment
on the side of
.
Set the point to the barycentric combination of two points
Definition at line 219 of file itkPoint.txx.
Referenced by otb::DisparityMapToDEMFilter< TDisparityImage, TInputImage, TOutputDEMImage, TEpipolarGridImage, TMaskImage >::ThreadedGenerateData().
| void itk::Point< T, TPointDimension >::SetToBarycentricCombination | ( | const Self & | A, |
| const Self & | B, | ||
| const Self & | C, | ||
| double | weightForA, | ||
| double | weightForB | ||
| ) |
Set the current point to a barycentric combination of three points Two values are expected to weight the contribution of the first two points, the weight of for the third point is computed to ensure that the three weights sum 1.
This method computes:
If the two weight are
, The resulting point will alway be placed inside the triangle formed by the three points given as arguments.
Set the point to the barycentric combination of three points
Definition at line 237 of file itkPoint.txx.
| void itk::Point< T, TPointDimension >::SetToBarycentricCombination | ( | const Self * | P, |
| const double * | weights, | ||
| unsigned int | N | ||
| ) |
Set the current point to a barycentric combination of an array of N points An array of (N-1) values is expected to weight the contribution of the first (N-1) points, the weight of the Nth point is computed to ensure that the N weights sum 1.
This method computes:
Set the point to the barycentric combination of N points
Definition at line 256 of file itkPoint.txx.
| void itk::Point< T, TPointDimension >::SetToMidPoint | ( | const Self & | A, |
| const Self & | B | ||
| ) |
Set to median point between the two points given as arguments
This method computes:
using the two Points given as arguments, and store the result in the Point on which the method is invoked.
Set the point to the median point of the two arguments
Definition at line 205 of file itkPoint.txx.
Referenced by otb::DisparityMapToDEMFilter< TDisparityImage, TInputImage, TOutputDEMImage, TEpipolarGridImage, TMaskImage >::ThreadedGenerateData().
|
inherited |
Get the size of the FixedArray.
|
inline |
Compute the Squared Euclidean Distance from this point to another point with a different representation type. Casting is done with C-Like rules
Definition at line 228 of file itkPoint.h.
Referenced by itk::Point< Type, 2 >::EuclideanDistanceTo(), and itk::TubeSpatialObject< TDimension, TTubePointType >::IsInside().
|
staticinherited |
Dimension constant
Definition at line 71 of file itkFixedArray.h.
|
staticinherited |
Length constant
Definition at line 68 of file itkFixedArray.h.
|
static |
Dimension of the Space
Definition at line 60 of file itkPoint.h.
Referenced by itk::Point< Type, 2 >::operator!=(), and itk::Point< Type, 2 >::operator==().