FAST  3.2.0
Framework for Heterogeneous Medical Image Computing and Visualization
KalmanFilter.hpp
Go to the documentation of this file.
1 #ifndef KALMAN_FILTER_HPP
2 #define KALMAN_FILTER_HPP
3 
4 #include "FAST/ProcessObject.hpp"
5 #include "AppearanceModel.hpp"
6 #include "ShapeModel.hpp"
7 
8 namespace fast {
9 
10 class Image;
11 class Mesh;
12 
13 class FAST_EXPORT KalmanFilter : public ProcessObject {
15  public:
16  void setShapeModel(ShapeModel::pointer shapeModel);
17  void setAppearanceModel(AppearanceModel::pointer appearanceModel);
18  void setIterations(int iterations);
19  void setStartIterations(int iterations);
20  VectorXf getCurrentState() const;
21  DataChannel::pointer getSegmentationOutputPort();
22  DataChannel::pointer getDisplacementsOutputPort();
23  private:
24  KalmanFilter();
25  void execute(); // runs a loop with predict, measure and update
26  void predict();
27  void estimate(std::shared_ptr<Image> image);
28  std::shared_ptr<Mesh> getDisplacementVectors(std::shared_ptr<Image> image);
29 
30  AppearanceModel::pointer mAppearanceModel;
31  ShapeModel::pointer mShapeModel;
32 
33  VectorXf mCurrentState;
34  VectorXf mPreviousState;
35  VectorXf mDefaultState;
36  VectorXf mPredictedState;
37 
38  MatrixXf mCurrentCovariance;
39  MatrixXf mPreviousCovariance;
40  MatrixXf mPredictedCovariance;
41 
42  bool mInitialized;
43  bool mFirstExecute;
44  bool mOutputDisplacements;
45 
46  int mIterations;
47  int mStartIterations;
48 };
49 
50 } // end namespace fast
51 
52 #endif
fast
Definition: AffineTransformation.hpp:7
fast::ShapeModel::pointer
std::shared_ptr< ShapeModel > pointer
Definition: ShapeModel.hpp:18
FAST_OBJECT
#define FAST_OBJECT(className)
Definition: Object.hpp:9
fast::DataChannel::pointer
std::shared_ptr< DataChannel > pointer
Definition: DataChannel.hpp:12
ShapeModel.hpp
ProcessObject.hpp
fast::KalmanFilter
Definition: KalmanFilter.hpp:13
AppearanceModel.hpp
fast::ProcessObject
Definition: ProcessObject.hpp:22
fast::AppearanceModel::pointer
std::shared_ptr< AppearanceModel > pointer
Definition: AppearanceModel.hpp:24