Public Member Functions | Protected Member Functions | List of all members
mirtk::ImplicitSurfaceDistance Class Reference

#include <ImplicitSurfaceDistance.h>

Inheritance diagram for mirtk::ImplicitSurfaceDistance:
Inheritance graph
Collaboration diagram for mirtk::ImplicitSurfaceDistance:
Collaboration graph

Public Member Functions

 ImplicitSurfaceDistance (const char *="", double=1.0)
 Constructor.
 
 ImplicitSurfaceDistance (const ImplicitSurfaceDistance &)
 Copy constructor.
 
virtual void Initialize ()
 Initialize force term once input and parameters have been set.
 
ImplicitSurfaceDistanceoperator= (const ImplicitSurfaceDistance &)
 Assignment operator.
 
virtual void Update (bool=true)
 Update moving input points and internal state of force term.
 
virtual ~ImplicitSurfaceDistance ()
 Destructor.
 
- Public Member Functions inherited from mirtk::ImplicitSurfaceForce
double Distance (const double p[3]) const
 
double Distance (const double p[3], const double n[3]) const
 
void DistanceGradient (const double p[3], double g[3], bool normalize=false) const
 
virtual ParameterList Parameter () const
 Get parameter name/value pairs.
 
double SelfDistance (const double p[3], const double n[3]) const
 Get self-distance value at given world position along specified direction.
 
virtual ~ImplicitSurfaceForce ()
 Destructor.
 
- Public Member Functions inherited from mirtk::SurfaceForce
double IntersectWithRay (const double p[3], const double e[3], double l=.0) const
 
double SelfDistance (const double p[3], const double n[3], double maxd=.0) const
 
virtual ~SurfaceForce ()
 Destructor.
 
- Public Member Functions inherited from mirtk::ExternalForce
virtual ~ExternalForce ()
 Destructor.
 
- Public Member Functions inherited from mirtk::PointSetForce
virtual void Reinitialize ()
 
virtual void WriteDataSets (const char *, const char *, bool=true) const
 Write input of force term.
 
virtual void WriteGradient (const char *, const char *) const
 Write gradient of force term.
 
virtual ~PointSetForce ()
 Destructor.
 
- Public Member Functions inherited from mirtk::EnergyTerm
virtual enum EnergyMeasure EnergyMeasure () const =0
 Energy measure implemented by this term.
 
void Gradient (double *gradient, double step)
 
virtual void GradientStep (const double *gradient, double &min, double &max) const
 
double InitialValue ()
 Returns initial value of energy term.
 
void NormalizedGradient (double *gradient, double step)
 
string Prefix (const char *=NULL) const
 Prefix to be used for debug output files.
 
virtual void Print (Indent=0) const
 Print debug information.
 
virtual double RawValue (double) const
 
double RawValue ()
 
void ResetInitialValue ()
 Reset initial value of energy term.
 
void ResetValue ()
 Reset cached value of energy term.
 
virtual bool Upgrade ()
 Update energy term after convergence.
 
double Value ()
 Evaluate energy term.
 
virtual ~EnergyTerm ()
 Destructor.
 
- Public Member Functions inherited from mirtk::Configurable
string DefaultName () const
 
virtual bool Set (const char *, const char *)
 Set parameter value from string.
 
virtual ~Configurable ()
 Destructor.
 
- Public Member Functions inherited from mirtk::Observable
void AddObserver (Observer &)
 Add observer.
 
void Broadcast (Event, const void *=NULL)
 Broadcast event to observers.
 
void ClearObservers ()
 Delete all observers.
 
void DeleteObserver (Observer &)
 Delete observer.
 
void NotifyObservers (Event, const void *=NULL)
 Notify all observers about given event if this object has changed.
 
int NumberOfObservers () const
 Number of current observers.
 
virtual ~Observable ()
 Destructor.
 
- Public Member Functions inherited from mirtk::Object
virtual const char * NameOfClass () const =0
 Get name of class, which this object is an instance of.
 
bool Parameter (const ParameterList &)
 Set parameters from name/value pairs.
 
virtual ~Object ()
 Destructor.
 

Protected Member Functions

virtual double Evaluate ()
 Evaluate external force term.
 
virtual void EvaluateGradient (double *, double, double)
 Evaluate external force.
 
void UpdateMagnitude ()
 Update force magnitude at surface points.
 
- Protected Member Functions inherited from mirtk::ImplicitSurfaceForce
vtkDataArray * Distances () const
 Get pointer to point data array of implicit surface distances.
 
 ImplicitSurfaceForce (const char *="", double=1.0)
 Constructor.
 
 ImplicitSurfaceForce (const ImplicitSurfaceForce &)
 Copy constructor.
 
void InitializeDistances ()
 Initialize point data array used to store implicit surface distances.
 
void InitializeMinimumDistances ()
 Initialize point data array used to store minimum implicit surface distances.
 
void InitializeNormalDistances ()
 Initialize point data array used to store implicit surface distances in normal directions.
 
vtkDataArray * MinimumDistances () const
 Get pointer to point data array of minimum implicit surface distances.
 
vtkDataArray * NormalDistances () const
 Get pointer to point data array of implicit surface distances in normal directions.
 
ImplicitSurfaceForceoperator= (const ImplicitSurfaceForce &)
 Assignment operator.
 
virtual bool SetWithoutPrefix (const char *, const char *)
 Set parameter value from string.
 
virtual bool SetWithPrefix (const char *, const char *)
 Set parameter value from string.
 
void UpdateDistances ()
 Update implicit surface distance measures.
 
void UpdateMinimumDistances ()
 Update minimum distances to implicit surface.
 
void UpdateNormalDistances ()
 Update distances from implicit surface in normal direction.
 
- Protected Member Functions inherited from mirtk::SurfaceForce
void CopyAttributes (const SurfaceForce &)
 Copy attributes of this class from another instance.
 
SurfaceForceoperator= (const SurfaceForce &)
 Assignment operator.
 
 SurfaceForce (const char *="", double=1.0)
 Constructor.
 
 SurfaceForce (const SurfaceForce &)
 Copy constructor.
 
- Protected Member Functions inherited from mirtk::ExternalForce
void CopyAttributes (const ExternalForce &)
 Copy attributes of this class from another instance.
 
 ExternalForce (const char *="", double=1.0)
 Constructor.
 
 ExternalForce (const ExternalForce &)
 Copy constructor.
 
ExternalForceoperator= (const ExternalForce &)
 Assignment operator.
 
- Protected Member Functions inherited from mirtk::PointSetForce
void AddPointData (const char *name, vtkSmartPointer< vtkDataArray > &data, bool global=false)
 
vtkDataArray * AddPointData (const char *name, int c=1, int type=VTK_FLOAT, bool global=false)
 
void AllocateCount (int)
 Allocate _Count memory.
 
void AllocateGradient (int)
 Allocate memory for (non-parametric) gradient.
 
void CopyAttributes (const PointSetForce &)
 Copy attributes of this class from another instance.
 
vtkPointSet * DeformedPointSet () const
 Get point set on which this force is acting on.
 
vtkPolyData * DeformedSurface () const
 Get point set on which this force is acting on.
 
const EdgeTableEdges () const
 Get edge table of point set mesh.
 
vtkSmartPointer< vtkPoints > GetInitialPoints () const
 Get initial points, possibly pre-transformed by global transformation.
 
void Init ()
 Common (re-)initialization steps of this class only (non-virtual function!)
 
vtkDataArray * InitialStatus () const
 Get initial point status array.
 
 mirtkAggregateMacro (int, Count)
 
 mirtkAttributeMacro (int, GradientSize)
 Size of gradient vector.
 
 mirtkAttributeMacro (int, CountSize)
 Size of count vector.
 
 mirtkAttributeMacro (bool, InitialUpdate)
 Whether Update has not been called since initialization.
 
 mirtkComponentMacro (GradientType, Gradient)
 Negative node forces/gradient of external force term.
 
 mirtkPublicAggregateMacro (RegisteredPointSet, PointSet)
 Transformed point set.
 
 mirtkPublicAttributeMacro (int, GradientAveraging)
 Number of gradient averaging iterations.
 
 mirtkPublicAttributeMacro (bool, AverageSignedGradients)
 
 mirtkPublicAttributeMacro (bool, AverageGradientMagnitude)
 Whether to only average the magnitude of the gradient vectors.
 
 mirtkReadOnlyAttributeMacro (bool, SurfaceForce)
 
 mirtkReadOnlyAttributeMacro (int, NumberOfPoints)
 Number of points.
 
const NodeNeighborsNeighbors (int=-1) const
 Get edge-connectivity table of point set node neighbors.
 
vtkDataArray * Normals () const
 Get point normals array.
 
PointSetForceoperator= (const PointSetForce &)
 Assignment operator.
 
vtkPointSet * OriginalPointSet () const
 Get point set on which this force is acting on.
 
vtkPolyData * OriginalSurface () const
 Get point set on which this force is acting on.
 
vtkPointData * PointData () const
 Get point data.
 
vtkDataArray * PointData (const char *name, bool optional=false) const
 
vtkPoints * Points () const
 Get points of point set on which this force is acting on.
 
 PointSetForce (const char *="", double=1.0)
 Constructor.
 
 PointSetForce (const PointSetForce &)
 Copy constructor.
 
void RemovePointData (const char *name)
 
SharedPtr< const EdgeTableSharedEdgeTable () const
 Get edge table of point set mesh.
 
vtkDataArray * Status () const
 Get point status array.
 
- Protected Member Functions inherited from mirtk::EnergyTerm
 EnergyTerm (const char *="", double=1.0)
 Constructor.
 
 EnergyTerm (const EnergyTerm &)
 Copy constructor.
 
EnergyTermoperator= (const EnergyTerm &)
 Assignment operator.
 
- Protected Member Functions inherited from mirtk::Configurable
 Configurable (const char *="")
 Constructor.
 
 Configurable (const Configurable &)
 Copy constructor.
 
string DefaultPrefix () const
 Get default object name prefix (if any)
 
bool HasName () const
 Whether this object has an explicit name.
 
bool HasPrefix () const
 Whether this object has either an explicit name or default prefix.
 
template<class T >
bool InsertWithPrefix (ParameterList &, string, T) const
 Insert parameter into name/value list with object name prefix.
 
bool InsertWithPrefix (ParameterList &, const ParameterList &) const
 Insert parameters into name/value list with object name prefix.
 
Configurableoperator= (const Configurable &)
 Assignment operator.
 
string ParameterNameWithoutPrefix (const char *) const
 Get name of parameter without object name prefix.
 
string ParameterNameWithPrefix (const string &) const
 Get name of parameter with default object name prefix.
 
string ParameterNameWithPrefix (const char *) const
 Get name of parameter with default object name prefix.
 
- Protected Member Functions inherited from mirtk::Observable
 Observable ()
 Default constructor.
 
 Observable (const Observable &)
 Copy constructor.
 
Observableoperator= (const Observable &)
 Assignment operator.
 
- Protected Member Functions inherited from mirtk::Object
template<typename... Args>
void Throw (ErrorType err, const char *func, Args... args) const
 

Additional Inherited Members

- Public Types inherited from mirtk::ImplicitSurfaceForce
enum  DistanceMeasureType { , DM_Minimum, DM_Normal }
 Enumeration of implicit surface distance measures. More...
 
- Public Types inherited from mirtk::ExternalForce
typedef GenericImage< VoxelTypeImageType
 Non-abstract base type of input image.
 
typedef RegisteredImage::VoxelType VoxelType
 Type of input image voxel values.
 
- Public Types inherited from mirtk::PointSetForce
typedef RegisteredPointSet::EdgeTable EdgeTable
 Adjacency matrix with edge IDs.
 
typedef Vector3D< double > GradientType
 Type of gradient w.r.t a single transformed data point.
 
typedef RegisteredPointSet::NodeNeighbors NodeNeighbors
 Table of n-connected node neighbors.
 
- Public Types inherited from mirtk::EnergyTerm
typedef ObjectFactory< enum EnergyMeasure, EnergyTermFactoryType
 Type of energy term factory.
 
- Static Public Member Functions inherited from mirtk::ExternalForce
static ExternalForceNew (ExternalForceTerm, const char *="", double=1.0)
 Instantiate specified external force.
 
- Static Public Member Functions inherited from mirtk::EnergyTerm
static FactoryTypeFactory ()
 Get global energy term factory instance.
 
static EnergyTermNew (EnergyMeasure, const char *="", double=1.0)
 Construct new energy term.
 
static EnergyTermTryNew (EnergyMeasure, const char *="", double=1.0)
 Construct new energy term or return nullptr if term not available.
 
- Static Public Member Functions inherited from mirtk::Object
static const char * NameOfType ()
 Get name of this class type.
 
- Static Protected Member Functions inherited from mirtk::Object
template<typename... Args>
static void ThrowStatic (ErrorType err, const char *cls, const char *func, Args... args)
 

Detailed Description

Force attracting the surface towards a given implicit surface / object boundary

This force term is similar to a BalloonForce with the implicit surface model given as input image. Unlike the balloon force, however, this force does not vanish for a node which is close to the implicit surface. A separate image edge force which takes over once a vertex is nearby an image edge is therefore not required. Moreover, the force vectors can be scaled by the estimated distance of a point to the given implicit surface. Points which are further away, thus move faster. When a point lies on the implicit surface, its force vanishes. As soon as it is displaced again, e.g., by a smoothness therm, it starts pulling the point back to the implicit surface again.

The input _Image of the force term is the discrete distance function of the implicit surface, e.g., a signed Euclidean distance transform of a binary object mask.

Definition at line 46 of file ImplicitSurfaceDistance.h.


The documentation for this class was generated from the following file: