CortidQCT  1.2.2.52
Classes | Public Member Functions | List of all members
CortidQCT::MeshFitter Class Reference

#include <MeshFitter.h>

Collaboration diagram for CortidQCT::MeshFitter:
Collaboration graph
[legend]

Classes

struct  Configuration
 Configuration type for MeshFitter. More...
 
class  Impl
 
struct  Result
 Result type. More...
 
struct  State
 Internal State type. More...
 

Public Member Functions

 MeshFitter (Configuration config)
 Constructs a MeshFitter object with given configuration. More...
 
 MeshFitter (MeshFitter const &)
 
 MeshFitter (MeshFitter &&) noexcept
 
MeshFitteroperator= (MeshFitter const &)
 
MeshFitteroperator= (MeshFitter &&) noexcept
 
void swap (MeshFitter &rhs) noexcept
 
 MeshFitter (std::string const &configFilename)
 Convenience constructor that reads the configuration from the given configuration file. More...
 
Result fit (VoxelVolume const &volume) const
 Fits the reference mesh to the given voxel volume. More...
 
State init (VoxelVolume const &volume) const
 Initializes the fitting algorithm. More...
 
void fitOneIteration (State &state) const
 Runs the fitting algorithm for a single iteration. More...
 
void volumeSamplingStep (State &state) const
 Samples the input volume at lines perpendicular to the vertices of the current deformed mesh. More...
 
void optimalDisplacementStep (State &state) const
 Finds the optimal displacements of the model and computes the per-vertex weights. More...
 
void optimalDeformationStep (State &state) const
 Find the deformation that minimizes the point-to-plane distance of the current deformed mesh to the displaced vertices with respect to the ARAP energy. More...
 
void logLikelihoodStep (State &state) const
 Computes the log likelihood of the current deformed mesh given the input volume. More...
 
void convergenceTestStep (State &state) const
 Tests if the algorithm has converged. More...
 

Public Properties

Configuration configuration
 The configuration.
 

Detailed Description

Constructor & Destructor Documentation

CortidQCT::MeshFitter::MeshFitter ( Configuration  config)

Constructs a MeshFitter object with given configuration.

Parameters
configConfiguration object
CortidQCT::MeshFitter::MeshFitter ( std::string const &  configFilename)
inline

Convenience constructor that reads the configuration from the given configuration file.

Parameters
configFilenamepath to the configuration file

Member Function Documentation

void CortidQCT::MeshFitter::convergenceTestStep ( MeshFitter::State state) const

Tests if the algorithm has converged.

Parameters
[in,out]stateOptimization state
Precondition
state has been initialized by calling init().
Exceptions
std::invalid_argumentiff state was not initialized properly
See also
fitOneIteration
MeshFitter::Result CortidQCT::MeshFitter::fit ( VoxelVolume const &  volume) const

Fits the reference mesh to the given voxel volume.

Parameters
volumeVoxelVolume object representing the target scan
Returns
A Result struct containing the deformed mesh
void CortidQCT::MeshFitter::fitOneIteration ( MeshFitter::State state) const

Runs the fitting algorithm for a single iteration.

Performed the following steps:

  1. optimalDisplacementStep()
  2. optimalDeformationStep()
  3. logLikelihoodStep()
  4. convergenceTestStep()
  5. increase interation count
  6. volumeSamplingStep()
Parameters
[in,out]stateState object returned by init.
Exceptions
std::invalid_argumentiff state was not initialized properly
See also
fit()
MeshFitter::State CortidQCT::MeshFitter::init ( VoxelVolume const &  volume) const

Initializes the fitting algorithm.

Initializes the state and performed the first volume sampling step by calling volumeSamplingStep().

Parameters
volumeVoxelVolume object representing the target scan
Returns
State object that must be passed to subsequent calls
See also
fit()
void CortidQCT::MeshFitter::logLikelihoodStep ( MeshFitter::State state) const

Computes the log likelihood of the current deformed mesh given the input volume.

Parameters
[in,out]stateOptimization state
Precondition
state has been initialized by calling init().
Exceptions
std::invalid_argumentiff state was not initialized properly
See also
fitOneIteration
void CortidQCT::MeshFitter::optimalDeformationStep ( MeshFitter::State state) const

Find the deformation that minimizes the point-to-plane distance of the current deformed mesh to the displaced vertices with respect to the ARAP energy.

Parameters
[in,out]stateOptimization state
Precondition
state has been initialized by calling init().
Exceptions
std::invalid_argumentiff state was not initialized properly
See also
fitOneIteration
void CortidQCT::MeshFitter::optimalDisplacementStep ( MeshFitter::State state) const

Finds the optimal displacements of the model and computes the per-vertex weights.

Parameters
[in,out]stateOptimization state
Precondition
state has been initialized by calling init().
Exceptions
std::invalid_argumentiff state was not initialized properly
See also
fitOneIteration
void CortidQCT::MeshFitter::volumeSamplingStep ( MeshFitter::State state) const

Samples the input volume at lines perpendicular to the vertices of the current deformed mesh.

Parameters
[in,out]stateOptimization state
Precondition
state has been initialized by calling init().
Exceptions
std::invalid_argumentiff state was not initialized properly
See also
fitOneIteration

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