25 #include "vnl/vnl_vector_ref.h"
50 template<
typename TCoordRep,
unsigned int NPo
intDimension = 3 >
75 {
return NPointDimension; }
84 template<
typename TPo
intValueType >
86 template<
typename TPo
intValueType >
89 template<
typename TPo
intValueType >
105 for (
unsigned int i = 0; i < NPointDimension && same; i++ )
106 { same = ( ( *this )[i] == pt[i] ); }
116 for (
unsigned int i = 0; i < NPointDimension && same; i++ )
117 { same = ( ( *this )[i] == pt[i] ); }
151 itkLegacyMacro(vnl_vector< TCoordRep > Get_vnl_vector(
void)
const);
211 double weightA,
double weightB);
231 template<
typename TCoordRepB >
234 for (
unsigned int i = 0; i < NPointDimension; i++ )
236 ( *this )[i] =
static_cast< TCoordRep
>( pa[i] );
245 template<
typename TCoordRepB >
250 for (
unsigned int i = 0; i < NPointDimension; i++ )
253 const RealType difference =
static_cast< RealType >( ( *this )[i] ) - component;
254 sum += difference * difference;
262 template<
typename TCoordRepB >
265 const double distance = std::sqrt(
268 return static_cast< RealType >( distance );
272 template<
typename T,
unsigned int NPo
intDimension >
274 const Point< T, NPointDimension > & v);
276 template<
typename T,
unsigned int NPo
intDimension >
278 Point< T, NPointDimension > & v);
305 template<
typename TPo
intContainer,
typename TWeightContainer >
324 #ifndef ITK_MANUAL_INSTANTIATION
325 #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
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
vnl_vector_ref< TCoordRep > GetVnlVector(void)
std::ostream & operator<<(std::ostream &os, const Array< TValue > &arr)
PointContainerType::Pointer PointContainerPointer
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)
Define additional traits for native types such as int or float.
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