ITK
5.0.0
Insight Segmentation and Registration Toolkit
|
#include <itkPoint.h>
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 52 of file itkPoint.h.
Public Types | |
using | BaseArray = FixedArray< TCoordRep, NPointDimension > |
using | ConstIterator = typename BaseArray::ConstIterator |
using | CoordRepType = TCoordRep |
using | Iterator = typename BaseArray::Iterator |
using | RealType = typename NumericTraits< ValueType >::RealType |
using | Self = Point |
using | Superclass = FixedArray< TCoordRep, NPointDimension > |
using | ValueType = TCoordRep |
using | VectorType = Vector< ValueType, NPointDimension > |
Public Types inherited from itk::FixedArray< TCoordRep, NPointDimension > | |
typedef ValueType | CArray [VLength] |
using | const_pointer = const ValueType * |
using | const_reference = const ValueType & |
using | ConstIterator = const ValueType * |
using | Iterator = ValueType * |
using | pointer = ValueType * |
using | reference = ValueType & |
using | SizeType = unsigned int |
using | ValueType = TCoordRep |
Public Member Functions | |
template<typename TCoordRepB > | |
RealType | EuclideanDistanceTo (const Point< TCoordRepB, NPointDimension > &pa) const |
VectorType | GetVectorFromOrigin () const |
vnl_vector_ref< TCoordRep > | GetVnlVector () |
vnl_vector< TCoordRep > | GetVnlVector () const |
bool | operator!= (const Self &pt) 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 Point &)=default |
Point & | operator= (Point &&)=default |
Point & | operator= (const ValueType r[NPointDimension]) |
bool | operator== (const Self &pt) const |
Point ()=default | |
Point (const Point &)=default | |
Point (Point &&)=default | |
template<typename TPointValueType > | |
Point (const Point< TPointValueType, NPointDimension > &r) | |
template<typename TPointValueType > | |
Point (const TPointValueType r[NPointDimension]) | |
Point (const ValueType r[NPointDimension]) | |
void | SetToMidPoint (const Self &, const Self &) |
template<typename TCoordRepB > | |
RealType | SquaredEuclideanDistanceTo (const Point< TCoordRepB, NPointDimension > &pa) const |
~Point ()=default | |
template<typename TPointValueType > | |
Point (const TPointValueType &v) | |
Point (const ValueType &v) | |
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) |
template<typename TCoordRepB > | |
void | CastFrom (const Point< TCoordRepB, NPointDimension > &pa) |
Public Member Functions inherited from itk::FixedArray< TCoordRep, NPointDimension > | |
Iterator | Begin () |
ConstIterator | Begin () const |
Iterator | End () |
ConstIterator | End () const |
void | Fill (const ValueType &) |
FixedArray (const TScalarValue *r) | |
ValueType * | GetDataPointer () |
const ValueType * | GetDataPointer () const |
bool | operator!= (const FixedArray &r) const |
FixedArray & | operator= (const ValueType r[VLength]) |
bool | operator== (const FixedArray &r) const |
ReverseIterator | rBegin () |
ConstReverseIterator | rBegin () const |
ReverseIterator | rEnd () |
ConstReverseIterator | rEnd () const |
SizeType | Size () const |
void | swap (FixedArray &other) |
FixedArray ()=default | |
FixedArray (const FixedArray &)=default | |
FixedArray (FixedArray &&)=default | |
FixedArray & | operator= (const FixedArray &)=default |
FixedArray & | operator= (FixedArray &&)=default |
~FixedArray ()=default | |
FixedArray (const ValueType r[VLength]) | |
FixedArray (const ValueType &) | |
FixedArray (const FixedArray< TFixedArrayValueType, VLength > &r) | |
FixedArray & | operator= (const FixedArray< TFixedArrayValueType, VLength > &r) |
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 |
reference | operator[] (long long index) |
const_reference | operator[] (long long index) const |
reference | operator[] (unsigned long long index) |
const_reference | operator[] (unsigned long long index) const |
void | SetElement (unsigned short index, const_reference value) |
const_reference | GetElement (unsigned short index) const |
Static Public Member Functions | |
static unsigned int | GetPointDimension () |
Static Public Member Functions inherited from itk::FixedArray< TCoordRep, NPointDimension > | |
static FixedArray | Filled (const ValueType &) |
Static Public Attributes | |
static constexpr unsigned int | PointDimension = NPointDimension |
Static Public Attributes inherited from itk::FixedArray< TCoordRep, NPointDimension > | |
static constexpr unsigned int | Dimension |
static constexpr unsigned int | Length |
using itk::Point< TCoordRep, NPointDimension >::BaseArray = FixedArray< TCoordRep, NPointDimension > |
The Array type from which this Vector is derived.
Definition at line 70 of file itkPoint.h.
using itk::Point< TCoordRep, NPointDimension >::ConstIterator = typename BaseArray::ConstIterator |
Definition at line 72 of file itkPoint.h.
using itk::Point< TCoordRep, NPointDimension >::CoordRepType = TCoordRep |
Definition at line 62 of file itkPoint.h.
using itk::Point< TCoordRep, NPointDimension >::Iterator = typename BaseArray::Iterator |
Definition at line 71 of file itkPoint.h.
using itk::Point< TCoordRep, NPointDimension >::RealType = typename NumericTraits< ValueType >::RealType |
Definition at line 64 of file itkPoint.h.
using itk::Point< TCoordRep, NPointDimension >::Self = Point |
Standard class type aliases.
Definition at line 56 of file itkPoint.h.
using itk::Point< TCoordRep, NPointDimension >::Superclass = FixedArray< TCoordRep, NPointDimension > |
Definition at line 57 of file itkPoint.h.
using itk::Point< TCoordRep, NPointDimension >::ValueType = TCoordRep |
ValueType can be used to declare a variable that is the same type as a data element held in an Point.
Definition at line 61 of file itkPoint.h.
using itk::Point< TCoordRep, NPointDimension >::VectorType = Vector< ValueType, NPointDimension > |
VectorType define the difference between two Points
Definition at line 79 of file itkPoint.h.
|
default |
Default constructor, assignments
|
default |
|
default |
|
default |
|
inline |
Pass-through constructors for different type points.
Definition at line 91 of file itkPoint.h.
|
inline |
Pass-through constructors for plain arrays.
Definition at line 95 of file itkPoint.h.
|
inline |
Definition at line 96 of file itkPoint.h.
|
inline |
Pass-through constructors for single values
Definition at line 100 of file itkPoint.h.
|
inline |
Pass-through constructors for single values
Definition at line 101 of file itkPoint.h.
|
inline |
Copy from another Point with a different representation type. Casting is done with C-Like rules
Definition at line 232 of file itkPoint.h.
|
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 263 of file itkPoint.h.
|
inlinestatic |
Get the dimension (size) of the point.
Definition at line 75 of file itkPoint.h.
VectorType itk::Point< TCoordRep, NPointDimension >::GetVectorFromOrigin | ( | ) | const |
Access an element of a point.
vnl_vector_ref< TCoordRep > itk::Point< TCoordRep, NPointDimension >::GetVnlVector | ( | ) |
Get a vnl_vector_ref referencing the same memory block
vnl_vector< TCoordRep > itk::Point< TCoordRep, NPointDimension >::GetVnlVector | ( | ) | const |
Get a vnl_vector with a copy of the internal memory block.
|
inline |
Compare two points for inequality.
Definition at line 120 of file itkPoint.h.
Self itk::Point< TCoordRep, NPointDimension >::operator+ | ( | const VectorType & | vec | ) | const |
Add a vector to a point. Return a new point.
const Self& itk::Point< TCoordRep, NPointDimension >::operator+= | ( | const VectorType & | vec | ) |
Point operator+=. Adds a vector to the current point.
VectorType itk::Point< TCoordRep, NPointDimension >::operator- | ( | const Self & | pnt | ) | const |
Computes the Vector difference between two points
Self itk::Point< TCoordRep, NPointDimension >::operator- | ( | const VectorType & | vec | ) | const |
Subtract a vector from a point. Return a new point.
const Self& itk::Point< TCoordRep, NPointDimension >::operator-= | ( | const VectorType & | vec | ) |
Point operator-=. Subtracts a vector from a current point.
|
default |
|
default |
Point& itk::Point< TCoordRep, NPointDimension >::operator= | ( | const ValueType | r[NPointDimension] | ) |
Pass-through assignment operator for a plain array.
|
inline |
Compare two points for equality.
Definition at line 109 of file itkPoint.h.
void itk::Point< TCoordRep, NPointDimension >::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 .
void itk::Point< TCoordRep, NPointDimension >::SetToBarycentricCombination | ( | const Self & | A, |
const Self & | B, | ||
const Self & | C, | ||
double | weightA, | ||
double | weightB | ||
) |
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.
void itk::Point< TCoordRep, NPointDimension >::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:
void itk::Point< TCoordRep, NPointDimension >::SetToMidPoint | ( | const Self & | , |
const Self & | |||
) |
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.
|
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 246 of file itkPoint.h.
|
static |
Dimension of the Space
Definition at line 67 of file itkPoint.h.