25 #include "vnl/vnl_vector_ref.h"
51 template<
typename TCoordRep,
unsigned int NPo
intDimension = 3 >
76 {
return NPointDimension; }
85 template<
typename TPo
intValueType >
87 template<
typename TPo
intValueType >
90 template<
typename TPo
intValueType >
106 for (
unsigned int i = 0; i < NPointDimension && same; ++i )
117 for (
unsigned int i = 0; i < NPointDimension && same; ++i )
152 itkLegacyMacro(vnl_vector< TCoordRep > Get_vnl_vector(
void)
const);
212 double weightA,
double weightB);
232 template<
typename TCoordRepB >
235 for (
unsigned int i = 0; i < NPointDimension; i++ )
237 ( *this )[i] =
static_cast< TCoordRep
>( pa[i] );
246 template<
typename TCoordRepB >
251 for (
unsigned int i = 0; i < NPointDimension; i++ )
254 const RealType difference =
static_cast< RealType >( ( *this )[i] ) - component;
255 sum += difference * difference;
263 template<
typename TCoordRepB >
266 const double distance = std::sqrt(
269 return static_cast< RealType >( distance );
273 template<
typename T,
unsigned int NPo
intDimension >
275 const Point< T, NPointDimension > & v);
277 template<
typename T,
unsigned int NPo
intDimension >
279 Point< T, NPointDimension > & v);
306 template<
typename TPo
intContainer,
typename TWeightContainer >
325 #ifndef ITK_MANUAL_INSTANTIATION
326 #include "itkPoint.hxx"
void CastFrom(const Point< TCoordRepB, NPointDimension > &pa)
bool operator==(const Self &pt) const
void SetToBarycentricCombination(const Self &A, const Self &B, double alpha)
static const unsigned int PointDimension
VectorType GetVectorFromOrigin() const
SpacePrecisionType ValueType
vnl_vector_ref< TCoordRep > GetVnlVector()
Point(const TPointValueType r[NPointDimension])
std::istream & operator>>(std::istream &is, Point< T, NPointDimension > &v)
Point(const Point< TPointValueType, NPointDimension > &r)
Computes the barycentric combination of an array of N points.
TWeightContainer WeightContainerType
std::ostream & operator<<(std::ostream &os, const Array< TValue > &arr)
PointContainerType::Pointer PointContainerPointer
bool ExactlyEquals(const TInput1 &x1, const TInput2 &x2)
Return the result of an exact comparison between two scalar values of potetially different types...
BaseArray::ConstIterator ConstIterator
BaseArray::Iterator Iterator
Point(const TPointValueType &v)
Simulate a standard C array with copy semnatics.
FixedArray< TCoordRep, NPointDimension > BaseArray
itkLegacyMacro(vnl_vector_ref< TCoordRep > Get_vnl_vector(void))
const Self & operator-=(const VectorType &vec)
VectorType operator-(const Self &pnt) const
A templated class holding a n-Dimensional vector.
PointContainerType::Element PointType
Vector< ValueType, NPointDimension > VectorType
bool operator!=(const Self &pt) const
NumericTraits< ValueType >::RealType RealType
Point(const ValueType r[NPointDimension])
~BarycentricCombination()
FixedArray< TCoordRep, NPointDimension > Superclass
void SetToMidPoint(const Self &, const Self &)
Point(const ValueType &v)
static unsigned int GetPointDimension()
TPointContainer PointContainerType
static PointType Evaluate(const PointContainerPointer &points, const WeightContainerType &weights)
const Self & operator+=(const VectorType &vec)
RealType SquaredEuclideanDistanceTo(const Point< TCoordRepB, NPointDimension > &pa) const
RealType EuclideanDistanceTo(const Point< TCoordRepB, NPointDimension > &pa) const
A templated class holding a geometric point in n-Dimensional space.
Point & operator=(const Self &r)
Self operator+(const VectorType &vec) const
const ValueType * ConstIterator