21 #ifndef MIRTK_LinearFreeFormTransformation3D_H 22 #define MIRTK_LinearFreeFormTransformation3D_H 24 #include "mirtk/FreeFormTransformation3D.h" 25 #include "mirtk/LinearInterpolateImageFunction.h" 34 class BSplineFreeFormTransformation3D;
67 double,
double,
double,
68 double,
double,
double,
69 double *,
double *,
double *);
73 double = -1,
double = -1,
double = -1);
77 double,
double,
double);
97 virtual void ApproximateDOFs(
const double *,
const double *,
const double *,
const double *,
98 const double *,
const double *,
const double *,
int);
105 const double *,
const double *,
const double *,
int,
106 double *,
double = 1.0)
const;
110 virtual void Interpolate(
const double *,
const double *,
const double *);
119 virtual void BoundingBox(
int,
double &,
double &,
double &,
120 double &,
double &,
double &,
double = 1)
const;
126 void Evaluate(
double &,
double &,
double &,
int,
int,
int)
const;
129 void Evaluate(
double &,
double &,
double &)
const;
138 virtual void LocalTransform(
double &,
double &,
double &,
double = 0,
double = NaN)
const;
141 virtual bool LocalInverse(
double &,
double &,
double &,
double = 0,
double = NaN)
const;
149 virtual void LocalJacobian(
Matrix &,
double,
double,
double,
double = 0,
double = NaN)
const;
152 virtual void JacobianDOFs(
double [3],
int,
int,
int,
double,
double,
double)
const;
169 virtual double BendingEnergy(
bool =
false,
bool =
true)
const;
173 virtual void BendingEnergyGradient(
double *,
double = 1,
bool =
false,
bool =
true,
bool =
true)
const;
209 ::Evaluate(
double &x,
double &y,
double &z,
int i,
int j,
int k)
const 212 x = d.
_x, y = d.
_y, z = d.
_z;
220 x = d.
_x, y = d.
_y, z = d.
_z;
232 double dx = x, dy = y, dz = z;
237 x += dx, y += dy, z += dz;
245 double dx = x, dy = y, dz = z;
250 x -= dx, y -= dy, z -= dz;
276 ::JacobianDOFs(
double jac[3],
int ci,
int cj,
int ck,
double x,
double y,
double z)
const 281 const double dx = abs(ci - x);
282 const double dy = abs(cj - y);
283 const double dz = abs(ck - z);
284 if (dx < 1.0 && dy < 1.0 && dz < 1.0) {
285 jac[0] = jac[1] = jac[2] = (1.0 - dx) * (1.0 - dy) * (1.0 - dz);
287 jac[0] = jac[1] = jac[3] = .0;
294 #endif // MIRTK_LinearFreeFormTransformation3D_H