UsTK : Ultrasound ToolKit  version 2.0.1 under development (2024-05-20)
usNeedleModelBaseTip.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 #ifndef __usNeedleModelBaseTip_h_
34 #define __usNeedleModelBaseTip_h_
35 
36 #include <iostream>
37 
38 #include <visp3/core/vpColVector.h>
39 #include <visp3/core/vpHomogeneousMatrix.h>
40 #include <visp3/core/vpPoseVector.h>
41 
42 class VISP_EXPORT usNeedleModelBaseTip
43 {
44 protected:
45  vpPoseVector m_basePose;
46  vpHomogeneousMatrix m_worldMbase;
47 
48  vpPoseVector m_tipPose;
49  vpHomogeneousMatrix m_worldMtip;
50 
51 public:
53 
56  virtual ~usNeedleModelBaseTip();
57  virtual usNeedleModelBaseTip &operator=(const usNeedleModelBaseTip &needle);
58 
59  virtual usNeedleModelBaseTip *clone() const; // Polymorph copy method
60 
62 
63  vpPoseVector getBasePose() const;
64  vpHomogeneousMatrix getWorldMbase() const;
65  vpColVector getBasePosition() const;
66  vpColVector getBaseDirection() const;
67 
68  vpPoseVector getTipPose() const;
69  vpHomogeneousMatrix getWorldMtip() const;
70  vpColVector getTipPosition() const;
71  vpColVector getTipDirection() const;
72 
74 
75  void setBasePose(double tx, double ty, double tz, double thetax, double thetay, double thetaz);
76  void setBasePose(const vpPoseVector &pose);
77  void setBasePose(const vpHomogeneousMatrix &Hpose);
78 
79  void setTipPose(double tx, double ty, double tz, double thetax, double thetay, double thetaz);
80  void setTipPose(const vpPoseVector &pose);
81  void setTipPose(const vpHomogeneousMatrix &Hpose);
82 
83  void moveBase(const vpColVector &control, double time);
84  void moveBase(double tx, double ty, double tz, double thetax, double thetay, double thetaz);
85  void moveBase(const vpPoseVector &pose);
86  void moveBase(const vpColVector &v);
87  void moveBase(const vpHomogeneousMatrix &Hmotion);
88 
89  void moveBaseWorldFrame(const vpColVector &command, double time);
90  void moveBaseWorldFrame(double tx, double ty, double tz, double thetax, double thetay, double thetaz);
91  void moveBaseWorldFrame(const vpPoseVector &pose);
92  void moveBaseWorldFrame(const vpColVector &v);
93  void moveBaseWorldFrame(const vpHomogeneousMatrix &Hmotion);
94 
95  void moveTip(const vpColVector &control, double time);
96  void moveTip(double tx, double ty, double tz, double thetax, double thetay, double thetaz);
97  void moveTip(const vpPoseVector &pose);
98  void moveTip(const vpColVector &v);
99  void moveTip(const vpHomogeneousMatrix &Hmotion);
100 
101  void moveTipWorldFrame(const vpColVector &command, double time);
102  void moveTipWorldFrame(double tx, double ty, double tz, double thetax, double thetay, double thetaz);
103  void moveTipWorldFrame(const vpPoseVector &pose);
104  void moveTipWorldFrame(const vpColVector &v);
105  void moveTipWorldFrame(const vpHomogeneousMatrix &Hmotion);
106 
108 
110  friend VISP_EXPORT std::ostream &operator<<(std::ostream &s, const usNeedleModelBaseTip &needle);
111  friend VISP_EXPORT std::istream &operator>>(std::istream &s, usNeedleModelBaseTip &needle);
113  friend VISP_EXPORT std::ostream &operator<<=(std::ostream &s, const usNeedleModelBaseTip &needle);
114  friend VISP_EXPORT std::istream &operator>>=(std::istream &s, usNeedleModelBaseTip &needle);
115 };
116 
117 VISP_EXPORT std::ostream &operator<<(std::ostream &s, const usNeedleModelBaseTip &needle);
118 VISP_EXPORT std::istream &operator>>(std::istream &s, usNeedleModelBaseTip &needle);
119 
120 VISP_EXPORT std::ostream &operator<<=(std::ostream &s, const usNeedleModelBaseTip &needle);
121 VISP_EXPORT std::istream &operator>>=(std::istream &s, usNeedleModelBaseTip &needle);
122 
123 #endif // usNeedleModelBaseTip_h
vpHomogeneousMatrix m_worldMtip
vpHomogeneousMatrix m_worldMbase