UsTK : Ultrasound ToolKit
version 2.0.1 under development (2024-11-21)
|
#include <visp3/ustk_core/usImageRF2D.h>
Public Member Functions | |
usImageRF2D () | |
usImageRF2D (unsigned int height, unsigned int width) | |
usImageRF2D (unsigned int height, unsigned int width, const usImagePreScanSettings &preScanSettings) | |
usImageRF2D (const usImageRF2D &other) | |
virtual | ~usImageRF2D () |
const Type * | getBitmap () const |
unsigned int | getHeight () const |
unsigned int | getNumberOfPixel () const |
unsigned int | getRFSampleNumber () const |
const Type * | getSignal (unsigned int scanlineIndex) const |
unsigned int | getWidth () const |
void | init (unsigned int height, unsigned int width) |
usImageRF2D< Type > & | operator= (const usImageRF2D< Type > &other) |
bool | operator== (const usImageRF2D< Type > &other) |
Type | operator() (unsigned int i, unsigned int j) const |
void | operator() (unsigned int i, unsigned int j, const Type &value) |
void | setScanLineNumber (unsigned int scanLineNumber) |
void | resize (const unsigned int height, const unsigned int width) |
void | resize (const unsigned int height, const unsigned int width, const Type &val) |
Inherited functionalities from usImagePreScanSettings | |
double | getAxialResolution () const |
usImagePreScanSettings | getImagePreScanSettings () const |
bool | operator== (const usImagePreScanSettings &other) |
void | setAxialResolution (const double axialResolution) |
void | setImagePreScanSettings (const usImagePreScanSettings &preScanSettings) |
Inherited functionalities from usTransducerSettings | |
bool | operator== (usTransducerSettings const &other) |
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 | scanLineNumberIsSet () const |
void | setDepth (double depth) |
void | setFieldOfView (double fieldOfView) |
void | setProbeName (std::string probeName) |
void | setSamplingFrequency (const int samplingFrequency) |
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) |
Friends | |
class | usRawFileParser |
class | usNetworkGrabberRF2D |
class | usNetworkGrabberRF3D |
class | usVirtualServer |
2D Radio Frequence (RF) ultrasound image.
This class represents a 2D RF ultrasound image. This image is nothing more than an image (respecting column-major bitmap storage) that contains additional settings that give information about the acquisition process done by the transducer.
The settings associated to an usImageRF2D image are the one implemented in usImagePreScanSettings. We recall that these settings are:
The following figure summarize these settings and shows the structure of an usImageRF2D image:
The following example shows how to read a 2D RF ultrasound image, and set the image settings of your choice.
Definition at line 111 of file usImageRF2D.h.
usImageRF2D< Type >::usImageRF2D |
usImageRF2D< Type >::usImageRF2D | ( | unsigned int | height, |
unsigned int | width | ||
) |
Initializing constructor.
height | Image height. |
width | Image width. |
Definition at line 174 of file usImageRF2D.h.
References usImageRF2D< Type >::init().
usImageRF2D< Type >::usImageRF2D | ( | unsigned int | height, |
unsigned int | width, | ||
const usImagePreScanSettings & | preScanSettings | ||
) |
Initializing constructor.
height | Image height. |
width | Image width. |
preScanSettings | Pre-scan image settings. |
Definition at line 187 of file usImageRF2D.h.
References usTransducerSettings::getScanLineNumber(), usImageRF2D< Type >::init(), and usImagePreScanSettings::setImagePreScanSettings().
usImageRF2D< Type >::usImageRF2D | ( | const usImageRF2D< Type > & | other | ) |
Copy constructor.
other | 2D RF image to copy |
Definition at line 202 of file usImageRF2D.h.
References usImageRF2D< Type >::getBitmap(), usImageRF2D< Type >::getHeight(), usImageRF2D< Type >::getWidth(), and usImageRF2D< Type >::resize().
|
virtual |
Destructor.
Definition at line 215 of file usImageRF2D.h.
|
inherited |
Axial resolution getter.
Definition at line 120 of file usImagePreScanSettings.cpp.
Referenced by usMHDSequenceReader::acquire(), usPreScanToPostScan2DConverter::convert(), usMHDSequenceReader::getImage(), usNetworkGrabberPreScan3D::includeFrameInVolume(), usNetworkGrabberRF3D::includeFrameInVolume(), usPreScanToPostScan3DConverter::init(), usImagePreScanSettings::operator=(), usImagePreScanSettings::operator==(), usImageIo::read(), usImageIo::write(), and usMHDSequenceWriter::write().
const Type * usImageRF2D< Type >::getBitmap |
Getter for a const pointer on the image bitmap.
Definition at line 430 of file usImageRF2D.h.
Referenced by usImageRF2D< Type >::operator=(), and usImageRF2D< Type >::usImageRF2D().
|
inherited |
Setter for depth : distance in meters between first and last pixel in a scan line.
Definition at line 289 of file usTransducerSettings.cpp.
Referenced by usPostScanToPreScan2DConverter::convert(), usPreScanToPostScan2DConverter::convert(), usRFToPreScan3DConverter::convert(), usNetworkGrabberPreScan2D::dataArrived(), usNetworkGrabberPreScan3D::includeFrameInVolume(), usNetworkGrabberRF3D::includeFrameInVolume(), usPostScanToPreScan2DConverter::init(), usPreScanToPostScan2DConverter::init(), and usTransducerSettings::operator=().
|
inherited |
Getter for the transducer field of view (based on scan line number and pitch).
Definition at line 244 of file usTransducerSettings.cpp.
Referenced by usPostScanToPreScan2DConverter::convert(), usPostScanToPreScan2DConverter::init(), usPreScanToPostScan2DConverter::init(), usImageDisplayWidgetRobotControl::updateConfidenceAngle(), and usImageDisplayWidgetQmlOverlayServoing::updateConfidenceAngle().
unsigned int usImageRF2D< Type >::getHeight |
Getter for the height of the image
Definition at line 412 of file usImageRF2D.h.
Referenced by usRFToPreScan2DConverter::convert(), usSignalProcessing::Difference(), usSignalProcessing::getXGradient(), usSignalProcessing::getYGradient(), usNetworkGrabberRF3D::includeFrameInVolume(), usImageRF3D< Type >::insertFrame(), usImageRF2D< Type >::operator=(), usImageRF2D< Type >::operator==(), usElastography::run(), usImageRF2D< Type >::usImageRF2D(), and usMHDSequenceWriter::write().
|
inherited |
Definition at line 122 of file usImagePreScanSettings.cpp.
unsigned int usImageRF2D< Type >::getNumberOfPixel |
Getter for the number of pixels in the image.
Definition at line 418 of file usImageRF2D.h.
Referenced by usNetworkGrabberRF3D::dataArrived().
|
inherited |
Getter for the probe name.
Definition at line 232 of file usTransducerSettings.cpp.
unsigned int usImageRF2D< Type >::getRFSampleNumber |
Get the number of RF samples in a scan line.
Definition at line 305 of file usImageRF2D.h.
Referenced by usImageIo::write().
|
inherited |
Getter for sampling frequency : frequency used to sample the echo of the ultrasound wave.
Definition at line 305 of file usTransducerSettings.cpp.
Referenced by usTransducerSettings::operator=(), usTransducerSettings::operator==(), usImageIo::read(), usImageIo::write(), usMHDSequenceWriter::write(), and usImageSettingsXmlParser::writeMainClass().
|
inherited |
Getter for the scan line number.
Definition at line 216 of file usTransducerSettings.cpp.
Referenced by usPixelMeterConversion::convert(), usMeterPixelConversion::convert(), usPostScanToPreScan2DConverter::convert(), usPreScanToPostScan2DConverter::convert(), usNetworkGrabberPreScan3D::includeFrameInVolume(), usNetworkGrabberRF3D::includeFrameInVolume(), usTransducerSettings::operator=(), usTransducerSettings::operator==(), usImageIo::read(), usImagePreScan2D< Type >::usImagePreScan2D(), usImagePreScan3D< Type >::usImagePreScan3D(), usImageRF2D< Type >::usImageRF2D(), usImageRF3D< Type >::usImageRF3D(), usImageIo::write(), usMHDSequenceWriter::write(), and usImageSettingsXmlParser::writeMainClass().
|
inherited |
Get the scan line pitch (m).
Definition at line 182 of file usTransducerSettings.cpp.
Referenced by usPixelMeterConversion::convert(), usMeterPixelConversion::convert(), usPreScanToPostScan2DConverter::convert(), usNetworkGrabberPreScan3D::includeFrameInVolume(), usNetworkGrabberRF3D::includeFrameInVolume(), usPostScanToPreScan2DConverter::init(), usPreScanToPostScan2DConverter::init(), usTransducerSettings::operator=(), usTransducerSettings::operator==(), usImageIo::read(), usImageDisplayWidgetRobotControl::updateConfidenceAngle(), usImageDisplayWidgetQmlOverlayServoing::updateConfidenceAngle(), usImageIo::write(), usMHDSequenceWriter::write(), and usImageSettingsXmlParser::writeMainClass().
const Type * usImageRF2D< Type >::getSignal | ( | unsigned int | scanlineIndex | ) | const |
Getter for the RF signal at a certain scanline index.
scanlineIndex | The index of the scanline to acess. |
Definition at line 437 of file usImageRF2D.h.
Referenced by usRFToPreScan2DConverter::convert().
|
inherited |
Get the probe transducer radius (m).
Definition at line 163 of file usTransducerSettings.cpp.
Referenced by usPixelMeterConversion::convert(), usMeterPixelConversion::convert(), usPostScanToPreScan2DConverter::convert(), usPreScanToPostScan2DConverter::convert(), usNetworkGrabberPreScan3D::includeFrameInVolume(), usNetworkGrabberRF3D::includeFrameInVolume(), usPostScanToPreScan2DConverter::init(), usPreScanToPostScan2DConverter::init(), usTransducerSettings::operator=(), usTransducerSettings::operator==(), usImageIo::read(), usImageIo::write(), usMHDSequenceWriter::write(), and usImageSettingsXmlParser::writeMainClass().
|
inherited |
Getter for transducer settings : allows heritating classes to get the transducer settings.
Definition at line 295 of file usTransducerSettings.cpp.
|
inherited |
Getter for transmit frequency : frequency of the ultrasound wave used.
Definition at line 311 of file usTransducerSettings.cpp.
Referenced by usTransducerSettings::operator=(), usTransducerSettings::operator==(), usImageIo::read(), usImageIo::write(), usMHDSequenceWriter::write(), and usImageSettingsXmlParser::writeMainClass().
unsigned int usImageRF2D< Type >::getWidth |
Getter for the width of the image
Definition at line 424 of file usImageRF2D.h.
Referenced by usRFToPreScan2DConverter::convert(), usSignalProcessing::Difference(), usSignalProcessing::getXGradient(), usSignalProcessing::getYGradient(), usNetworkGrabberRF3D::includeFrameInVolume(), usImageRF3D< Type >::insertFrame(), usImageRF2D< Type >::operator=(), usImageRF2D< Type >::operator==(), usElastography::run(), usImageRF2D< Type >::usImageRF2D(), and usMHDSequenceWriter::write().
void usImageRF2D< Type >::init | ( | unsigned int | height, |
unsigned int | width | ||
) |
Set the size of the image.
Image initialization.
Allocate memory for an [h x w] image, using column major image convention.
width | : Image width. |
height | : Image height. |
Element of the bitmap are not initialized
If the image has been already initialized, memory allocation is done only if the new image size is different, else we re-use the same memory space.
vpException::memoryAllocationError |
Definition at line 371 of file usImageRF2D.h.
Referenced by usImageRF2D< Type >::usImageRF2D(), and usNetworkGrabberRF3D::usNetworkGrabberRF3D().
|
inherited |
Returns the probe transducer type.
Definition at line 201 of file usTransducerSettings.cpp.
Referenced by usPixelMeterConversion::convert(), usMeterPixelConversion::convert(), usPostScanToPreScan2DConverter::convert(), usPreScanToPostScan2DConverter::convert(), usPostScanToPreScan2DConverter::init(), usPreScanToPostScan2DConverter::init(), usPreScanToPostScan3DConverter::init(), usTransducerSettings::operator=(), usTransducerSettings::operator==(), usImageIo::read(), usTransducerSettings::setTransducerConvexity(), usImageIo::write(), usMHDSequenceWriter::write(), and usImageSettingsXmlParser::writeMainClass().
|
inherited |
Compare two probe transducer settings.
Definition at line 125 of file usTransducerSettings.cpp.
References usTransducerSettings::operator==().
Type usImageRF2D< Type >::operator() | ( | unsigned int | i, |
unsigned int | j | ||
) | const |
operator() allows to access/modify RF samples values in the image.
Access operator.
i | Row index of the pixel to access. |
j | Column index of the pixel to access. |
Definition at line 267 of file usImageRF2D.h.
void usImageRF2D< Type >::operator() | ( | unsigned int | i, |
unsigned int | j, | ||
const Type & | value | ||
) |
Pixel writing operator.
i | Row index of the pixel to write. |
j | Column index of the pixel to write. |
value | The value to write. |
Definition at line 281 of file usImageRF2D.h.
usImageRF2D< Type > & usImageRF2D< Type >::operator= | ( | const usImageRF2D< Type > & | other | ) |
Copy operator.
Definition at line 231 of file usImageRF2D.h.
References usImageRF2D< Type >::getBitmap(), usImageRF2D< Type >::getHeight(), usImageRF2D< Type >::getWidth(), and usImagePreScanSettings::operator=().
|
inherited |
Comparison operator.
other | usImagePreScanSettings to compare with. |
Definition at line 97 of file usImagePreScanSettings.cpp.
References usImagePreScanSettings::getAxialResolution().
Referenced by usImageRF2D< Type >::operator==().
bool usImageRF2D< Type >::operator== | ( | const usImageRF2D< Type > & | other | ) |
Comparison operator.
Definition at line 245 of file usImageRF2D.h.
References usImageRF2D< Type >::getHeight(), usImageRF2D< Type >::getWidth(), and usImagePreScanSettings::operator==().
|
inherited |
Compare two probe transducer settings.
Definition at line 111 of file usTransducerSettings.cpp.
References usTransducerSettings::getSamplingFrequency(), usTransducerSettings::getScanLineNumber(), usTransducerSettings::getScanLinePitch(), usTransducerSettings::getTransducerRadius(), usTransducerSettings::getTransmitFrequency(), and usTransducerSettings::isTransducerConvex().
Referenced by usTransducerSettings::operator!=(), and usImagePostScan3D< Type >::operator==().
void usImageRF2D< Type >::resize | ( | const unsigned int | height, |
const unsigned int | width | ||
) |
Resize the 2D RF image.
Updates also the transducer scan line number that corresponds to the image width.
height | Image height. |
width | Image width. |
Definition at line 328 of file usImageRF2D.h.
Referenced by usMHDSequenceReader::acquire(), usNetworkGrabberRF3D::dataArrived(), usImageRF3D< Type >::getFrame(), usMHDSequenceReader::getImage(), usImageIo::read(), and usImageRF2D< Type >::usImageRF2D().
void usImageRF2D< Type >::resize | ( | const unsigned int | height, |
const unsigned int | width, | ||
const Type & | val | ||
) |
Resize the 2D RF image.
Updates also the transducer scan line number that corresponds to the image width.
height | Image height. |
width | Image width. |
val | Value to set in every pixel. |
Definition at line 343 of file usImageRF2D.h.
|
inherited |
Getter to know if the scan line number is set (usefull in case of field of view setter call).
Definition at line 277 of file usTransducerSettings.cpp.
Referenced by usTransducerSettings::operator=().
|
inherited |
Axial resolution setter.
axialResolution | Axial resloution to assign to the settings. |
Definition at line 115 of file usImagePreScanSettings.cpp.
Referenced by usMHDSequenceReader::acquire(), usPostScanToPreScan2DConverter::convert(), usRFToPreScan3DConverter::convert(), usNetworkGrabberPreScan2D::dataArrived(), usNetworkGrabberPreScan3D::dataArrived(), usNetworkGrabberRF3D::dataArrived(), usMHDSequenceReader::getImage(), and usImageIo::read().
|
inherited |
Setter for depth : distance in meters between first and last pixel in a scan line.
depth | Distance in meters. |
Definition at line 283 of file usTransducerSettings.cpp.
Referenced by usMHDSequenceReader::acquire(), usPreScanToPostScan2DConverter::convert(), usNetworkGrabberPreScan2D::dataArrived(), usNetworkGrabberPreScan3D::dataArrived(), usNetworkGrabberRF3D::dataArrived(), usMHDSequenceReader::getImage(), and usImageIo::read().
|
inherited |
Setter for the transducer field of view (updates the scan line pitch).
fieldOfView | The transducer field of view in radians if the transducer is convex, in meters if the transducer is linear. |
Definition at line 265 of file usTransducerSettings.cpp.
Referenced by usPostScanToPreScan2DConverter::convert().
|
inherited |
Copy constructor.
preScanSettings | Pre-scan settings to copy. |
Definition at line 71 of file usImagePreScanSettings.cpp.
Referenced by usMHDSequenceReader::acquire(), usPostScanToPreScan2DConverter::convert(), usRFToPreScan2DConverter::convert(), usRFToPreScan3DConverter::convert(), usImageRF3D< Type >::getFrame(), usMHDSequenceReader::getImage(), usImageIo::read(), usScanlineConfidence2D::run(), and usImageRF2D< Type >::usImageRF2D().
|
inherited |
Setter for the probe name.
probeName | Name of the probe. |
Definition at line 238 of file usTransducerSettings.cpp.
|
inherited |
Setter for sampling frequency : frequency used to sample the echo of the ultrasound wave.
samplingFrequency | Frequency in Hz. |
Definition at line 317 of file usTransducerSettings.cpp.
Referenced by usMHDSequenceReader::acquire(), usNetworkGrabberPreScan2D::dataArrived(), usNetworkGrabberPreScan3D::dataArrived(), usNetworkGrabberRF3D::dataArrived(), usMHDSequenceReader::getImage(), usImageIo::read(), usImageSettingsXmlParser::readMainClass(), and usImageSettingsXmlParser::setImageSettings().
void usImageRF2D< Type >::setScanLineNumber | ( | unsigned int | scanLineNumber | ) |
Set the transducer scan line number.
Resize also the image width that is equal to the scan line number.
scanLineNumber | Number of scan lines acquired by the transducer. |
Definition at line 313 of file usImageRF2D.h.
References usTransducerSettings::setScanLineNumber().
|
inherited |
Set the scan line pitch.
scanLinePitch | If the probe transducer is convex, this parameters refers to the angle in radians between two successive scan lines acquired by the transducer. If the probe is linear, this parameters refers to the distance in meters between two successive scan lines acquired by the transducer. |
Definition at line 171 of file usTransducerSettings.cpp.
Referenced by usMHDSequenceReader::acquire(), usPreScanToPostScan2DConverter::convert(), usNetworkGrabberPreScan2D::dataArrived(), usNetworkGrabberPreScan3D::dataArrived(), usNetworkGrabberRF3D::dataArrived(), usMHDSequenceReader::getImage(), usImageIo::read(), usImageSettingsXmlParser::readMainClass(), and usImageSettingsXmlParser::setImageSettings().
|
inherited |
Set the probe transducer type.
isTransducerConvex | True if the transducer is convex, false if the transducer is linear. Sets the probe transducer radius to 0 in case of a linear transducer. |
Definition at line 189 of file usTransducerSettings.cpp.
References usTransducerSettings::isTransducerConvex().
Referenced by usMHDSequenceReader::acquire(), usPostScanToPreScan2DConverter::convert(), usPreScanToPostScan2DConverter::convert(), usNetworkGrabberPreScan2D::dataArrived(), usNetworkGrabberPreScan3D::dataArrived(), usNetworkGrabberRF3D::dataArrived(), usMHDSequenceReader::getImage(), usImageIo::read(), usImageSettingsXmlParser::readMainClass(), and usImageSettingsXmlParser::setImageSettings().
|
inherited |
Set the probe transducer radius (m).
transducerRadius | Probe transducer radius in meters. The probe transducer radius is set to 0 in case of a linear probe. See isTransducerConvex() and setProbeConvex(bool) for more information. |
Definition at line 157 of file usTransducerSettings.cpp.
Referenced by usMHDSequenceReader::acquire(), usPostScanToPreScan2DConverter::convert(), usPreScanToPostScan2DConverter::convert(), usNetworkGrabberPreScan2D::dataArrived(), usNetworkGrabberPreScan3D::dataArrived(), usNetworkGrabberRF3D::dataArrived(), usMHDSequenceReader::getImage(), usImageIo::read(), usImageSettingsXmlParser::readMainClass(), and usImageSettingsXmlParser::setImageSettings().
|
inherited |
Assignment operator.
other | Settings you want to assign. |
Definition at line 210 of file usTransducerSettings.cpp.
Referenced by usPreScanToPostScan3DConverter::convert().
|
inherited |
Setter for transmit frequency : frequency of the ultrasound wave used.
transmitFrequency | Frequency in Hz. |
Definition at line 326 of file usTransducerSettings.cpp.
Referenced by usMHDSequenceReader::acquire(), usNetworkGrabberPreScan2D::dataArrived(), usNetworkGrabberPreScan3D::dataArrived(), usNetworkGrabberRF3D::dataArrived(), usMHDSequenceReader::getImage(), usImageIo::read(), usImageSettingsXmlParser::readMainClass(), and usImageSettingsXmlParser::setImageSettings().
|
friend |
Definition at line 114 of file usImageRF2D.h.
|
friend |
Definition at line 115 of file usImageRF2D.h.
|
friend |
Definition at line 113 of file usImageRF2D.h.
|
friend |
Definition at line 116 of file usImageRF2D.h.