21 #ifndef MIRTK_MultiLevelTransformation_H 22 #define MIRTK_MultiLevelTransformation_H 24 #include "mirtk/Transformation.h" 25 #include "mirtk/RigidTransformation.h" 26 #include "mirtk/AffineTransformation.h" 27 #include "mirtk/FreeFormTransformation.h" 36 const int MAX_TRANS = 200;
108 int = 1,
double = .0);
117 virtual double Approximate(
const double *,
const double *,
const double *,
118 double *,
double *,
double *,
int,
119 int = 1,
double = .0);
128 virtual double Approximate(
const double *,
const double *,
const double *,
const double *,
129 double *,
double *,
double *,
int,
130 int = 1,
double = .0);
140 int = 1,
double = .0);
149 virtual double ApproximateAsNew(
const double *,
const double *,
const double *,
150 double *,
double *,
double *,
int,
151 int = 1,
double = .0);
160 virtual double ApproximateAsNew(
const double *,
const double *,
const double *,
const double *,
161 double *,
double *,
double *,
int,
162 int = 1,
double = .0);
167 virtual void ApproximateDOFs(
const double *,
const double *,
const double *,
const double *,
168 const double *,
const double *,
const double *,
int);
175 const double *,
const double *,
const double *,
int,
176 double *,
double = 1.0)
const;
192 virtual void Put(
int,
double);
204 virtual double Get(
int)
const;
222 virtual void Reset();
225 virtual void Clear();
234 virtual bool Set(
const char *,
const char *);
329 virtual void GlobalTransform(
double &,
double &,
double &,
double = 0,
double = NaN)
const;
332 virtual void LocalTransform(
int,
int,
double &,
double &,
double &,
double = 0,
double = NaN)
const;
335 virtual void LocalTransform(
int,
double &,
double &,
double &,
double = 0,
double = NaN)
const;
338 virtual void LocalTransform(
double &,
double &,
double &,
double = 0,
double = NaN)
const;
341 virtual void Transform(
int,
int,
double &,
double &,
double &,
double = 0,
double = NaN)
const = 0;
344 virtual void Transform(
int,
double &,
double &,
double &,
double = 0,
double = NaN)
const;
347 virtual void Transform(
double &,
double &,
double &,
double = 0,
double = NaN)
const;
350 virtual void Transform(
int,
int,
Point &,
double = 0,
double = NaN)
const;
353 virtual void Transform(
int,
Point &,
double = 0,
double = NaN)
const;
362 virtual void LocalDisplacement(
int,
int,
double &,
double &,
double &,
double = 0,
double = NaN)
const;
365 virtual void LocalDisplacement(
int,
double &,
double &,
double &,
double = 0,
double = NaN)
const;
368 virtual void Displacement(
int,
int,
double &,
double &,
double &,
double = 0,
double = NaN)
const;
371 virtual void Displacement(
int,
double &,
double &,
double &,
double = 0,
double = NaN)
const;
440 virtual void GlobalInverse(
double &,
double &,
double &,
double = 0,
double = NaN)
const;
443 virtual bool LocalInverse(
int,
int,
double &,
double &,
double &,
double = 0,
double = NaN)
const;
446 virtual bool LocalInverse(
int,
double &,
double &,
double &,
double = 0,
double = NaN)
const;
449 virtual bool LocalInverse(
double &,
double &,
double &,
double = 0,
double = NaN)
const;
452 virtual bool Inverse(
int,
int,
double &,
double &,
double &,
double = 0,
double = NaN)
const;
455 virtual bool Inverse(
int,
double &,
double &,
double &,
double = 0,
double = NaN)
const;
458 virtual bool Inverse(
double &,
double &,
double &,
double = 0,
double = NaN)
const;
467 virtual bool InverseDisplacement(
int,
int,
double &,
double &,
double &,
double = 0,
double = NaN)
const;
470 virtual bool InverseDisplacement(
int,
double &,
double &,
double &,
double = 0,
double = NaN)
const;
550 virtual void LocalJacobian(
int,
Matrix &,
double,
double,
double,
double = 0,
double = NaN)
const;
553 virtual void LocalJacobian(
Matrix &,
double,
double,
double,
double = 0,
double = NaN)
const;
556 virtual void Jacobian(
int,
int,
Matrix &,
double,
double,
double,
double = 0,
double = NaN)
const;
559 virtual void Jacobian(
int,
Matrix &,
double,
double,
double,
double = 0,
double = NaN)
const;
562 virtual void Jacobian(
Matrix &,
double,
double,
double,
double = 0,
double = NaN)
const;
565 virtual double LocalJacobian(
int,
double,
double,
double,
double = 0,
double = NaN)
const;
568 virtual double Jacobian(
int,
int,
double,
double,
double,
double = 0,
double = NaN)
const;
571 virtual double Jacobian(
int,
double,
double,
double,
double = 0,
double = NaN)
const;
574 virtual void GlobalHessian(
Matrix [3],
double,
double,
double,
double = 0,
double = NaN)
const;
577 virtual void LocalHessian(
int,
Matrix [3],
double,
double,
double,
double = 0,
double = NaN)
const;
580 virtual void LocalHessian(
Matrix [3],
double,
double,
double,
double = 0,
double = NaN)
const;
583 virtual void Hessian(
int,
int,
Matrix [3],
double,
double,
double,
double = 0,
double = NaN)
const;
586 virtual void Hessian(
int,
Matrix [3],
double,
double,
double,
double = 0,
double = NaN)
const;
589 virtual void Hessian(
Matrix [3],
double,
double,
double,
double = 0,
double = NaN)
const;
592 virtual void JacobianDOFs(
double [3],
int,
double,
double,
double,
double = 0,
double = NaN)
const;
601 virtual double BendingEnergy(
int,
int,
double,
double,
double,
double = 0,
double = NaN,
bool =
true)
const;
604 virtual double BendingEnergy(
int,
double,
double,
double,
double = 0,
double = NaN,
bool =
true)
const;
607 virtual double BendingEnergy(
double,
double,
double,
double = 0,
double = NaN,
bool =
true)
const;
640 mirtkAssert(idx >= 0,
"DoF index must be positive");
649 mirtkAssert(
false,
"DoF index out-of-bounds");
657 mirtkAssert(idx >= 0,
"DoF index must be positive");
666 mirtkAssert(
false,
"DoF index out-of-bounds");
771 double x1 = x, y1 = y, z1 = z;
772 double x2 = x, y2 = y, z2 = z;
774 this->
Transform(-1, n, x2, y2, z2, t, t0);
822 for (
int i = 0; i < pset.
Size(); i++) this->
Transform(l, n, pset(i), t, t0);
935 double x1 = x, y1 = y, z1 = z;
936 double x2 = x, y2 = y, z2 = z;
938 bool ok = this->
Inverse(-1, n, x2, y2, z2, t, t0);
944 return this->
Inverse(m, n, x, y, z, t, t0);
963 return this->
Inverse(-1, n, x, y, z, t, t0);
969 return this->
Inverse(-1, x, y, z, t, t0);
1001 bool ok = this->
Inverse(l, n, x, y, z, t, t0);
1047 cerr << this->
NameOfClass() <<
"::Jacobian(int, int, ...): Not implemented" << endl;
1054 this->
Jacobian(-1, n, jac, x, y, z, t, t0);
1060 this->
Jacobian(-1, -1, jac, x, y, z, t, t0);
1072 this->
Jacobian(0, n, jac, x, y, z, t, t0);
1078 this->
Jacobian(0, -1, jac, x, y, z, t, t0);
1085 this->
Jacobian(m, n, jac, x, y, z, t, t0);
1092 return this->
Jacobian(-1, n, x, y, z, t, t0);
1098 return this->
Jacobian(0, n, x, y, z, t, t0);
1104 cerr << this->
NameOfClass() <<
"::Hessian(int, int,...): Not implemented" << endl;
1111 this->
Hessian(-1, n, hessian, x, y, z, t, t0);
1117 this->
Hessian(-1, -1, hessian, x, y, z, t, t0);
1129 this->
Hessian(0, n, hessian, x, y, z, t, t0);
1135 this->
Hessian(0, -1, hessian, x, y, z, t, t0);
1141 cerr << this->
NameOfClass() <<
"::DeriveJacobianWrtDOF: Not implemented" << endl;
1152 double bending = .0;
1153 const int l1 = (m < 0 ? 0 : m);
1155 for (
int l = l1; l < l2; ++l) {
1164 return this->
BendingEnergy(0, n, x, y, z, t, t0, wrt_world);
1170 return this->
BendingEnergy(0, -1, x, y, z, t, t0, wrt_world);
1176 #endif // MIRTK_MultiLevelTransformation_H
double Det3x3() const
Calculate determinant of a 3x3 matrix.
double _x
x coordinate of Point
Array< Pair< string, string > > ParameterList
Ordered list of parameter name/value pairs.
Status
Enumeration of common states for entities such as objective function parameters.
double GetTOrigin() const
Get temporal origin.
virtual const char * NameOfClass() const =0
Get name of class, which this object is an instance of.
double _z
z coordinate of Point
double _y
y coordinate of Point