21 #ifndef MIRTK_LinearFreeFormTransformation4D_H 22 #define MIRTK_LinearFreeFormTransformation4D_H 24 #include "mirtk/FreeFormTransformation4D.h" 25 #include "mirtk/LinearInterpolateImageFunction4D.h" 34 class BSplineFreeFormTransformation4D;
67 double,
double,
double,
double,
68 double,
double,
double,
double,
69 double *,
double *,
double *);
73 double = -1,
double = -1,
double = -1,
double = -1);
77 double,
double,
double,
double);
94 virtual void ApproximateDOFs(
const double *,
const double *,
const double *,
const double *,
95 const double *,
const double *,
const double *,
int);
102 const double *,
const double *,
const double *,
int,
103 double *,
double = 1.0)
const;
107 virtual void Interpolate(
const double *,
const double *,
const double *);
118 virtual void BoundingBox(
int,
double &,
double &,
double = 1)
const;
123 virtual void BoundingBox(
int,
double &,
double &,
double &,
124 double &,
double &,
double &,
double = 1)
const;
129 virtual void BoundingBox(
int,
double &,
double &,
double &,
double &,
130 double &,
double &,
double &,
double &,
double = 1)
const;
136 void Evaluate(
double &,
double &,
double &,
double)
const;
148 virtual void LocalTransform(
double &,
double &,
double &,
double,
double = 1)
const;
151 virtual bool LocalInverse(
double &,
double &,
double &,
double,
double = 1)
const;
164 virtual void JacobianDOFs(
double [3],
int,
int,
int,
int,
double,
double,
double,
double)
const;
181 virtual double BendingEnergy(
bool =
false,
bool =
true)
const;
185 virtual void BendingEnergyGradient(
double *,
double = NaN,
bool =
false,
bool =
true,
bool =
true)
const;
214 x = d.
_x, y = d.
_y, z = d.
_z;
222 x = d.
_x, y = d.
_y, z = d.
_z;
234 double dx = x, dy = y, dz = z;
240 x += dx, y += dy, z += dz;
248 double dx = x, dy = y, dz = z;
254 x -= dx, y -= dy, z -= dz;
281 ::JacobianDOFs(
double jac[3],
int ci,
int cj,
int ck,
int cl,
double x,
double y,
double z,
double t)
const 287 const double dx = abs(ci - x);
288 const double dy = abs(cj - y);
289 const double dz = abs(ck - z);
290 const double dt = abs(cl - t);
291 if (dx < 1.0 && dy < 1.0 && dz < 1.0 && dt < 1.0) {
292 jac[0] = jac[1] = jac[2] = (1.0 - dx) * (1.0 - dy) * (1.0 - dz) * (1.0 - dt);
294 jac[0] = jac[1] = jac[3] = .0;
301 #endif // MIRTK_LinearFreeFormTransformation4D_H
virtual VoxelType GetInside(double, double, double, double) const