div class="twikiTopBar">

Chair for Computer Aided Medical Procedures & Augmented Reality
Lehrstuhl für Informatikanwendungen in der Medizin & Augmented Reality

CovarianceEllipsoid.h

Go to the documentation of this file.
00001 /* ========================================================================
00002  * Copyright (C) 2000-2004  Technische Universitaet Muenchen
00003  * License: GPL v2 (or later)
00004  *
00005  * For further information please contact the DWARF team at
00006  * <dwarf-gnu@augmentedreality.de>
00007  *
00008  * CovarianceEllipsoid.h
00009  * Daniel Pustka <pustka@in.tum.de> April 2004
00010  * Distributed Wearable Augmented Reality Framework - www.augmentedreality.de
00011  * For documentation and instructions, see the DWARF documentation website at
00012  * http://wwwbruegge.in.tum.de/projects/dwarf/doc/
00013  *
00014  * For further questions about DWARF, please contact us at
00015  * <dwarf@augmentedreality.de>
00016  * For questions about this particular service, contact
00017  * Daniel Pustka <pustka@in.tum.de>
00018  *
00019  * $Id: CovarianceEllipsoid.h,v 1.2 2004/08/14 23:27:34 pustka Exp $
00020  */
00021 
00022 /**
00023  * @file CovarianceEllipsoid.h
00024  * @brief Header file containing the CovarianceEllipsoid class.
00025  *
00026  * @author Daniel Pustka <pustka@in.tum.de>
00027  * @ingroup ErrorVisualizer
00028  */
00029 
00030 #ifndef __CovarianceEllipsoid_H_
00031 #define __CovarianceEllipsoid_H_
00032 
00033 // autoconf generated file with configuration information
00034 #ifdef HAVE_CONFIG_H
00035 #include <config.h>
00036 #endif
00037 
00038 #include <tnt.h>
00039 
00040 namespace DWARF {
00041 
00042         /**
00043          * Creates ellipsoids out of covariance matrices
00044          * To get smooth transitions between subsequent covariances, this requires
00045          * some state.
00046          * @ingroup ErrorVisualizer
00047          */
00048         class CovarianceEllipsoid
00049                 {
00050                 protected:
00051                         TNT::Array2D<double> m_Eigenvectors;
00052                         TNT::Array1D<double> m_Scale;
00053 
00054                 public:
00055                         /** initializes internal state */
00056                         CovarianceEllipsoid();
00057 
00058                         /**
00059                          * compute a new ellipsoid from a new covariance
00060                          * @param C a symmetric 3*3 Matrix
00061                          */
00062                         void SetCovariance( const TNT::Array2D<double>& C );
00063 
00064                         /** returns the rotation matrix for the ellipsoid */
00065                         const TNT::Array2D<double>& GetRotationMatrix() const
00066                                 { return m_Eigenvectors; }
00067 
00068                         /** returns rotation as a quaternion */
00069                         void GetRotationQuaternion( double* Q ) const;
00070 
00071                         /** get the lengths of the half-axes */
00072                         const TNT::Array1D<double>& GetScaling() const
00073                                 { return m_Scale; }
00074                 };
00075 
00076 }
00077 #endif //__CovarianceEllipsoid_H_

CovarianceEllipsoid.h Source File | generated on Sun Apr 29 02:00:57 2007 by Doxygen 1.4.1 for DWARF