21 #ifndef MIRTK_BSplineFreeFormTransformation3D_H 22 #define MIRTK_BSplineFreeFormTransformation3D_H 24 #include "mirtk/FreeFormTransformation3D.h" 26 #include "mirtk/FastCubicBSplineInterpolateImageFunction2D.h" 27 #include "mirtk/FastCubicBSplineInterpolateImageFunction3D.h" 92 double,
double,
double,
93 double,
double,
double,
94 double *,
double *,
double *);
98 double = -1,
double = -1,
double = -1);
102 double,
double,
double);
120 virtual bool Set(
const char *,
const char *);
133 const double *,
const double *,
const double *,
134 int,
double *,
double = 1.,
bool =
false)
const;
139 virtual void ApproximateDOFs(
const double *,
const double *,
const double *,
const double *,
140 const double *,
const double *,
const double *,
int);
147 const double *,
const double *,
const double *,
int,
148 double *,
double = 1.0)
const;
152 virtual void Interpolate(
const double *,
const double *,
const double * = NULL);
184 virtual void Subdivide(
bool =
true,
bool =
true,
bool =
true,
bool =
true);
189 virtual void BoundingBox(
int,
double &,
double &,
double &,
190 double &,
double &,
double &,
double = 1)
const;
196 void Evaluate(
double &,
double &,
double &,
int,
int)
const;
199 void Evaluate(
double &,
double &,
double &,
int,
int,
int)
const;
202 void Evaluate(
double &,
double &,
double &)
const;
234 double,
double,
double)
const;
242 double,
double,
double,
double)
const;
283 bool wrt_world =
true,
bool use_spacing =
true)
const;
295 bool wrt_world =
true,
bool use_spacing =
true)
const;
311 double x,
double y,
double z,
312 bool wrt_world =
true,
bool use_spacing =
true)
const;
325 double x,
double y,
double z,
326 bool wrt_world =
true,
bool use_spacing =
true)
const;
332 virtual void LocalTransform(
double &,
double &,
double &,
double = 0,
double = NaN)
const;
348 double t,
double t0 = -1,
363 virtual void LocalJacobian(
Matrix &,
double,
double,
double,
double = 0,
double = NaN)
const;
366 virtual void LocalHessian(
Matrix [3],
double,
double,
double,
double = 0,
double = NaN)
const;
369 virtual void JacobianDOFs(
double [3],
int,
int,
int,
double,
double,
double)
const;
386 int cp,
double x,
double y,
double z,
double = 0,
double = NaN,
387 bool wrt_world =
true,
bool use_spacing =
true)
const;
397 double = NaN,
double = 1)
const;
406 virtual double BendingEnergy(
double,
double,
double,
double = 0,
double = NaN,
bool =
true)
const;
409 virtual double BendingEnergy(
bool =
false,
bool =
true)
const;
416 virtual void BendingEnergyGradient(
double *,
double = 1,
bool =
false,
bool =
true,
bool =
true)
const;
450 default: str =
"Unknown";
break;
460 if (lstr ==
"default") {
462 }
else if (lstr ==
"analytic" || lstr ==
"exact") {
464 }
else if (lstr ==
"convolution") {
466 }
else if (lstr ==
"dmffd" || lstr ==
"directlymanipulated" || lstr ==
"directly manipulated" || lstr ==
"approximation") {
483 x = d.
_x, y = d.
_y, z = d.
_z;
491 x = d.
_x, y = d.
_y, z = d.
_z;
524 double x,
double y,
double z)
const 534 double x,
double y,
double z,
double)
const 553 dJdp(0, dim) = dJdp(1, dim) = dJdp(2, dim) = val;
571 dJdp(0, dim) = dJdp(1, dim) = dJdp(2, dim) = val;
583 double dx = x, dy = y, dz = z;
588 x += dx, y += dy, z += dz;
629 ::JacobianDOFs(
double jac[3],
int ci,
int cj,
int ck,
double x,
double y,
double z)
const 654 int i,
int j,
int k,
double x,
double y,
double z,
655 bool wrt_world,
bool use_spacing)
const 663 int cp,
double x,
double y,
double z,
664 bool wrt_world,
bool use_spacing)
const 674 int cp,
double x,
double y,
double z,
double,
double,
675 bool wrt_world,
bool use_spacing)
const 686 #endif // MIRTK_BSplineFreeFormTransformation3D_H
static MIRTKCU_API TReal Weight(TReal)
Returns the value of the B-spline function.
static MIRTKCU_API TReal B_I(TReal)
Returns the 1st derivative value of the B-spline function.
static MIRTKCU_API TReal B(TReal)
Returns the value of the B-spline function.
virtual VoxelType GetInside(double, double, double=0, double=0) const
Array< Pair< string, string > > ParameterList
Ordered list of parameter name/value pairs.
void Initialize(int, int=-1, double *=NULL)
Initialize matrix with number of rows and columns.
string ToLower(const string &)
Convert string to lowercase letters.
virtual VoxelType GetInside(double, double, double, double=0) const
string ToString(const EnergyMeasure &value, int w, char c, bool left)
Convert energy measure enumeration value to string.
bool FromString(const char *str, EnergyMeasure &value)
Convert energy measure string to enumeration value.