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

#include <visp3/ustk_core/usRFToPreScan2DConverter.h>

Public Member Functions

 usRFToPreScan2DConverter (int decimationFactor=10)
 
 ~usRFToPreScan2DConverter ()
 
void convert (const usImageRF2D< short int > &rfImage, usImagePreScan2D< unsigned char > &preScanImage)
 
int getDecimationFactor ()
 
void setDecimationFactor (int decimationFactor)
 

Friends

class usRFToPreScan3DConverter
 

Detailed Description

2D conversion from RF signal to pre-scan image

This class allows to convert 2D RF ultrasound images to pre-scan. Here is an example to show how to use it :

#include <visp3/core/vpImage.h>
#include <visp3/ustk_core/usRFToPreScan2DConverter.h>
#include <visp3/ustk_core/usImageRF2D.h>
#include <visp3/ustk_core/usImagePreScan2D.h>
int main()
{
#if defined(USTK_HAVE_FFTW)
// example of 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 axialResolution = 0.002;
vpImage<short int> I(height, width);
usImageRF2D<short int> rfImage; // to fill (image + settings)
rfImage.setTransducerRadius(transducerRadius);
rfImage.setScanLinePitch(scanLinePitch);
rfImage.setScanLineNumber(scanLineNumber);
rfImage.setTransducerConvexity(isTransducerConvex);
rfImage.setAxialResolution(axialResolution);
usImagePreScan2D<unsigned char> prescanImage; // output
converter.convert(rfImage, prescanImage);
#endif
return 0;
}
void setAxialResolution(const double axialResolution)
void setScanLineNumber(unsigned int scanLineNumber)
Definition: usImageRF2D.h:313
2D conversion from RF signal to pre-scan image
void convert(const usImageRF2D< short int > &rfImage, usImagePreScan2D< unsigned char > &preScanImage)
void setTransducerConvexity(const bool isTransducerConvex)
void setScanLinePitch(const double scanLinePitch)
void setTransducerRadius(const double transducerRadius)
Examples
tutorial-elastography-2D-separate-displays.cpp, tutorial-elastography-2D.cpp, tutorial-elastography-BMA-2D.cpp, tutorial-rfFileToPreScanConversion.cpp, tutorial-ultrasonix-qt-grabbing-RF-scan-conversion.cpp, tutorial-ultrasonix-qt-grabbing-RF.cpp, and tutorial-ustk-virtual-server-RF2D.cpp.

Definition at line 100 of file usRFToPreScan2DConverter.h.

Constructor & Destructor Documentation

◆ usRFToPreScan2DConverter()

usRFToPreScan2DConverter::usRFToPreScan2DConverter ( int  decimationFactor = 10)

Constructor.

Parameters
decimationFactorDecimation factor : keep only 1 pre-scan sample every N sample (N = decimationFactor)

Definition at line 47 of file usRFToPreScan2DConverter.cpp.

◆ ~usRFToPreScan2DConverter()

usRFToPreScan2DConverter::~usRFToPreScan2DConverter ( )

Destructor.

Definition at line 55 of file usRFToPreScan2DConverter.cpp.

Member Function Documentation

◆ convert()

void usRFToPreScan2DConverter::convert ( const usImageRF2D< short int > &  rfImage,
usImagePreScan2D< unsigned char > &  preScanImage 
)

◆ getDecimationFactor()

int usRFToPreScan2DConverter::getDecimationFactor ( )

Decimation factor getter.

Returns
Decimation factor : keep only 1 pre-scan sample every N sample (N = decimationFactor)

Definition at line 232 of file usRFToPreScan2DConverter.cpp.

◆ setDecimationFactor()

void usRFToPreScan2DConverter::setDecimationFactor ( int  decimationFactor)

Decimation factor setter.

Parameters
decimationFactor: keep only 1 pre-scan sample every N sample (N = decimationFactor)

Definition at line 238 of file usRFToPreScan2DConverter.cpp.

Referenced by usRFToPreScan3DConverter::init(), and usRFToPostScan2DConverter::setConversionParameters().

Friends And Related Function Documentation

◆ usRFToPreScan3DConverter

friend class usRFToPreScan3DConverter
friend

Definition at line 102 of file usRFToPreScan2DConverter.h.