UsTK : Ultrasound ToolKit  version 2.0.1 under development (2023-12-07)
usMeterPixelConversion Class Reference

#include <visp3/ustk_core/usMeterPixelConversion.h>

Static Public Member Functions

static void convert (const usImagePostScan2D< unsigned char > &image, const double &x, const double &y, double &u, double &v)
 
static void convert (const usImagePostScan3D< unsigned char > &image, const double &x, const double &y, const double &z, double &u, double &v, double &w)
 

Detailed Description

Conversion between a position in meters in the space and the equivalent pixel position in the ultrasound image.

  • The following image shows the correspondance between frames (u,v) and (x,y) for post-scan 2D images:
    The following image shows the correspondance between frames (u,v,w) and (x,y,z) for post-scan 3D images with linear motor:

Definition at line 60 of file usMeterPixelConversion.h.

Member Function Documentation

◆ convert() [1/2]

void usMeterPixelConversion::convert ( const usImagePostScan2D< unsigned char > &  image,
const double &  x,
const double &  y,
double &  u,
double &  v 
)
static

Conversion method for 2D ultrasound images.

Parameters
[in]image2D Post-scan image with transducer settings well filled.
[in]xPosition in meters along x axis to convert.
[in]yPosition in meters along y axis to convert.
[out]uConverted position in pixels along x axis.
[out]vConverted position in pixels along y axis.

Definition at line 49 of file usMeterPixelConversion.cpp.

References usImagePostScan2D< Type >::getHeightResolution(), usTransducerSettings::getScanLineNumber(), usTransducerSettings::getScanLinePitch(), usTransducerSettings::getTransducerRadius(), usImagePostScan2D< Type >::getWidthResolution(), and usTransducerSettings::isTransducerConvex().

◆ convert() [2/2]

void usMeterPixelConversion::convert ( const usImagePostScan3D< unsigned char > &  image,
const double &  x,
const double &  y,
const double &  z,
double &  u,
double &  v,
double &  w 
)
static

Conversion method for 3D ultrasound images.

Parameters
[in]image2D Post-scan image with voxels spacings, transducer settings and motor settings well filled.
[in]xPosition in meters along x axis to convert.
[in]yPosition in meters along y axis to convert.
[in]zPosition in meters along z axis to convert.
[out]uConverted position in pixels along x axis.
[out]vConverted position in pixels along y axis.
[out]wConverted position in pixels along z axis.

Definition at line 77 of file usMeterPixelConversion.cpp.

References usImagePostScan3D< Type >::getElementSpacingX(), usImagePostScan3D< Type >::getElementSpacingY(), usImagePostScan3D< Type >::getElementSpacingZ(), usMotorSettings::getFrameNumber(), usMotorSettings::getFramePitch(), usMotorSettings::getMotorRadius(), usMotorSettings::getMotorType(), usImage3D< Type >::getNumberOfFrames(), usTransducerSettings::getScanLineNumber(), usTransducerSettings::getScanLinePitch(), usTransducerSettings::getTransducerRadius(), usImage3D< Type >::getWidth(), usTransducerSettings::isTransducerConvex(), usMotorSettings::LinearMotor, and usMotorSettings::TiltingMotor.