18 #ifndef itkSpatialObjectPoint_h
19 #define itkSpatialObjectPoint_h
24 #include "vnl/vnl_vector_fixed.h"
39 template <
unsigned int TDimension,
class TSpatialObjectPo
intType>
40 class PointBasedSpatialObject;
42 template<
unsigned int TPo
intDimension = 3>
71 { m_PositionInObjectSpace = newPositionInObjectSpace; }
73 template <
typename... TCoordinate>
75 const double firstCoordinate,
76 const TCoordinate... otherCoordinate)
78 static_assert((1 +
sizeof...(otherCoordinate)) == TPointDimension,
79 "The number of coordinates must be equal to the dimensionality!");
80 const double coordinates[] =
82 firstCoordinate,
static_cast<double>(otherCoordinate)...
84 m_PositionInObjectSpace = coordinates;
89 {
return m_PositionInObjectSpace; }
92 { m_SpatialObject = so; }
96 void SetPositionInWorldSpace(
const PointType & point );
100 PointType GetPositionInWorldSpace()
const;
113 void SetColor(
double r,
double g,
double b,
double a = 1);
117 { m_Color.SetRed( r ); }
120 {
return m_Color.GetRed(); }
124 { m_Color.SetGreen( g ); }
127 {
return m_Color.GetGreen(); }
131 { m_Color.SetBlue( b ); }
134 {
return m_Color.GetBlue(); }
138 { m_Color.SetAlpha( a ); }
141 {
return m_Color.GetAlpha(); }
145 { this->PrintSelf( os, 3 ); }
150 virtual void PrintSelf(std::ostream & os,
Indent indent)
const;
166 #ifndef ITK_MANUAL_INSTANTIATION
167 #include "itkSpatialObjectPoint.hxx"
170 #endif // itkSpatialObjectPoint_h
void SetPositionInObjectSpace(const PointType &newPositionInObjectSpace)
SpatialObjectType::Pointer m_SpatialObject
void SetColor(ColorType color)
void SetPositionInObjectSpace(const double firstCoordinate, const TCoordinate...otherCoordinate)
PointType m_PositionInObjectSpace
const PointType & GetPositionInObjectSpace() const
void SetSpatialObject(SpatialObjectType *so)
Implementation of the composite pattern.
vnl_vector< double > VectorType
Point used for spatial objets.
Control indentation during Print() invocation.
ImageBaseType::PointType PointType
ColorType GetColor() const
void Print(std::ostream &os) const