UsTK : Ultrasound ToolKit  version 2.0.1 under development (2023-12-07)
usImagePreScanSettings.cpp
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  * Marc Pouliquen
30  *
31  *****************************************************************************/
32 
33 // std includes
34 #include <iostream>
35 
36 // visp includes
37 #include <visp3/core/vpConfig.h>
38 
39 // ustk includes
40 #include <visp3/ustk_core/usImagePreScanSettings.h>
41 
46 
52  : usTransducerSettings(other), m_axialResolution(other.getAxialResolution())
53 {
54 }
55 
62 usImagePreScanSettings::usImagePreScanSettings(const usTransducerSettings &transducerSettings, double axialResolution)
63  : usTransducerSettings(transducerSettings), m_axialResolution(axialResolution)
64 {
65 }
66 
72 {
73  *this = preScanSettings;
74 }
75 
80 
86 {
88  m_axialResolution = other.getAxialResolution();
89 
90  return *this;
91 }
92 
98 {
99  return (usTransducerSettings::operator==(other) && m_axialResolution == other.getAxialResolution());
100 }
101 
105 template <class T> VISP_EXPORT std::ostream &operator<<(std::ostream &out, const usImagePreScanSettings &other)
106 {
107  return out << "Axial resolution : " << other.getAxialResolution() << std::endl
108  << static_cast<const usTransducerSettings &>(other) << std::endl;
109 }
110 
115 void usImagePreScanSettings::setAxialResolution(const double axialResolution) { m_axialResolution = axialResolution; }
116 
120 double usImagePreScanSettings::getAxialResolution() const { return (m_axialResolution); }
121 
123 {
124  usImagePreScanSettings ret = *this;
125  return ret;
126 }
Settings associated to ultrasound pre-scan images implemented in usImageRF2D, usImageRF3D,...
void setImagePreScanSettings(const usImagePreScanSettings &preScanSettings)
bool operator==(const usImagePreScanSettings &other)
usImagePreScanSettings getImagePreScanSettings() const
usImagePreScanSettings & operator=(const usImagePreScanSettings &other)
void setAxialResolution(const double axialResolution)
Generic class for 2D ultrasound data common settings associated to the type of probe transducer used ...
usTransducerSettings & operator=(const usTransducerSettings &other)