UsTK : Ultrasound ToolKit  version 2.0.1 under development (2023-12-07)
usImagePostScan2D< Type > Class Template Reference

#include <visp3/ustk_core/usImagePostScan2D.h>

+ Inheritance diagram for usImagePostScan2D< Type >:

Public Member Functions

 usImagePostScan2D ()
 
 usImagePostScan2D (const vpImage< Type > &image, const usTransducerSettings &transducerSettings, double widthResolution=0.0, double heightResolution=0.0)
 
 usImagePostScan2D (const usImagePostScan2D< Type > &other)
 
virtual ~usImagePostScan2D ()
 
double getHeightResolution () const
 
double getWidthResolution () const
 
usImagePostScan2D< Type > & operator= (const usImagePostScan2D< Type > &other)
 
bool operator== (const usImagePostScan2D< Type > &other)
 
void setData (const vpImage< Type > &image)
 
void setHeightResolution (double heightResolution)
 
void setWidthResolution (double widthResolution)
 
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
 
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)
 

Detailed Description

template<class Type>
class usImagePostScan2D< Type >

2D post-scan ultrasound image.

This class represents a 2D post-scan ultrasound image. This image is nothing more than a vpImage that contains ultrasound 2D post-scan data and additional settings that give information about the acquisition process done by the transducer. The bitmap storage is done in row-major.

The settings associated to an usImagePostScan2D image are the following:

The following figure summarize these settings and shows the structure of an usImagePostScan2D image:

The following example shows how to build a 2D post-scan ultrasound image from a vpImage and from acquisition settings.

#include <visp3/ustk_core/usImagePostScan2D.h>
int main()
{
// 2D post-scan image settings
unsigned int width = 320;
unsigned int height = 240;
double transducerRadius = 0.045;
double scanLinePitch = 0.0012;
unsigned int scanLineNumber = 256;
bool isTransducerConvex = true;
double widthResolution = 0.002;
double heightResolution = 0.002;
vpImage<unsigned char> I(height, width);
postScan2d.setTransducerRadius(transducerRadius);
postScan2d.setScanLinePitch(scanLinePitch);
postScan2d.setScanLineNumber(scanLineNumber);
postScan2d.setWidthResolution(widthResolution);
postScan2d.setHeightResolution(heightResolution);
postScan2d.setData(I);
}
void setHeightResolution(double heightResolution)
void setData(const vpImage< Type > &image)
void setWidthResolution(double widthResolution)
void setTransducerConvexity(const bool isTransducerConvex)
void setScanLinePitch(const double scanLinePitch)
void setTransducerRadius(const double transducerRadius)
void setScanLineNumber(unsigned int scanLineNumber)

Definition at line 108 of file usImagePostScan2D.h.

Constructor & Destructor Documentation

◆ usImagePostScan2D() [1/3]

template<class Type >
usImagePostScan2D< Type >::usImagePostScan2D

Basic constructor, all parameters set to default values.

Definition at line 136 of file usImagePostScan2D.h.

◆ usImagePostScan2D() [2/3]

template<class Type >
usImagePostScan2D< Type >::usImagePostScan2D ( const vpImage< Type > &  image,
const usTransducerSettings transducerSettings,
double  widthResolution = 0.0,
double  heightResolution = 0.0 
)

Constructor from an image and transducer settings.

Parameters
imageImage containing the 2D post-scan data to copy.
transducerSettingsTransducer settings associated to the data.
heightResolutionHeight (in meters) of a pixel.
widthResolutionWidth (in meters) of a pixel.

Definition at line 160 of file usImagePostScan2D.h.

◆ usImagePostScan2D() [3/3]

template<class Type >
usImagePostScan2D< Type >::usImagePostScan2D ( const usImagePostScan2D< Type > &  other)

Copy constructor from an other 2D post-scan image.

Parameters
other2D post-scan image to copy.

Definition at line 146 of file usImagePostScan2D.h.

◆ ~usImagePostScan2D()

template<class Type >
usImagePostScan2D< Type >::~usImagePostScan2D
virtual

Destructor.

Definition at line 170 of file usImagePostScan2D.h.

Member Function Documentation

◆ getDepth()

◆ getFieldOfView()

◆ getHeightResolution()

◆ getProbeName()

std::string usTransducerSettings::getProbeName ( ) const
inherited

Getter for the probe name.

Returns
Name of the probe.

Definition at line 232 of file usTransducerSettings.cpp.

◆ getSamplingFrequency()

int usTransducerSettings::getSamplingFrequency ( ) const
inherited

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 usTransducerSettings::operator=(), usTransducerSettings::operator==(), usImageIo::read(), usImageIo::write(), usMHDSequenceWriter::write(), and usImageSettingsXmlParser::writeMainClass().

◆ getScanLineNumber()

◆ getScanLinePitch()

◆ getTransducerRadius()

◆ getTransducerSettings()

usTransducerSettings usTransducerSettings::getTransducerSettings ( ) const
inherited

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
inherited

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 usTransducerSettings::operator=(), usTransducerSettings::operator==(), usImageIo::read(), usImageIo::write(), usMHDSequenceWriter::write(), and usImageSettingsXmlParser::writeMainClass().

◆ getWidthResolution()

◆ isTransducerConvex()

◆ operator!=()

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

Compare two probe transducer settings.

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

Definition at line 125 of file usTransducerSettings.cpp.

References usTransducerSettings::operator==().

◆ operator=()

template<class Type >
usImagePostScan2D< Type > & usImagePostScan2D< Type >::operator= ( const usImagePostScan2D< Type > &  other)

◆ operator==() [1/2]

template<class Type >
bool usImagePostScan2D< Type >::operator== ( const usImagePostScan2D< Type > &  other)

◆ operator==() [2/2]

◆ scanLineNumberIsSet()

bool usTransducerSettings::scanLineNumberIsSet ( ) const
inherited

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 usTransducerSettings::operator=().

◆ setData()

template<class Type >
void usImagePostScan2D< Type >::setData ( const vpImage< Type > &  image)

Setter that updates 2D post-scan image data.

Parameters
imageData to set.

Definition at line 214 of file usImagePostScan2D.h.

◆ setDepth()

◆ setFieldOfView()

void usTransducerSettings::setFieldOfView ( double  fieldOfView)
inherited

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)
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().

◆ setHeightResolution()

template<class Type >
void usImagePostScan2D< Type >::setHeightResolution ( double  heightResolution)

Setter for pixel height resolution.

Parameters
heightResolutionHeight of a pixel (in meters).

Definition at line 235 of file usImagePostScan2D.h.

Referenced by usPreScanToPostScan2DConverter::convert(), usVTKConverter::convert(), and usImageIo::read().

◆ setProbeName()

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

◆ setSamplingFrequency()

◆ setScanLineNumber()

◆ setScanLinePitch()

void usTransducerSettings::setScanLinePitch ( const double  scanLinePitch)
inherited

◆ setTransducerConvexity()

◆ setTransducerRadius()

◆ setTransducerSettings()

void usTransducerSettings::setTransducerSettings ( const usTransducerSettings other)
inherited

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()

◆ setWidthResolution()

template<class Type >
void usImagePostScan2D< Type >::setWidthResolution ( double  widthResolution)

Setter for pixel width resolution.

Parameters
widthResolutionWidth of a pixel (in meters).

Definition at line 244 of file usImagePostScan2D.h.

Referenced by usMHDSequenceReader::acquire(), usPreScanToPostScan2DConverter::convert(), usVTKConverter::convert(), usMHDSequenceReader::getImage(), and usImageIo::read().