UsTK : Ultrasound ToolKit  version 2.0.1 under development (2024-12-17)
usTissueTranslationEstimatorUKF.h
1 /****************************************************************************
2  *
3  * This file is part of the ustk software.
4  * Copyright (C) 2016 - 2017 by Inria. All rights reserved.
5  *
6  * This software is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * ("GPL") version 2 as published by the Free Software Foundation.
9  * See the file LICENSE.txt at the root directory of this source
10  * distribution for additional information about the GNU GPL.
11  *
12  * For using ustk with software that can not be combined with the GNU
13  * GPL, please contact Inria about acquiring a ViSP Professional
14  * Edition License.
15  *
16  * This software was developed at:
17  * Inria Rennes - Bretagne Atlantique
18  * Campus Universitaire de Beaulieu
19  * 35042 Rennes Cedex
20  * France
21  *
22  * If you have questions regarding the use of this file, please contact
23  * Inria at ustk@inria.fr
24  *
25  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
26  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27  *
28  * Author:
29  * Jason Chevrie
30  *
31  *****************************************************************************/
32 
33 
39 #ifndef __usTissueTranslationEstimatorUKF_h_
40 #define __usTissueTranslationEstimatorUKF_h_
41 
42 #include <visp3/core/vpColVector.h>
43 #include <visp3/core/vpMatrix.h>
44 
45 #include <visp3/ustk_needle_modeling/usNeedleInsertionModelRayleighRitzSpline.h>
46 #include <visp3/ustk_needle_modeling/usUnscentedKalmanFilter.h>
47 
48 
50 {
51 public:
52 
53  enum StateDynamicsType : int {CONSTANT_POSITION, CONSTANT_VELOCITY};
54  enum TissueTranslationType : int {LATERAL_TRANSLATIONS_ONLY, FULL_TRANSLATIONS};
55  enum MeasureType : int {NEEDLE_BODY_POINTS, TIP_POSITION_AND_DIRECTION, BASE_FORCE_TORQUE};
56 
66 
68 
70 
71 public:
74 
75  double getPositionMeasureNoiseVariance() const;
76  void setPositionMeasureNoiseVariance(double sigma);
77 
78  double getTipDirectionMeasureNoiseVariance() const;
79  void setTipDirectionMeasureNoiseVariance(double sigma);
80 
81  double getForceMeasureNoiseVariance() const;
82  void setForceMeasureNoiseVariance(double sigma);
83 
84  double getTorqueMeasureNoiseVariance() const;
85  void setTorqueMeasureNoiseVariance(double sigma);
86 
87  double getTissuePositionProcessNoiseVariance() const;
88  void setTissuePositionProcessNoiseVariance(double sigma);
89 
90  double getTissueVelocityProcessNoiseVariance() const;
91  void setTissueVelocityProcessNoiseVariance(double sigma);
92 
93  StateDynamicsType getStateDynamicsType() const;
94  void setStateDynamicsType(StateDynamicsType type);
95 
96  TissueTranslationType getTissueTranslationType() const;
97  void setTissueTranslationType(TissueTranslationType type);
98 
99  MeasureType getMeasureType() const;
100  void setMeasureType(MeasureType type);
101 
102  void setPropagationTime(double time);
103 
104  void setCurrentNeedle(const usNeedleInsertionModelRayleighRitzSpline& needle);
105  void applyStateToNeedle(usNeedleInsertionModelRayleighRitzSpline& needle) const;
106 
107  bool checkConsistency(const vpColVector &measure);
110  vpColVector propagateSigmaPoint(const vpColVector &sigmaPoint);
111  vpColVector computeMeasureFromSigmaPoint(const vpColVector &sigmaPoint);
112  double stateNorm(const vpColVector& state) const;
113  vpColVector measureLog(const vpColVector& measure, const vpColVector &measureCenter) const;
114 };
115 
116 #endif // __usTissueTranslationEstimatorUKF_h_
usNeedleInsertionModelRayleighRitzSpline m_needle
virtual void computeProcessNoiseCovarianceMatrix()
virtual vpColVector measureLog(const vpColVector &measure, const vpColVector &measureCenter) const
virtual double stateNorm(const vpColVector &state) const
virtual vpColVector computeMeasureFromSigmaPoint(const vpColVector &sigmaPoint)=0
virtual bool checkConsistency(const vpColVector &measure)
virtual vpColVector propagateSigmaPoint(const vpColVector &sigmaPoint)=0
virtual void computeMeasureNoiseCovarianceMatrix()