UsTK : Ultrasound ToolKit  version 2.0.1 under development (2023-12-07)
usTransducerSettings.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  * Marc Pouliquen
31  *
32  *****************************************************************************/
33 
39 #ifndef __usTransducerSettings_h_
40 #define __usTransducerSettings_h_
41 
42 // std includes
43 #include <iostream>
44 #include <string>
45 
46 // visp includes
47 #include <visp3/core/vpConfig.h>
48 #include <visp3/core/vpException.h>
49 
50 // ustk includes
51 
80 class VISP_EXPORT usTransducerSettings
81 {
82 public:
84  usTransducerSettings(double transducerRadius, double scanLinePitch, unsigned int scanLineNumber,
85  bool transducerConvex, double depth, int transmitFrequency = 0, int samplingFrequency = 0);
87 
88  virtual ~usTransducerSettings();
89 
92 
93  double getDepth() const;
94  double getFieldOfView() const;
95  std::string getProbeName() const;
96  int getSamplingFrequency() const;
97  unsigned int getScanLineNumber() const;
98  double getScanLinePitch() const;
99  double getTransducerRadius() const;
100  usTransducerSettings getTransducerSettings() const;
101  int getTransmitFrequency() const;
102 
103  bool isTransducerConvex() const;
104 
105  usTransducerSettings &operator=(const usTransducerSettings &other);
106  bool operator==(usTransducerSettings const &other);
107  bool operator!=(usTransducerSettings const &other);
108 
109  bool scanLineNumberIsSet() const;
110  // Settings for the probe transducer
111  void setDepth(double depth);
112  void setFieldOfView(double fieldOfView);
113  void setProbeName(std::string probeName);
114  void setSamplingFrequency(const int samplingFrequency);
115  void setScanLineNumber(unsigned int scanLineNumber);
116  void setScanLinePitch(const double scanLinePitch);
117  void setTransducerConvexity(const bool isTransducerConvex);
118  void setTransducerSettings(const usTransducerSettings &other);
119  void setTransducerRadius(const double transducerRadius);
120  void setTransmitFrequency(const int transmitFrequency);
121 
123 
124  friend VISP_EXPORT std::ostream &operator<<(std::ostream &out, const usTransducerSettings &other);
125 
126 private:
127  // Settings for the probe transducer
128  double m_transducerRadius;
129  double m_scanLinePitch;
130  unsigned int m_scanLineNumber;
131  bool m_isTransducerConvex;
132  double m_depth;
133  std::string m_probeName;
134 
135  bool m_scanLineNumberIsSet;
136 
137  int m_transmitFrequency;
138  int m_samplingFrequency;
139 };
140 
141 #endif // __usTransducerSettings_h_
Generic class for 2D ultrasound data common settings associated to the type of probe transducer used ...