UsTK : Ultrasound ToolKit  version 2.0.1 under development (2024-12-17)
usRFToPreScan3DConverter Class Reference

#include <visp3/ustk_core/usRFToPreScan3DConverter.h>

Public Member Functions

 usRFToPreScan3DConverter ()
 
 ~usRFToPreScan3DConverter ()
 
void convert (const usImageRF3D< short int > &rfImage, usImagePreScan3D< unsigned char > &preScanImage)
 
int getDecimationFactor ()
 
void setDecimationFactor (int decimationFactor)
 

Protected Member Functions

void init (int heightRF, int widthRF, int frameNumber)
 

Detailed Description

3D conversion from RF signal to pre-scan image

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

#include <visp3/ustk_core/usRFToPreScan3DConverter.h>
#include <visp3/ustk_core/usImage3D.h>
#include <visp3/ustk_core/usImageRF3D.h>
#include <visp3/ustk_core/usImagePreScan3D.h>
int main()
{
#if defined(USTK_HAVE_FFTW)
// example of 2D post-scan image settings
unsigned int width = 320;
unsigned int height = 240;
unsigned int frames = 10;
double transducerRadius = 0.045;
double scanLinePitch = 0.0012;
unsigned int scanLineNumber = 256;
bool isTransducerConvex = true;
double axialResolution = 0.002;
double framePitch = 0.002;
double motorRadius = 0.04;
usImage3D<short int> I(height, width,frames);
usImageRF3D<short int> rfImage; // to fill (image + settings)
rfImage.setTransducerRadius(transducerRadius);
rfImage.setScanLinePitch(scanLinePitch);
rfImage.setScanLineNumber(scanLineNumber);
rfImage.setTransducerConvexity(isTransducerConvex);
rfImage.setAxialResolution(axialResolution);
rfImage.setMotorRadius(motorRadius);
rfImage.setFramePitch(framePitch);
usImagePreScan3D<unsigned char> prescanImage; // output
converter.convert(rfImage,prescanImage);
#endif
return 0;
}
Representation of a physical image volume.
Definition: usImage3D.h:61
void setAxialResolution(const double axialResolution)
void setScanLineNumber(unsigned int scanLineNumber)
Definition: usImageRF3D.h:327
void setMotorType(const usMotorType &motorType)
void setMotorRadius(double motorRadius)
void setFramePitch(double framePitch)
3D conversion from RF signal to pre-scan image
void convert(const usImageRF3D< short int > &rfImage, usImagePreScan3D< unsigned char > &preScanImage)
void setTransducerConvexity(const bool isTransducerConvex)
void setScanLinePitch(const double scanLinePitch)
void setTransducerRadius(const double transducerRadius)
Examples
tutorial-ultrasonix-qt-grabbing-RF3D.cpp, and tutorial-ustk-virtual-server-RF3D.cpp.

Definition at line 109 of file usRFToPreScan3DConverter.h.

Constructor & Destructor Documentation

◆ usRFToPreScan3DConverter()

usRFToPreScan3DConverter::usRFToPreScan3DConverter ( )

Constructor.

Definition at line 50 of file usRFToPreScan3DConverter.cpp.

◆ ~usRFToPreScan3DConverter()

usRFToPreScan3DConverter::~usRFToPreScan3DConverter ( )

Destructor.

Definition at line 55 of file usRFToPreScan3DConverter.cpp.

Member Function Documentation

◆ convert()

void usRFToPreScan3DConverter::convert ( const usImageRF3D< short int > &  rfImage,
usImagePreScan3D< unsigned char > &  preScanImage 
)

◆ getDecimationFactor()

int usRFToPreScan3DConverter::getDecimationFactor ( )

Decimation factor getter.

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

Definition at line 108 of file usRFToPreScan3DConverter.cpp.

Referenced by convert().

◆ init()

void usRFToPreScan3DConverter::init ( int  heightRF,
int  widthRF,
int  frameNumber 
)
protected

Initialisation of the converter.

Definition at line 124 of file usRFToPreScan3DConverter.cpp.

References usRFToPreScan2DConverter::setDecimationFactor().

Referenced by convert().

◆ setDecimationFactor()

void usRFToPreScan3DConverter::setDecimationFactor ( int  decimationFactor)

Decimation factor setter.

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

Definition at line 114 of file usRFToPreScan3DConverter.cpp.

Referenced by usRFToPostScan3DConverter::usRFToPostScan3DConverter().