22 #include <nlohmann/json.hpp>
37 template <
class TCoordRep,
unsigned int NPo
intDimension = 3>
38 class Point :
public itk::Point<TCoordRep, NPointDimension>
44 template <
typename TPo
intValueType>
49 template <
typename TPo
intValueType>
50 explicit Point(
const TPointValueType r[NPointDimension]) :
itk::
Point<TCoordRep, NPointDimension>(r)
54 template <
typename TPo
intValueType>
55 explicit Point(
const TPointValueType &v) :
itk::
Point<TCoordRep, NPointDimension>(v)
60 :
itk::
Point<TCoordRep, NPointDimension>(r)
66 :
itk::
Point<TCoordRep, NPointDimension>(p)
76 template <
typename ArrayType>
79 itk::FixedArray<TCoordRep, NPointDimension> *thisP =
80 dynamic_cast<itk::FixedArray<TCoordRep, NPointDimension> *
>(
this);
81 mitk::FillArray<ArrayType, TCoordRep, NPointDimension>(*thisP, array);
89 template <
typename ArrayType>
92 mitk::ToArray<ArrayType, TCoordRep, NPointDimension>(array, *
this);
96 template <
class TCoordRep,
unsigned int NPo
intDimension>
99 j = nlohmann::json::array();
101 for (
size_t i = 0; i < NPointDimension; ++i)
105 template <
class TCoordRep,
unsigned int NPo
intDimension>
108 for (
size_t i = 0; i < NPointDimension; ++i)
109 j.at(i).get_to(p[i]);
129 template <
typename TCoordRep,
unsigned int NPo
intDimension>
130 inline bool Equal(
const itk::Point<TCoordRep, NPointDimension> &point1,
131 const itk::Point<TCoordRep, NPointDimension> &point2,
133 bool verbose =
false)
136 typename itk::Point<TCoordRep, NPointDimension>::VectorType diff = point1 - point2;
137 for (
unsigned int i = 0; i < NPointDimension; i++)