20 #ifndef MIRTK_ImplicitSurfaceForce_H 21 #define MIRTK_ImplicitSurfaceForce_H 23 #include "mirtk/SurfaceForce.h" 25 #include "mirtk/LinearInterpolateImageFunction.h" 26 #include "mirtk/FastLinearImageGradientFunction.h" 68 mirtkPublicAttributeMacro(
double, Offset);
71 mirtkPublicAttributeMacro(
double, MinStepLength);
74 mirtkPublicAttributeMacro(
double, MaxDistance);
77 mirtkPublicAttributeMacro(
double, Tolerance);
82 mirtkPublicAttributeMacro(
int, DistanceSmoothing);
89 mirtkPublicAttributeMacro(
bool, FillInHoles);
92 ImageFunction _Distance;
95 ImageGradient _DistanceGradient;
143 double SelfDistance(
const double p[3],
const double n[3])
const;
150 double Distance(
const double p[3])
const;
160 double Distance(
const double p[3],
const double n[3])
const;
167 void DistanceGradient(
const double p[3],
double g[3],
bool normalize =
false)
const;
208 int w,
char c,
bool left)
214 default: str =
"Unknown";
break;
227 else value = ImplicitSurfaceForce::DM_Unknown;
228 return (value != ImplicitSurfaceForce::DM_Unknown);
234 #endif // MIRTK_ImplicitSurfaceForce_H void DistanceGradient(const double p[3], double g[3], bool normalize=false) const
Implicit surface distance in normal direction.
void InitializeNormalDistances()
Initialize point data array used to store implicit surface distances in normal directions.
virtual bool SetWithoutPrefix(const char *, const char *)
Set parameter value from string.
Minimum implicit surface distance.
virtual ~ImplicitSurfaceForce()
Destructor.
ImplicitSurfaceForce & operator=(const ImplicitSurfaceForce &)
Assignment operator.
vtkDataArray * NormalDistances() const
Get pointer to point data array of implicit surface distances in normal directions.
virtual void Initialize()
Initialize force term once input and parameters have been set.
double Distance(const double p[3]) const
DistanceMeasureType
Enumeration of implicit surface distance measures.
Array< Pair< string, string > > ParameterList
Ordered list of parameter name/value pairs.
void UpdateDistances()
Update implicit surface distance measures.
virtual ParameterList Parameter() const
Get parameter name/value pairs.
void InitializeMinimumDistances()
Initialize point data array used to store minimum implicit surface distances.
double SelfDistance(const double p[3], const double n[3]) const
Get self-distance value at given world position along specified direction.
virtual ParameterList Parameter() const
Get parameter key/value as string map.
string ToLower(const string &)
Convert string to lowercase letters.
virtual bool SetWithPrefix(const char *, const char *)
Set parameter value from string.
vtkDataArray * Distances() const
Get pointer to point data array of implicit surface distances.
void UpdateMinimumDistances()
Update minimum distances to implicit surface.
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.
vtkDataArray * MinimumDistances() const
Get pointer to point data array of minimum implicit surface distances.
void UpdateNormalDistances()
Update distances from implicit surface in normal direction.
void InitializeDistances()
Initialize point data array used to store implicit surface distances.
ImplicitSurfaceForce(const char *="", double=1.0)
Constructor.