UsTK : Ultrasound ToolKit  version 2.0.1 under development (2023-12-07)
usMotorSettings.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  * Authors:
29  * Pierre Chatelain
30  *
31  *****************************************************************************/
32 
38 #ifndef __usMotorSettings_h_
39 #define __usMotorSettings_h_
40 
41 // std includes
42 #include <iostream>
43 
44 // visp includes
45 #include <visp3/core/vpConfig.h>
46 
47 // ustk includes
48 #include <visp3/ustk_core/usTransducerSettings.h>
49 
77 class VISP_EXPORT usMotorSettings
78 {
79 public:
81  typedef enum {
82  LinearMotor = 0,
83  TiltingMotor = 1,
84  RotationalMotor = 2
85  } usMotorType;
86 
88  usMotorSettings(double motorRadius, double framePitch, unsigned int frameNumber, const usMotorType &motorType);
89  usMotorSettings(const usMotorSettings &other);
90  virtual ~usMotorSettings();
91 
94  unsigned int getFrameNumber() const;
95  double getFramePitch() const;
96  double getMotorFieldOfView() const;
97  double getMotorRadius() const;
98  usMotorSettings getMotorSettings() const;
99  usMotorType getMotorType() const;
100 
101  bool frameNumberIsSet() const;
102 
103  usMotorSettings &operator=(const usMotorSettings &other);
104  bool operator==(const usMotorSettings &other);
105  bool operator!=(const usMotorSettings &other);
106 
107  // Settings from the 3D probe
108  void setFrameNumber(unsigned int frameNumber);
109  void setFramePitch(double framePitch);
110  void setMotorFieldOfView(double motorFieldOfView);
111  void setMotorRadius(double motorRadius);
112  void setMotorSettings(const usMotorSettings &other);
113  void setMotorType(const usMotorType &motorType);
114 
116 
117  friend VISP_EXPORT std::ostream &operator<<(std::ostream &out, const usMotorSettings &other);
118 
119 private:
120  // Settings from the 3D probe
121  double m_motorRadius;
122  double m_framePitch;
123  unsigned int m_frameNumber;
124  bool m_frameNumberIsSet;
125  usMotorType m_motorType;
126 };
127 
128 #endif // __usMotorSettings_h_
Generic class for 3D ultrasound motor settings associated to the 3D probe used during acquisition.