25 #include "vnl/vnl_vector_ref.h"
50 template<
class TCoordRep,
unsigned int NPo
intDimension = 3 >
75 {
return NPointDimension; }
84 template<
class TPo
intValueType >
101 for (
unsigned int i = 0; i < NPointDimension && same; i++ )
102 { same = ( ( *this )[i] == pt[i] ); }
112 for (
unsigned int i = 0; i < NPointDimension && same; i++ )
113 { same = ( ( *this )[i] == pt[i] ); }
207 double weightA,
double weightB);
227 template<
typename TCoordRepB >
230 for (
unsigned int i = 0; i < NPointDimension; i++ )
232 ( *this )[i] =
static_cast< TCoordRep
>( pa[i] );
241 template<
typename TCoordRepB >
246 for (
unsigned int i = 0; i < NPointDimension; i++ )
249 const RealType difference =
static_cast< RealType >( ( *this )[i] ) - component;
250 sum += difference * difference;
258 template<
typename TCoordRepB >
261 const double distance = vcl_sqrt(
264 return static_cast< RealType >( distance );
268 template<
class T,
unsigned int NPo
intDimension >
269 ITK_EXPORT std::ostream &
operator<<(std::ostream & os,
270 const Point< T, NPointDimension > & v);
272 template<
class T,
unsigned int NPo
intDimension >
273 ITK_EXPORT std::istream &
operator>>(std::istream & is,
274 Point< T, NPointDimension > & v);
301 template<
class TPo
intContainer,
class TWeightContainer >
321 #define ITK_TEMPLATE_Point(_, EXPORT, TypeX, TypeY) \
324 _( 2 ( class EXPORT Point< ITK_TEMPLATE_2 TypeX > ) ) \
325 _( 1 ( EXPORT std::ostream & operator<<(std::ostream &, \
326 const Point< ITK_TEMPLATE_2 TypeX > &) ) ) \
327 _( 1 ( EXPORT std::istream & operator>>(std::istream &, \
328 Point< ITK_TEMPLATE_2 TypeX > &) ) ) \
329 namespace Templates \
331 typedef Point< ITK_TEMPLATE_2 TypeX > Point##TypeY; \
335 #if ITK_TEMPLATE_EXPLICIT
336 #include "Templates/itkPoint+-.h"
340 #include "itkPoint.hxx"