#include <ImFusion/US/SweepOptimization.h>
Class that factors out the parametrization of an UltrasoundSweep as needed for registration, motion estimation and calibration.
More...
Class that factors out the parametrization of an UltrasoundSweep as needed for registration, motion estimation and calibration.
SweepOptimization provides a unified interface to optimize various parameters of an ultrasound sweep, including registration (rigid/affine), calibration, temporal offset, image size, probe trajectory motion, and parametric deformation. Parameters are optimized with relative to their initial values (see defineReferenceState()).
This class is designed to be used a base class for algorithms that optimize ultrasound sweep parameters.
|
|
| SweepOptimization (UltrasoundSweep *us) |
| | Constructor, stores the current sweep setting as reference state.
|
| |
|
void | defineReferenceState () |
| | Define the current sweep settings as reference for relative optimization.
|
| |
|
void | setOptRelativeToProbeTip (bool flag) |
| | Set whether to optimize the calibration and the size w.r.t. the tip of the probe instead of the image center.
|
| |
|
bool | optRelativeToProbeTip () const |
| | Returns whether to optimize the calibration and the size w.r.t. the tip of the probe instead of the image center.
|
| |
|
void | setUseReferenceCoordinateSystem (bool flag) |
| | Specify if the sweep's reference coordinate system shall be used.
|
| |
|
void | setMovingVolume (SharedImageSet *vol) |
| | Set pointer to a volume to be used instead of the ultrasound sweep to apply the registration to.
|
| |
|
void | setMotion (SweepMotion *sm) |
| | Set pointer to a sweep trajectory motion instance to also optimize.
|
| |
|
SweepMotion * | motion () const |
| | Return pointer to sweep trajectory motion instance.
|
| |
|
double | motionPenalty () const |
| | Computes a penalty to be used within sweep optimization taking into account geometry constraints.
|
| |
| bool | applyRegistrationPars (const double *sixParsRigid, const double *sixParsAffine=nullptr) |
| | Applies relative registration parameters to the ultrasound sweep or moving volume.
|
| |
| bool | applyCalibrationPars (const double *sixPars) |
| | Applies relative calibration parameters to the ultrasound sweep.
|
| |
| bool | applyTemporalOffsetPar (const double *onePar, double scaleFactor=0.1) |
| | Applies a relative temporal offset parameter to the ultrasound sweep.
|
| |
| bool | applyImageSizePars (const double *twoPars, double scaleFactor=1.) |
| | Applies relative image size parameters to the ultrasound sweep.
|
| |
| bool | applyMotionPars (int nPars, const double *pars) |
| | Applies motion parameters to the ultrasound sweep.
|
| |
| bool | applyDeformationPars (int nPars, const double *pars) |
| | Applies deformation parameters to the ultrasound sweep.
|
| |
|
UltrasoundSweep * | sweep () |
| | Returns the ultrasound sweep.
|
| |
|
|
static void | restorePositionOfProbeTipAfterSizeChange (UltrasoundSweep *sweep, vec2 prevSize) |
| | After the image size of sweep has been changed, this function can be used to adjust its calibration matrix, so that the tip of the probe is at the same position in the world coordinate system as before the size change (assuming that the image size before the size change was prevSize).
|
| |
|
|
UltrasoundSweep * | m_us |
| | Pointer to the ultrasound sweep.
|
| |
|
SharedImageSet * | m_movingVol = nullptr |
| | Pointer to the moving volume to be used instead of the sweep to apply the registration to.
|
| |
|
mat4 | m_initReg |
| | Initial registration at start of optimization.
|
| |
|
mat4 | m_initCal |
| | Initial calibration at start of optimization.
|
| |
|
double | m_initTemporal |
| | Initial temporal calibration.
|
| |
|
vec2 | m_initSize |
| | Initial size of the ultrasound frames.
|
| |
|
std::vector< double > | m_initMot |
| | Initial motion parameters if applicable.
|
| |
|
std::vector< double > | m_initDef |
| | Initial deformation parameters if applicable.
|
| |
|
mat4 | m_refMat |
| | Reference coordinate system for registration.
|
| |
|
bool | m_useRefCoord = false |
| | Use reference coordinate system, if available.
|
| |
|
SweepMotion * | m_motion = nullptr |
| | Optional instance for sweep trajectory motion.
|
| |
|
bool | m_optRelativeToProbeTip = false |
| | Whether to optimize the calibration and the size w.r.t the tip of the probe instead of the image center.
|
| |
◆ applyRegistrationPars()
| bool applyRegistrationPars |
( |
const double * | sixParsRigid, |
|
|
const double * | sixParsAffine = nullptr ) |
Applies relative registration parameters to the ultrasound sweep or moving volume.
- Parameters
-
| sixParsRigid | Rigid transformation parameters (translation and rotation). |
| sixParsAffine | Affine transformation parameters (scaling and shearing), optional. |
- Returns
- True if successful, false otherwise.
◆ applyCalibrationPars()
| bool applyCalibrationPars |
( |
const double * | sixPars | ) |
|
Applies relative calibration parameters to the ultrasound sweep.
- Parameters
-
| sixPars | Calibration parameters (translation and rotation). |
- Returns
- True if successful, false otherwise (if no sweep was provided).
◆ applyTemporalOffsetPar()
| bool applyTemporalOffsetPar |
( |
const double * | onePar, |
|
|
double | scaleFactor = 0.1 ) |
Applies a relative temporal offset parameter to the ultrasound sweep.
- Parameters
-
| onePar | Temporal offset parameter. |
| scaleFactor | Scaling factor for the parameter. |
- Returns
- True if successful, false otherwise (if no sweep was provided).
◆ applyImageSizePars()
| bool applyImageSizePars |
( |
const double * | twoPars, |
|
|
double | scaleFactor = 1. ) |
Applies relative image size parameters to the ultrasound sweep.
- Parameters
-
| twoPars | Image size parameters (xSize, ySize). |
| scaleFactor | Scaling factor for the parameters. |
- Returns
- True if successful, false otherwise (if no sweep was provided).
◆ applyMotionPars()
| bool applyMotionPars |
( |
int | nPars, |
|
|
const double * | pars ) |
Applies motion parameters to the ultrasound sweep.
- Parameters
-
| nPars | Number of motion parameters. |
| pars | Array of motion parameters. |
- Returns
- True if successful, false otherwise (if no sweep or no motion model was provided or the number of parameters don't match the model).
◆ applyDeformationPars()
| bool applyDeformationPars |
( |
int | nPars, |
|
|
const double * | pars ) |
Applies deformation parameters to the ultrasound sweep.
- Parameters
-
| nPars | Number of deformation parameters. |
| pars | Array of deformation parameters. |
- Returns
- True if successful, false otherwise (if no sweep was provided).
The documentation for this class was generated from the following file:
- ImFusion/US/SweepOptimization.h