18#ifndef itkSpatialObjectPoint_h
19#define itkSpatialObjectPoint_h
24#include "vnl/vnl_vector_fixed.h"
40template <
unsigned int TDimension,
class TSpatialObjectPo
intType>
43template <
unsigned int TPo
intDimension = 3>
91 template <
typename... TCoordinate>
95 static_assert((1 +
sizeof...(otherCoordinate)) == TPointDimension,
96 "The number of coordinates must be equal to the dimensionality!");
97 const double coordinates[] = { firstCoordinate,
static_cast<double>(otherCoordinate)... };
145 SetColor(
double r,
double g,
double b,
double a = 1);
208 std::map<std::string, double> &
211 const std::map<std::string, double> &
250#ifndef ITK_MANUAL_INSTANTIATION
251# include "itkSpatialObjectPoint.hxx"
Control indentation during Print() invocation.
This class serves as the base class for point-based spatial objects.
A templated class holding a geometric point in n-Dimensional space.
Represent Red, Green, Blue and Alpha components for color images.
const std::map< std::string, double > & GetTagScalarDictionary() const
void SetColor(ColorType color)
virtual ~SpatialObjectPoint()=default
bool GetTagScalarValue(const std::string &tag, double &value) const
double GetTagScalarValue(const std::string &tag) const
ColorType GetColor() const
WeakPointer< SpatialObjectType > m_SpatialObject
std::map< std::string, double > m_ScalarDictionary
ITK_DEFAULT_COPY_AND_MOVE(SpatialObjectPoint)
void SetPositionInObjectSpace(const double firstCoordinate, const TCoordinate... otherCoordinate)
std::map< std::string, double > & GetTagScalarDictionary()
void SetTagScalarValue(const std::string &tag, double value)
unsigned int PointDimensionType
void SetPositionInObjectSpace(const PointType &newPositionInObjectSpace)
static constexpr PointDimensionType PointDimension
RGBAPixel< double > ColorType
void SetColor(double r, double g, double b, double a=1)
PointType m_PositionInObjectSpace
PointType GetPositionInWorldSpace() const
void Print(std::ostream &os) const
void SetPositionInWorldSpace(const PointType &point)
SpatialObjectType * GetSpatialObject() const
const PointType & GetPositionInObjectSpace() const
virtual void PrintSelf(std::ostream &os, Indent indent) const
SpatialObject< TPointDimension > SpatialObjectType
void SetTagScalarDictionary(const std::map< std::string, double > &dict)
void SetSpatialObject(SpatialObjectType *so)
vnl_vector< double > VectorType
Point< double, TPointDimension > PointType
Implementation of the composite pattern.
Implements a weak reference to an object.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
*par Constraints *The filter image with at least two dimensions and a vector *length of at least The theory supports extension to scalar but *the implementation of the itk vector classes do not **The template parameter TRealType must be floating point(float or double) or *a user-defined "real" numerical type with arithmetic operations defined *sufficient to compute derivatives. **\par Performance *This filter will automatically multithread if run with *SetUsePrincipleComponents