]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/Algorithms/KalmanVelocityFilter.h
yet another refactoring
[cpPlugins.git] / lib / cpExtensions / Algorithms / KalmanVelocityFilter.h
diff --git a/lib/cpExtensions/Algorithms/KalmanVelocityFilter.h b/lib/cpExtensions/Algorithms/KalmanVelocityFilter.h
new file mode 100644 (file)
index 0000000..c32dde6
--- /dev/null
@@ -0,0 +1,66 @@
+// -------------------------------------------------------------------------
+// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
+// -------------------------------------------------------------------------
+
+#ifndef __CPEXTENSIONS__ALGORITHMS__KALMANVELOCITYFILTER__H__
+#define __CPEXTENSIONS__ALGORITHMS__KALMANVELOCITYFILTER__H__
+
+#include <cpExtensions/Algorithms/KalmanFilter.h>
+
+namespace cpExtensions
+{
+  namespace Algorithms
+  {
+    /**
+     */
+    template< typename T >
+    class cpExtensions_EXPORT KalmanVelocityFilter
+      : public KalmanFilter< T >
+    {
+    public:
+      typedef KalmanVelocityFilter            Self;
+      typedef KalmanFilter< T >               Superclass;
+      typedef itk::SmartPointer< Self >       Pointer;
+      typedef itk::SmartPointer< const Self > ConstPointer;
+
+      typedef typename Superclass::TScalar TScalar;
+      typedef typename Superclass::TMatrix TMatrix;
+      typedef typename Superclass::TVector TVector;
+
+    public:
+      itkNewMacro( Self );
+      itkTypeMacro( KalmanVelocityFilter, KalmanFilter );
+
+      kalmanGetSetMacro( TMatrix, Sigma );
+      kalmanGetSetMatrixMacro( Sigma, AccelerationNoise );
+
+    public:
+      void Configure( unsigned int m );
+
+      TScalar GetTimeOffset( ) const;
+      void SetTimeOffset( TScalar t );
+
+      /// Iteration methods
+      virtual void Initialize( ) cpExtensions_OVERRIDE;
+
+    protected:
+        KalmanVelocityFilter( );
+        virtual ~KalmanVelocityFilter( );
+
+    private:
+        // Purposely not implemented.
+        KalmanVelocityFilter( const Self& );
+        void operator=( const Self& );
+
+    protected:
+        TMatrix m_TimeOffset;
+        TMatrix m_Sigma;
+    };
+
+  } // ecapseman
+
+} // ecapseman
+
+#endif // __CPEXTENSIONS__ALGORITHMS__KALMANVELOCITYFILTER__H__
+
+// eof - $RCSfile$