UsTK : Ultrasound ToolKit
version 2.0.1 under development (2024-11-21)
|
#include <visp3/ustk_core/usPostScanToPreScan2DConverter.h>
Public Member Functions | |
usPostScanToPreScan2DConverter () | |
usPostScanToPreScan2DConverter (const usImagePostScan2D< unsigned char > &inputSettings, const int BModeSampleNumber, const int scanLineNumber) | |
usPostScanToPreScan2DConverter (const usTransducerSettings &transducerSettings, const int BModeSampleNumber, const int scanLineNumber, const double xResolution, const double yResolution) | |
~usPostScanToPreScan2DConverter () | |
void | convert (const usImagePostScan2D< unsigned char > &imageToConvert, usImagePreScan2D< unsigned char > &imageConverted, int preScanSamples) |
Protected Member Functions | |
void | init (const usImagePostScan2D< unsigned char > &inputSettings, const int BModeSampleNumber, const int scanLineNumber) |
void | init (const usTransducerSettings &inputSettings, const int BModeSampleNumber, const int scanLineNumber, const double xResolution, const double yResolution) |
2D back-scan converter
This class allows to convert a 2D post-scan ultrasound image to a pre-scan image. The convertion is applied in the convert() method.
Considering the following usImagePostScan2D image (convex or linear) as input:
this class generates an usImagePreScan2D (convex or linear) as output:
Here is an example of how to use the converter, to build a pre-scan image from a post-scan image.
Definition at line 90 of file usPostScanToPreScan2DConverter.h.
usPostScanToPreScan2DConverter::usPostScanToPreScan2DConverter | ( | ) |
Default constructor.
Definition at line 39 of file usPostScanToPreScan2DConverter.cpp.
usPostScanToPreScan2DConverter::usPostScanToPreScan2DConverter | ( | const usImagePostScan2D< unsigned char > & | inputSettings, |
const int | BModeSampleNumber, | ||
const int | scanLineNumber | ||
) |
Initialisation constructor.
inputSettings | Post-scan settings you want to use to back-convert image. |
BModeSampleNumber | Number of samples along a scan line : height of the pre-scan image built by run(). |
scanLineNumber | Number of scan lines : width of the pre-scan image built by run(). |
Definition at line 47 of file usPostScanToPreScan2DConverter.cpp.
References init().
usPostScanToPreScan2DConverter::usPostScanToPreScan2DConverter | ( | const usTransducerSettings & | transducerSettings, |
const int | BModeSampleNumber, | ||
const int | scanLineNumber, | ||
const double | xResolution, | ||
const double | yResolution | ||
) |
Default constructor.
Definition at line 56 of file usPostScanToPreScan2DConverter.cpp.
References init().
usPostScanToPreScan2DConverter::~usPostScanToPreScan2DConverter | ( | ) |
Destructor.
Definition at line 66 of file usPostScanToPreScan2DConverter.cpp.
void usPostScanToPreScan2DConverter::convert | ( | const usImagePostScan2D< unsigned char > & | imageToConvert, |
usImagePreScan2D< unsigned char > & | imageConverted, | ||
int | preScanSamples | ||
) |
Run the back-scan converter.
[in] | imageToConvert | Post-scan image to convert back. |
[out] | imageConverted | Pre-scan image obtained after back conversion. |
[in] | preScanSamples | Pre-scan samples number wanted in output. |
Definition at line 192 of file usPostScanToPreScan2DConverter.cpp.
References usImagePreScan2D< Type >::getBModeSampleNumber(), usTransducerSettings::getDepth(), usTransducerSettings::getFieldOfView(), usTransducerSettings::getScanLineNumber(), usTransducerSettings::getTransducerRadius(), init(), usTransducerSettings::isTransducerConvex(), usImagePreScan2D< Type >::resize(), usImagePreScanSettings::setAxialResolution(), usTransducerSettings::setFieldOfView(), usImagePreScanSettings::setImagePreScanSettings(), usImagePreScan2D< Type >::setScanLineNumber(), usTransducerSettings::setTransducerConvexity(), and usTransducerSettings::setTransducerRadius().
|
protected |
Initialize the back-scan converter.
inputSettings | Post-scan settings you want to use to back-convert image. |
BModeSampleNumber | Number of samples along a scan line : height of the pre-scan image built by run(). |
scanLineNumber | Number of scan lines : width of the pre-scan image built by run(). |
Definition at line 74 of file usPostScanToPreScan2DConverter.cpp.
References usTransducerSettings::getDepth(), usTransducerSettings::getFieldOfView(), usImagePostScan2D< Type >::getHeightResolution(), usTransducerSettings::getScanLinePitch(), usTransducerSettings::getTransducerRadius(), usImagePostScan2D< Type >::getWidthResolution(), and usTransducerSettings::isTransducerConvex().
Referenced by convert(), and usPostScanToPreScan2DConverter().
|
protected |
Initialize the back-scan converter.
transducerSettings | Transducer settings of the pre-scan image. |
xResolution | Height of a pixel |
yResolution | Width of a pixel. |
BModeSampleNumber | Number of pre-scan samples you want in output of back conversion. |
scanLineNumber | Number of scan lines you want in output of back conversion. |
Definition at line 137 of file usPostScanToPreScan2DConverter.cpp.
References usTransducerSettings::getDepth(), usTransducerSettings::getFieldOfView(), usTransducerSettings::getTransducerRadius(), and usTransducerSettings::isTransducerConvex().