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] ); }
117 CLANG_SUPPRESS_Wfloat_equal
118 for (
unsigned int i = 0; i < NPointDimension && same; ++i )
119 { same = ( ( *this )[i] == pt[i] ); }
154 itkLegacyMacro(vnl_vector< TCoordRep > Get_vnl_vector(
void)
const);
214 double weightA,
double weightB);
234 template<
typename TCoordRepB >
237 for (
unsigned int i = 0; i < NPointDimension; i++ )
239 ( *this )[i] =
static_cast< TCoordRep
>( pa[i] );
248 template<
typename TCoordRepB >
253 for (
unsigned int i = 0; i < NPointDimension; i++ )
256 const RealType difference =
static_cast< RealType >( ( *this )[i] ) - component;
257 sum += difference * difference;
265 template<
typename TCoordRepB >
268 const double distance = std::sqrt(
271 return static_cast< RealType >( distance );
275 template<
typename T,
unsigned int NPo
intDimension >
277 const Point< T, NPointDimension > & v);
279 template<
typename T,
unsigned int NPo
intDimension >
281 Point< T, NPointDimension > & v);
308 template<
typename TPo
intContainer,
typename TWeightContainer >
327 #ifndef ITK_MANUAL_INSTANTIATION
328 #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
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