PlusLib
2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
|
Refines the image to probe transform using non-linear optimization. More...
#include <src/PlusCalibration/vtkProbeCalibrationAlgo/vtkPlusProbeCalibrationOptimizerAlgo.h>
Public Types | |
enum | OptimizationMethodType { MINIMIZE_NONE, MINIMIZE_DISTANCE_OF_MIDDLE_WIRES_IN_3D, MINIMIZE_DISTANCE_OF_ALL_WIRES_IN_2D } |
typedef vtkObject | Superclass |
Public Member Functions | |
void | ComputeError (const vnl_matrix_fixed< double, 4, 4 > &imageToProbeTransformationMatrix, double &errorMean, double &errorStDev, double &errorRms) |
bool | Enabled () |
virtual const char * | GetClassName () |
bool | GetIsotropicPixelSpacing () |
OptimizationMethodType | GetOptimizationMethod () |
vnl_matrix_fixed< double, 4, 4 > | GetOptimizedImageToProbeTransformMatrix () |
virtual int | IsA (const char *type) |
PlusStatus | ReadConfiguration (vtkXMLDataElement *aConfig) |
void | SetImageToProbeSeedTransform (const vnl_matrix_fixed< double, 4, 4 > &imageToProbeTransformMatrix) |
PlusStatus | SetInputDataForMiddlePointMethod (std::vector< vnl_vector< double > > *calibrationMiddleWireIntersectionPointsPos_Image, std::vector< vnl_vector< double > > *calibrationMiddleWireIntersectionPointsPos_Probe, vnl_matrix_fixed< double, 4, 4 > *imageToProbeTransformMatrix, std::set< int > *outliers) |
void | SetIsotropicPixelSpacing (bool isotropicPixelSpacing) |
void | SetOptimizationMethod (OptimizationMethodType optimizationMethod) |
PlusStatus | SetOptimizerDataUsingNWires (std::vector< vnl_vector< double > > *calibrationAllWiresIntersectionPointsPos_Image, std::vector< PlusNWire > *nWires, std::vector< vnl_matrix_fixed< double, 4, 4 > > *probeToPhantomTransforms, vnl_matrix_fixed< double, 4, 4 > *imageToProbeTransformMatrix, std::set< int > *outliers) |
void | SetProbeCalibrationAlgo (vtkPlusProbeCalibrationAlgo *probeCalibrationAlgo) |
PlusStatus | Update () |
Static Public Member Functions | |
static const char * | GetOptimizationMethodAsString (OptimizationMethodType type) |
static int | IsTypeOf (const char *type) |
static vtkPlusProbeCalibrationOptimizerAlgo * | New () |
static vtkPlusProbeCalibrationOptimizerAlgo * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
PlusStatus | ShowTransformation (const vnl_matrix_fixed< double, 4, 4 > &transformationMatrix) |
vtkPlusProbeCalibrationOptimizerAlgo () | |
virtual | ~vtkPlusProbeCalibrationOptimizerAlgo () |
Protected Attributes | |
vnl_matrix_fixed< double, 4, 4 > | ImageToProbeSeedTransformMatrix |
vnl_matrix_fixed< double, 4, 4 > | ImageToProbeTransformMatrix |
bool | IsotropicPixelSpacing |
OptimizationMethodType | OptimizationMethod |
vtkPlusProbeCalibrationAlgo * | ProbeCalibrationAlgo |
Refines the image to probe transform using non-linear optimization.
This class tunes the image to probe transformation that is computed by the linear least squares (LS) method. The LS method cannot guarantee an orthogonal image to probe transformation matrix and it can only optimize the out-of-plane (3D) error. Out-of-plane error computation assumes that the uncertainty of the fiducial detecion is isotropic, while actually the uncertainty is much higher in elevation direction. Therefore it is more accurate to optimize the in-plane (2D) error. Also this optimizer enforces orthogonality of the image to probe matrix and optionally it can enforce isotropic image pixel spacing.
Definition at line 36 of file vtkPlusProbeCalibrationOptimizerAlgo.h.
typedef vtkObject vtkPlusProbeCalibrationOptimizerAlgo::Superclass |
Definition at line 49 of file vtkPlusProbeCalibrationOptimizerAlgo.h.
Enumerator | |
---|---|
MINIMIZE_NONE | |
MINIMIZE_DISTANCE_OF_MIDDLE_WIRES_IN_3D | |
MINIMIZE_DISTANCE_OF_ALL_WIRES_IN_2D |
Definition at line 42 of file vtkPlusProbeCalibrationOptimizerAlgo.h.
|
protected |
Definition at line 166 of file vtkPlusProbeCalibrationOptimizerAlgo.cxx.
|
protectedvirtual |
Definition at line 173 of file vtkPlusProbeCalibrationOptimizerAlgo.cxx.
void vtkPlusProbeCalibrationOptimizerAlgo::ComputeError | ( | const vnl_matrix_fixed< double, 4, 4 > & | imageToProbeTransformationMatrix, |
double & | errorMean, | ||
double & | errorStDev, | ||
double & | errorRms | ||
) |
Definition at line 184 of file vtkPlusProbeCalibrationOptimizerAlgo.cxx.
bool vtkPlusProbeCalibrationOptimizerAlgo::Enabled | ( | ) |
Returns true if optimization is requested (the OptimizationMethod is defined and not "NONE")
Definition at line 363 of file vtkPlusProbeCalibrationOptimizerAlgo.cxx.
|
virtual |
|
inline |
Definition at line 71 of file vtkPlusProbeCalibrationOptimizerAlgo.h.
|
inline |
Definition at line 74 of file vtkPlusProbeCalibrationOptimizerAlgo.h.
|
static |
Definition at line 373 of file vtkPlusProbeCalibrationOptimizerAlgo.cxx.
vnl_matrix_fixed< double, 4, 4 > vtkPlusProbeCalibrationOptimizerAlgo::GetOptimizedImageToProbeTransformMatrix | ( | ) |
Get optimized Image to Probe matrix
Definition at line 350 of file vtkPlusProbeCalibrationOptimizerAlgo.cxx.
|
virtual |
|
static |
|
static |
PlusStatus vtkPlusProbeCalibrationOptimizerAlgo::ReadConfiguration | ( | vtkXMLDataElement * | aConfig | ) |
Definition at line 387 of file vtkPlusProbeCalibrationOptimizerAlgo.cxx.
|
static |
void vtkPlusProbeCalibrationOptimizerAlgo::SetImageToProbeSeedTransform | ( | const vnl_matrix_fixed< double, 4, 4 > & | imageToProbeTransformMatrix | ) |
Definition at line 356 of file vtkPlusProbeCalibrationOptimizerAlgo.cxx.
PlusStatus vtkPlusProbeCalibrationOptimizerAlgo::SetInputDataForMiddlePointMethod | ( | std::vector< vnl_vector< double > > * | calibrationMiddleWireIntersectionPointsPos_Image, |
std::vector< vnl_vector< double > > * | calibrationMiddleWireIntersectionPointsPos_Probe, | ||
vnl_matrix_fixed< double, 4, 4 > * | imageToProbeTransformMatrix, | ||
std::set< int > * | outliers | ||
) |
Provides to the class the information necessary make the optimization
|
inline |
Definition at line 72 of file vtkPlusProbeCalibrationOptimizerAlgo.h.
|
inline |
Definition at line 75 of file vtkPlusProbeCalibrationOptimizerAlgo.h.
PlusStatus vtkPlusProbeCalibrationOptimizerAlgo::SetOptimizerDataUsingNWires | ( | std::vector< vnl_vector< double > > * | calibrationAllWiresIntersectionPointsPos_Image, |
std::vector< PlusNWire > * | nWires, | ||
std::vector< vnl_matrix_fixed< double, 4, 4 > > * | probeToPhantomTransforms, | ||
vnl_matrix_fixed< double, 4, 4 > * | imageToProbeTransformMatrix, | ||
std::set< int > * | outliers | ||
) |
Provides to the class the information necessary make the optimization
void vtkPlusProbeCalibrationOptimizerAlgo::SetProbeCalibrationAlgo | ( | vtkPlusProbeCalibrationAlgo * | probeCalibrationAlgo | ) |
Definition at line 178 of file vtkPlusProbeCalibrationOptimizerAlgo.cxx.
|
protected |
Definition at line 200 of file vtkPlusProbeCalibrationOptimizerAlgo.cxx.
PlusStatus vtkPlusProbeCalibrationOptimizerAlgo::Update | ( | ) |
Calibrate (call the minimizer)
Definition at line 228 of file vtkPlusProbeCalibrationOptimizerAlgo.cxx.
|
protected |
Store the seed for the optimization process
Definition at line 97 of file vtkPlusProbeCalibrationOptimizerAlgo.h.
|
protected |
Store the result of the optimization process
Definition at line 100 of file vtkPlusProbeCalibrationOptimizerAlgo.h.
|
protected |
If true then X and Y pixel spacing is forced to be the same during the optimization
Definition at line 91 of file vtkPlusProbeCalibrationOptimizerAlgo.h.
|
protected |
Cost function to minimize during the optimization
Definition at line 94 of file vtkPlusProbeCalibrationOptimizerAlgo.h.
|
protected |
Definition at line 102 of file vtkPlusProbeCalibrationOptimizerAlgo.h.