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

#include <visp3/ustk_core/usMotorSettings.h>

+ Inheritance diagram for usMotorSettings:

Public Types

enum  usMotorType { LinearMotor = 0 , TiltingMotor = 1 , RotationalMotor = 2 }
 

Public Member Functions

 usMotorSettings ()
 
 usMotorSettings (double motorRadius, double framePitch, unsigned int frameNumber, const usMotorType &motorType)
 
 usMotorSettings (const usMotorSettings &other)
 
virtual ~usMotorSettings ()
 

Inherited functionalities from usMotorSettings

unsigned int getFrameNumber () const
 
double getFramePitch () const
 
double getMotorFieldOfView () const
 
double getMotorRadius () const
 
usMotorSettings getMotorSettings () const
 
usMotorType getMotorType () const
 
bool frameNumberIsSet () const
 
usMotorSettingsoperator= (const usMotorSettings &other)
 
bool operator== (const usMotorSettings &other)
 
bool operator!= (const usMotorSettings &other)
 
void setFrameNumber (unsigned int frameNumber)
 
void setFramePitch (double framePitch)
 
void setMotorFieldOfView (double motorFieldOfView)
 
void setMotorRadius (double motorRadius)
 
void setMotorSettings (const usMotorSettings &other)
 
void setMotorType (const usMotorType &motorType)
 
VISP_EXPORT std::ostream & operator<< (std::ostream &out, const usMotorSettings &other)
 

Detailed Description

Generic class for 3D ultrasound motor settings associated to the 3D probe used during acquisition.

This class represents motor settings for 3D ultrasound images which are the common settings corresponding to the motor used to produce the third dimension.

These settings are:

  • the type of motor used to move the transducer: linear, tilting (small rotation) or rotationnal (360° rotation). This type is defined in usMotorType and could be set using setMotorType(). To retrieve the motor type use getMotorType().
  • the motor radius $R_{_M}$ (value set to zero for a linear motor). This value could be set using setMotorRadius() or get using getMotorRadius().
  • the frame pitch that corresponds to the angle $\alpha_{_F}$ (in radians) between to successive frame acquisitions when the motor is convex, or to the distance $d_{_F}$ (in meters) when the motor is linear. To set this value use setFramePitch() and to access use getFramePitch().
  • the frame number $n_{_F}$ that corresponds to the number of frames acquired by the probe to generate the 3D volume. This number is set using setFrameNumber() and could be retrieved using getFrameNumber().

The following figure summerize these motor settings.

Definition at line 77 of file usMotorSettings.h.

Member Enumeration Documentation

◆ usMotorType

Enumerator for motor type

Enumerator
LinearMotor 

Case of a linear motor.

TiltingMotor 

Case of a tilting motor (small rotation).

RotationalMotor 

Case of a roatational motor (360° rotation).

Definition at line 81 of file usMotorSettings.h.

Constructor & Destructor Documentation

◆ usMotorSettings() [1/3]

usMotorSettings::usMotorSettings ( )

Basic Constructor, all settings set to default.

Definition at line 50 of file usMotorSettings.cpp.

◆ usMotorSettings() [2/3]

usMotorSettings::usMotorSettings ( double  motorRadius,
double  framePitch,
unsigned int  frameNumber,
const usMotorType motorType 
)

Full Constructor, all settings availables

Parameters
motorRadiusDistance between the rotation center of the probe motor and the first pixel arc acquired, in meters (m).
framePitchPitch between two sucessive frames. In meters if motorType is linear, in radians (rad) otherwise.
frameNumberNumber of frame acquired by the probe.
motorTypeProbe motor type.

Definition at line 63 of file usMotorSettings.cpp.

◆ usMotorSettings() [3/3]

usMotorSettings::usMotorSettings ( const usMotorSettings other)

Copy Constructor, all settings availables

Parameters
otherusMotorSettings you want to copy.

Definition at line 74 of file usMotorSettings.cpp.

◆ ~usMotorSettings()

usMotorSettings::~usMotorSettings ( )
virtual

Destructor.

Definition at line 83 of file usMotorSettings.cpp.

Member Function Documentation

◆ frameNumberIsSet()

bool usMotorSettings::frameNumberIsSet ( ) const

Getter to know if the scan frame is set (usefull in case of field of view setter call).

Returns
Boolean to know if the frame number is set or not.

Definition at line 200 of file usMotorSettings.cpp.

Referenced by operator=(), and operator==().

◆ getFrameNumber()

◆ getFramePitch()

double usMotorSettings::getFramePitch ( ) const

Get the frame pitch (radians or meters).

Returns
framePitch Frame pitch between two sucessive frames. In meters if motorType is linear, in radians otherwise.

Definition at line 153 of file usMotorSettings.cpp.

Referenced by usPixelMeterConversion::convert(), usMeterPixelConversion::convert(), operator=(), operator==(), usImageIo::write(), usMHDSequenceWriter::write(), and usImageSettingsXmlParser::writeMainClass().

◆ getMotorFieldOfView()

double usMotorSettings::getMotorFieldOfView ( ) const

Getter for the motor field of view (based on frame number and pitch).

Returns
The motor field of view in radians if the probe is convex, in meters if it is linear.

Definition at line 206 of file usMotorSettings.cpp.

◆ getMotorRadius()

double usMotorSettings::getMotorRadius ( ) const

◆ getMotorSettings()

usMotorSettings usMotorSettings::getMotorSettings ( ) const

Definition at line 234 of file usMotorSettings.cpp.

◆ getMotorType()

usMotorSettings::usMotorType usMotorSettings::getMotorType ( ) const

Get the motor type : linear, titling (small rotation angle) or rotational (360° rotation).

Returns
usMotorType to get the motor type.

Definition at line 178 of file usMotorSettings.cpp.

Referenced by usPixelMeterConversion::convert(), usMeterPixelConversion::convert(), usPreScanToPostScan3DConverter::init(), operator=(), operator==(), usImageIo::write(), usMHDSequenceWriter::write(), and usImageSettingsXmlParser::writeMainClass().

◆ operator!=()

bool usMotorSettings::operator!= ( const usMotorSettings other)

Compare two motor settings.

Parameters
otherMotor settings to compare.
Returns
false if settings are the same, true otherwise.

Definition at line 116 of file usMotorSettings.cpp.

References operator==().

◆ operator=()

usMotorSettings & usMotorSettings::operator= ( const usMotorSettings other)

Assignment operator.

Parameters
otherMotor settings you want to copy.

Definition at line 89 of file usMotorSettings.cpp.

References frameNumberIsSet(), getFrameNumber(), getFramePitch(), getMotorRadius(), and getMotorType().

Referenced by usImagePostScan3D< Type >::operator=(), usImagePreScan3D< Type >::operator=(), and usImageRF3D< Type >::operator=().

◆ operator==()

bool usMotorSettings::operator== ( const usMotorSettings other)

Compare two motor settings.

Parameters
otherMotor settings to compare.
Returns
true if settings are the same, false otherwise.

Definition at line 104 of file usMotorSettings.cpp.

References frameNumberIsSet(), getFrameNumber(), getFramePitch(), getMotorRadius(), and getMotorType().

Referenced by operator!=(), and usImagePostScan3D< Type >::operator==().

◆ setFrameNumber()

void usMotorSettings::setFrameNumber ( unsigned int  frameNumber)

◆ setFramePitch()

void usMotorSettings::setFramePitch ( double  framePitch)

◆ setMotorFieldOfView()

void usMotorSettings::setMotorFieldOfView ( double  motorFieldOfView)

Setter for the motor field of view (updates the frame pitch).

Parameters
motorFieldOfViewThe motor field of view in radians if the motor is convex, in meters if the motor is linear.
Warning
Be sure to use setFrameNumber() to update the frame number before the field of view since this method computes the frame pitch from the field of view and the frame pitch.
usMotorSettings motorSettings;
motorSettings.setFrameNumber(128);
motorSettings.setMotorFieldOfView(vpMath::rad(57.0)); // field of view is 57 deg
Generic class for 3D ultrasound motor settings associated to the 3D probe used during acquisition.
void setFrameNumber(unsigned int frameNumber)
void setMotorFieldOfView(double motorFieldOfView)

Definition at line 226 of file usMotorSettings.cpp.

◆ setMotorRadius()

void usMotorSettings::setMotorRadius ( double  motorRadius)

◆ setMotorSettings()

void usMotorSettings::setMotorSettings ( const usMotorSettings other)

Set the motor settings from other motor settings.

Returns
usMotorSettings Settings to copy.

Definition at line 184 of file usMotorSettings.cpp.

Referenced by usMHDSequenceReader::acquire(), usRFToPreScan3DConverter::convert(), usPreScanToPostScan3DConverter::convert(), usMHDSequenceReader::getImage(), and usImageIo::read().

◆ setMotorType()

void usMotorSettings::setMotorType ( const usMotorType motorType)

Set the motor type : convex or linear (from probe type used to acquire the image).

Parameters
motorTypeMotor type to specify the motor type : LinearMotor, TiltingMotor (for a rotative motor), RotationalMotor (for a 360° rotative motor).
Examples
testUsImagePostScan3DMhdParser.cpp, and testUsImagePreScan3DMhdParser.cpp.

Definition at line 166 of file usMotorSettings.cpp.

References LinearMotor, and setMotorRadius().

Referenced by usMHDSequenceReader::acquire(), usNetworkGrabberPreScan3D::dataArrived(), usNetworkGrabberRF3D::dataArrived(), usMHDSequenceReader::getImage(), usImageIo::read(), and usImageSettingsXmlParser::readMainClass().

Friends And Related Function Documentation

◆ operator<<

VISP_EXPORT std::ostream& operator<< ( std::ostream &  out,
const usMotorSettings other 
)
friend

Print probe settings information.

Definition at line 121 of file usMotorSettings.cpp.