UsTK : Ultrasound ToolKit  version 2.0.1 under development (2024-11-21)
usTransducerSettings Class Reference

#include <visp3/ustk_core/usTransducerSettings.h>

+ Inheritance diagram for usTransducerSettings:

Public Member Functions

 usTransducerSettings ()
 
 usTransducerSettings (double transducerRadius, double scanLinePitch, unsigned int scanLineNumber, bool transducerConvex, double depth, int transmitFrequency=0, int samplingFrequency=0)
 
 usTransducerSettings (const usTransducerSettings &other)
 
virtual ~usTransducerSettings ()
 

Inherited functionalities from usTransducerSettings

double getDepth () const
 
double getFieldOfView () const
 
std::string getProbeName () const
 
int getSamplingFrequency () const
 
unsigned int getScanLineNumber () const
 
double getScanLinePitch () const
 
double getTransducerRadius () const
 
usTransducerSettings getTransducerSettings () const
 
int getTransmitFrequency () const
 
bool isTransducerConvex () const
 
usTransducerSettingsoperator= (const usTransducerSettings &other)
 
bool operator== (usTransducerSettings const &other)
 
bool operator!= (usTransducerSettings const &other)
 
bool scanLineNumberIsSet () const
 
void setDepth (double depth)
 
void setFieldOfView (double fieldOfView)
 
void setProbeName (std::string probeName)
 
void setSamplingFrequency (const int samplingFrequency)
 
void setScanLineNumber (unsigned int scanLineNumber)
 
void setScanLinePitch (const double scanLinePitch)
 
void setTransducerConvexity (const bool isTransducerConvex)
 
void setTransducerSettings (const usTransducerSettings &other)
 
void setTransducerRadius (const double transducerRadius)
 
void setTransmitFrequency (const int transmitFrequency)
 
VISP_EXPORT std::ostream & operator<< (std::ostream &out, const usTransducerSettings &other)
 

Detailed Description

Generic class for 2D ultrasound data common settings associated to the type of probe transducer used during acquisition.

This class represents ultrasound transducer common settings which are:

  • the name of the probe that could be set using setProbeName() or retrieved using getProbeName().
  • the transducer radius $R_{_T}$ in meters (value set to zero for a linear transducer). Its value could be set using setTransducerRadius() and retrieved using getTransducerRadius().
  • the scan line pitch that corresponds to the angle $\alpha_{_{SC}}$ (in radians) between two successive scan line beams when the transducer is convex, or to the distance $d_{_{SC}}$ (in meters) when the transducer is linear. To set this value use setScanLinePitch() and to get its value use getScanLinePitch().
  • the number of scan lines $n_{_{SC}}$. To set this setting use setScanLineNumber() and to access to the value use getScanLineNumber().
  • the type of ultrasound transducer used for data acquisition: convex or linear. This parameter could be set using setTransducerConvexity(). To know the transducer type use isTransducerConvex().
  • the depth that corresponds to the distance in meters between the first and the last pixel in a scan line. To set this value use setDepth() and to get the depth use getDepth().

Knowing the scan line pitch ( $\alpha_{_{SC}}$ or $d_{_{SC}}$) and the number of scan lines $n_{_{SC}}$, you can get the transducer field of view using getFieldOfView().

The following figure summerize these transducer settings.

Examples
tutorial-sonosite-confidence-control.cpp.

Definition at line 80 of file usTransducerSettings.h.

Constructor & Destructor Documentation

◆ usTransducerSettings() [1/3]

usTransducerSettings::usTransducerSettings ( )

Basic constructor, all settings set to default.

Definition at line 50 of file usTransducerSettings.cpp.

◆ usTransducerSettings() [2/3]

usTransducerSettings::usTransducerSettings ( double  transducerRadius,
double  scanLinePitch,
unsigned int  scanLineNumber,
bool  transducerConvex,
double  depth,
int  transmitFrequency = 0,
int  samplingFrequency = 0 
)

Full constructor with all the settings availables:

Parameters
transducerRadiusDistance between the center point of the transducer and the first pixel arc acquired. Value in meters (m).
scanLinePitchRadius or distance between 2 successives scan lines acquired by the probe transducer; in radians (rad) if the probe is convex, or in meters (m) if the probe is linear.
scanLineNumberNumber of scan lines acquired by the probe transducer.
transducerConvexBoolean to specify if the probe transducer is convex (true) or linear (false).
depthDistance in meters between first and last pixel of a scan line.
samplingFrequency: frequency used to sample the ultrasound wave during the acquisition.
transmitFrequency: frequency of the ultrasound wave used to create the image.

Definition at line 69 of file usTransducerSettings.cpp.

◆ usTransducerSettings() [3/3]

usTransducerSettings::usTransducerSettings ( const usTransducerSettings other)

Copy constructor.

Parameters
otherSettings to copy.

Definition at line 82 of file usTransducerSettings.cpp.

◆ ~usTransducerSettings()

usTransducerSettings::~usTransducerSettings ( )
virtual

Destructor.

Definition at line 87 of file usTransducerSettings.cpp.

Member Function Documentation

◆ getDepth()

◆ getFieldOfView()

◆ getProbeName()

std::string usTransducerSettings::getProbeName ( ) const

Getter for the probe name.

Returns
Name of the probe.

Definition at line 232 of file usTransducerSettings.cpp.

◆ getSamplingFrequency()

int usTransducerSettings::getSamplingFrequency ( ) const

Getter for sampling frequency : frequency used to sample the echo of the ultrasound wave.

Returns
Sampling frequency Frequency in Hz.

Definition at line 305 of file usTransducerSettings.cpp.

Referenced by operator=(), operator==(), usImageIo::read(), usImageIo::write(), usMHDSequenceWriter::write(), and usImageSettingsXmlParser::writeMainClass().

◆ getScanLineNumber()

◆ getScanLinePitch()

◆ getTransducerRadius()

◆ getTransducerSettings()

usTransducerSettings usTransducerSettings::getTransducerSettings ( ) const

Getter for transducer settings : allows heritating classes to get the transducer settings.

Returns
The transducer settings.

Definition at line 295 of file usTransducerSettings.cpp.

◆ getTransmitFrequency()

int usTransducerSettings::getTransmitFrequency ( ) const

Getter for transmit frequency : frequency of the ultrasound wave used.

Returns
Transmit frequency in Hz.

Definition at line 311 of file usTransducerSettings.cpp.

Referenced by operator=(), operator==(), usImageIo::read(), usImageIo::write(), usMHDSequenceWriter::write(), and usImageSettingsXmlParser::writeMainClass().

◆ isTransducerConvex()

◆ operator!=()

bool usTransducerSettings::operator!= ( usTransducerSettings const &  other)

Compare two probe transducer settings.

Returns
False if the settings are the same, true otherwise.

Definition at line 125 of file usTransducerSettings.cpp.

References operator==().

◆ operator=()

◆ operator==()

bool usTransducerSettings::operator== ( usTransducerSettings const &  other)

Compare two probe transducer settings.

Returns
True if the settings are the same, false otherwise.

Definition at line 111 of file usTransducerSettings.cpp.

References getSamplingFrequency(), getScanLineNumber(), getScanLinePitch(), getTransducerRadius(), getTransmitFrequency(), and isTransducerConvex().

Referenced by operator!=(), and usImagePostScan3D< Type >::operator==().

◆ scanLineNumberIsSet()

bool usTransducerSettings::scanLineNumberIsSet ( ) const

Getter to know if the scan line number is set (usefull in case of field of view setter call).

Returns
Boolean to know if the scan line number is set or not.

Definition at line 277 of file usTransducerSettings.cpp.

Referenced by operator=().

◆ setDepth()

◆ setFieldOfView()

void usTransducerSettings::setFieldOfView ( double  fieldOfView)

Setter for the transducer field of view (updates the scan line pitch).

Parameters
fieldOfViewThe transducer field of view in radians if the transducer is convex, in meters if the transducer is linear.
Warning
Be sure to use setScanLineNumber() to update the scan line number before the field of view since this method computes the scan line pitch from the field of view and the scan line pitch.
usTransducerSettings transducerSettings;
transducerSettings.setScanLineNumber(128);
transducerSettings.setFieldOfView(vpMath::rad(57.0)); // field of view is 57 deg
Generic class for 2D ultrasound data common settings associated to the type of probe transducer used ...
void setFieldOfView(double fieldOfView)
void setScanLineNumber(unsigned int scanLineNumber)
Examples
tutorial-servo-target-confidence.cpp, tutorial-servo-target.cpp, tutorial-sonosite-confidence-control.cpp, and tutorial-sonosite-confidence-map.cpp.

Definition at line 265 of file usTransducerSettings.cpp.

Referenced by usPostScanToPreScan2DConverter::convert().

◆ setProbeName()

void usTransducerSettings::setProbeName ( std::string  probeName)

◆ setSamplingFrequency()

◆ setScanLineNumber()

◆ setScanLinePitch()

void usTransducerSettings::setScanLinePitch ( const double  scanLinePitch)

◆ setTransducerConvexity()

◆ setTransducerRadius()

◆ setTransducerSettings()

void usTransducerSettings::setTransducerSettings ( const usTransducerSettings other)

Assignment operator.

Parameters
otherSettings you want to assign.
See also
operator=()
Examples
tutorial-ultrasonix-qt-grabbing-RF-scan-conversion.cpp.

Definition at line 210 of file usTransducerSettings.cpp.

Referenced by usPreScanToPostScan3DConverter::convert().

◆ setTransmitFrequency()

Friends And Related Function Documentation

◆ operator<<

VISP_EXPORT std::ostream& operator<< ( std::ostream &  out,
const usTransducerSettings other 
)
friend

Print transducer information in a ostream. Usage example:

usTransducerSettings myTransducerSettings;
std::cout << myTransducerSettings;

Definition at line 135 of file usTransducerSettings.cpp.