FAST  3.2.0
Framework for Heterogeneous Medical Image Computing and Visualization
CoherentPointDrift.hpp
Go to the documentation of this file.
1 #ifndef COHERENT_POINT_DRIFT_HPP
2 #define COHERENT_POINT_DRIFT_HPP
3 
5 #include "FAST/ProcessObject.hpp"
6 #include "FAST/Data/Mesh.hpp"
7 
8 namespace fast {
9 
10  class FAST_EXPORT CoherentPointDrift: public ProcessObject {
11 // FAST_OBJECT(CoherentPointDrift)
12  public:
13  typedef enum { RIGID, AFFINE, NONRIGID } TransformationType;
14  void setFixedMeshPort(DataChannel::pointer port);
15  void setFixedMesh(Mesh::pointer data);
16  void setMovingMeshPort(DataChannel::pointer port);
17  void setMovingMesh(Mesh::pointer data);
18  void setMaximumIterations(unsigned char maxIterations);
19  void setUniformWeight(float uniformWeight);
20  void setTolerance(double tolerance);
21  AffineTransformation::pointer getOutputTransformation();
22 
23  virtual void initializeVarianceAndMore() = 0;
24  void expectation(MatrixXf& fixedPoints, MatrixXf& movingPoints);
25  virtual void maximization(MatrixXf& fixedPoints, MatrixXf& movingPoints) = 0;
26 
27  protected:
29  void execute();
30  MatrixXf mFixedPoints;
31  MatrixXf mMovingPoints;
34  MatrixXf mResponsibilityMatrix; // P
35  unsigned int mNumFixedPoints; // N
36  unsigned int mNumMovingPoints; // M
37  unsigned int mNumDimensions; // D
38  float mUniformWeight; // Weight of the uniform distribution
39  double mTolerance; // Convergence criteria for EM iterations
40  double mScale; // s
41  double mVariance; // sigma^2
42  double mObjectiveFunction; // Q
46  unsigned char mIteration;
48  double timeE;
50  double timeENormal;
53  double timeM;
54  double timeMUseful;
55  double timeMCenter;
56  double timeMSVD;
58  double timeMUpdate;
59 
60  private:
61  void initializePointSets();
62  void printCloudDimensions();
63  void normalizePointSets();
64 
65  std::shared_ptr<Mesh> mFixedMesh;
66  std::shared_ptr<Mesh> mMovingMesh;
67  unsigned char mMaxIterations;
68  CoherentPointDrift::TransformationType mTransformationType;
69  };
70 
71 } // end namespace fast
72 
73 #endif
AffineTransformation.hpp
fast::CoherentPointDrift::mIteration
unsigned char mIteration
Definition: CoherentPointDrift.hpp:46
fast::CoherentPointDrift::timeE
double timeE
Definition: CoherentPointDrift.hpp:48
fast
Definition: AffineTransformation.hpp:7
fast::CoherentPointDrift::timeMParameters
double timeMParameters
Definition: CoherentPointDrift.hpp:57
fast::CoherentPointDrift::mMovingMeanInitial
MatrixXf mMovingMeanInitial
Definition: CoherentPointDrift.hpp:32
fast::CoherentPointDrift::timeMCenter
double timeMCenter
Definition: CoherentPointDrift.hpp:55
fast::CoherentPointDrift::mObjectiveFunction
double mObjectiveFunction
Definition: CoherentPointDrift.hpp:42
fast::CoherentPointDrift::mFixedPoints
MatrixXf mFixedPoints
Definition: CoherentPointDrift.hpp:30
fast::CoherentPointDrift::mTolerance
double mTolerance
Definition: CoherentPointDrift.hpp:39
fast::CoherentPointDrift
Definition: CoherentPointDrift.hpp:10
fast::CoherentPointDrift::timeEPosteriorDivision
double timeEPosteriorDivision
Definition: CoherentPointDrift.hpp:52
fast::CoherentPointDrift::mScale
double mScale
Definition: CoherentPointDrift.hpp:40
fast::CoherentPointDrift::timeMUpdate
double timeMUpdate
Definition: CoherentPointDrift.hpp:58
fast::CoherentPointDrift::mMovingNormalizationScale
double mMovingNormalizationScale
Definition: CoherentPointDrift.hpp:44
fast::DataChannel::pointer
std::shared_ptr< DataChannel > pointer
Definition: DataChannel.hpp:12
fast::CoherentPointDrift::mMovingPoints
MatrixXf mMovingPoints
Definition: CoherentPointDrift.hpp:31
fast::CoherentPointDrift::timeMUseful
double timeMUseful
Definition: CoherentPointDrift.hpp:54
fast::CoherentPointDrift::timeEDistances
double timeEDistances
Definition: CoherentPointDrift.hpp:49
fast::CoherentPointDrift::mNumDimensions
unsigned int mNumDimensions
Definition: CoherentPointDrift.hpp:37
fast::CoherentPointDrift::mFixedMeanInitial
MatrixXf mFixedMeanInitial
Definition: CoherentPointDrift.hpp:33
fast::CoherentPointDrift::timeEPosterior
double timeEPosterior
Definition: CoherentPointDrift.hpp:51
fast::CoherentPointDrift::timeM
double timeM
Definition: CoherentPointDrift.hpp:53
ProcessObject.hpp
fast::CoherentPointDrift::timeMSVD
double timeMSVD
Definition: CoherentPointDrift.hpp:56
fast::CoherentPointDrift::mTransformation
AffineTransformation::pointer mTransformation
Definition: CoherentPointDrift.hpp:45
fast::CoherentPointDrift::mUniformWeight
float mUniformWeight
Definition: CoherentPointDrift.hpp:38
fast::CoherentPointDrift::mFixedNormalizationScale
double mFixedNormalizationScale
Definition: CoherentPointDrift.hpp:43
fast::DataObject::pointer
std::shared_ptr< DataObject > pointer
Definition: DataObject.hpp:16
fast::CoherentPointDrift::timeENormal
double timeENormal
Definition: CoherentPointDrift.hpp:50
fast::CoherentPointDrift::mNumFixedPoints
unsigned int mNumFixedPoints
Definition: CoherentPointDrift.hpp:35
Mesh.hpp
fast::CoherentPointDrift::mNumMovingPoints
unsigned int mNumMovingPoints
Definition: CoherentPointDrift.hpp:36
fast::CoherentPointDrift::mResponsibilityMatrix
MatrixXf mResponsibilityMatrix
Definition: CoherentPointDrift.hpp:34
fast::CoherentPointDrift::TransformationType
TransformationType
Definition: CoherentPointDrift.hpp:13
fast::CoherentPointDrift::mVariance
double mVariance
Definition: CoherentPointDrift.hpp:41
fast::ProcessObject
Definition: ProcessObject.hpp:22
fast::CoherentPointDrift::mRegistrationConverged
bool mRegistrationConverged
Definition: CoherentPointDrift.hpp:47