PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkPlusProbeCalibrationOptimizerAlgo Class Reference

Refines the image to probe transform using non-linear optimization. More...

#include <src/PlusCalibration/vtkProbeCalibrationAlgo/vtkPlusProbeCalibrationOptimizerAlgo.h>

Inheritance diagram for vtkPlusProbeCalibrationOptimizerAlgo:
Inheritance graph
[legend]
Collaboration diagram for vtkPlusProbeCalibrationOptimizerAlgo:
Collaboration graph
[legend]

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 vtkPlusProbeCalibrationOptimizerAlgoNew ()
 
static vtkPlusProbeCalibrationOptimizerAlgoSafeDownCast (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
 
vtkPlusProbeCalibrationAlgoProbeCalibrationAlgo
 

Detailed Description

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.

Member Typedef Documentation

◆ Superclass

Definition at line 49 of file vtkPlusProbeCalibrationOptimizerAlgo.h.

Member Enumeration Documentation

◆ OptimizationMethodType

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.

Constructor & Destructor Documentation

◆ vtkPlusProbeCalibrationOptimizerAlgo()

vtkPlusProbeCalibrationOptimizerAlgo::vtkPlusProbeCalibrationOptimizerAlgo ( )
protected

Definition at line 166 of file vtkPlusProbeCalibrationOptimizerAlgo.cxx.

◆ ~vtkPlusProbeCalibrationOptimizerAlgo()

vtkPlusProbeCalibrationOptimizerAlgo::~vtkPlusProbeCalibrationOptimizerAlgo ( )
protectedvirtual

Definition at line 173 of file vtkPlusProbeCalibrationOptimizerAlgo.cxx.

Member Function Documentation

◆ ComputeError()

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.

◆ Enabled()

bool vtkPlusProbeCalibrationOptimizerAlgo::Enabled ( )

Returns true if optimization is requested (the OptimizationMethod is defined and not "NONE")

Definition at line 363 of file vtkPlusProbeCalibrationOptimizerAlgo.cxx.

◆ GetClassName()

virtual const char* vtkPlusProbeCalibrationOptimizerAlgo::GetClassName ( )
virtual

◆ GetIsotropicPixelSpacing()

bool vtkPlusProbeCalibrationOptimizerAlgo::GetIsotropicPixelSpacing ( )
inline

Definition at line 71 of file vtkPlusProbeCalibrationOptimizerAlgo.h.

◆ GetOptimizationMethod()

OptimizationMethodType vtkPlusProbeCalibrationOptimizerAlgo::GetOptimizationMethod ( )
inline

Definition at line 74 of file vtkPlusProbeCalibrationOptimizerAlgo.h.

◆ GetOptimizationMethodAsString()

const char * vtkPlusProbeCalibrationOptimizerAlgo::GetOptimizationMethodAsString ( OptimizationMethodType  type)
static

Definition at line 373 of file vtkPlusProbeCalibrationOptimizerAlgo.cxx.

◆ GetOptimizedImageToProbeTransformMatrix()

vnl_matrix_fixed< double, 4, 4 > vtkPlusProbeCalibrationOptimizerAlgo::GetOptimizedImageToProbeTransformMatrix ( )

Get optimized Image to Probe matrix

Definition at line 350 of file vtkPlusProbeCalibrationOptimizerAlgo.cxx.

◆ IsA()

virtual int vtkPlusProbeCalibrationOptimizerAlgo::IsA ( const char *  type)
virtual

◆ IsTypeOf()

static int vtkPlusProbeCalibrationOptimizerAlgo::IsTypeOf ( const char *  type)
static

◆ New()

static vtkPlusProbeCalibrationOptimizerAlgo* vtkPlusProbeCalibrationOptimizerAlgo::New ( )
static

◆ ReadConfiguration()

PlusStatus vtkPlusProbeCalibrationOptimizerAlgo::ReadConfiguration ( vtkXMLDataElement *  aConfig)

Definition at line 387 of file vtkPlusProbeCalibrationOptimizerAlgo.cxx.

◆ SafeDownCast()

static vtkPlusProbeCalibrationOptimizerAlgo* vtkPlusProbeCalibrationOptimizerAlgo::SafeDownCast ( vtkObject *  o)
static

◆ SetImageToProbeSeedTransform()

void vtkPlusProbeCalibrationOptimizerAlgo::SetImageToProbeSeedTransform ( const vnl_matrix_fixed< double, 4, 4 > &  imageToProbeTransformMatrix)

Definition at line 356 of file vtkPlusProbeCalibrationOptimizerAlgo.cxx.

◆ SetInputDataForMiddlePointMethod()

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

◆ SetIsotropicPixelSpacing()

void vtkPlusProbeCalibrationOptimizerAlgo::SetIsotropicPixelSpacing ( bool  isotropicPixelSpacing)
inline

Definition at line 72 of file vtkPlusProbeCalibrationOptimizerAlgo.h.

◆ SetOptimizationMethod()

void vtkPlusProbeCalibrationOptimizerAlgo::SetOptimizationMethod ( OptimizationMethodType  optimizationMethod)
inline

Definition at line 75 of file vtkPlusProbeCalibrationOptimizerAlgo.h.

◆ SetOptimizerDataUsingNWires()

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

◆ SetProbeCalibrationAlgo()

void vtkPlusProbeCalibrationOptimizerAlgo::SetProbeCalibrationAlgo ( vtkPlusProbeCalibrationAlgo probeCalibrationAlgo)

Definition at line 178 of file vtkPlusProbeCalibrationOptimizerAlgo.cxx.

◆ ShowTransformation()

PlusStatus vtkPlusProbeCalibrationOptimizerAlgo::ShowTransformation ( const vnl_matrix_fixed< double, 4, 4 > &  transformationMatrix)
protected

Definition at line 200 of file vtkPlusProbeCalibrationOptimizerAlgo.cxx.

◆ Update()

PlusStatus vtkPlusProbeCalibrationOptimizerAlgo::Update ( )

Calibrate (call the minimizer)

Definition at line 228 of file vtkPlusProbeCalibrationOptimizerAlgo.cxx.

Member Data Documentation

◆ ImageToProbeSeedTransformMatrix

vnl_matrix_fixed<double,4,4> vtkPlusProbeCalibrationOptimizerAlgo::ImageToProbeSeedTransformMatrix
protected

Store the seed for the optimization process

Definition at line 97 of file vtkPlusProbeCalibrationOptimizerAlgo.h.

◆ ImageToProbeTransformMatrix

vnl_matrix_fixed<double,4,4> vtkPlusProbeCalibrationOptimizerAlgo::ImageToProbeTransformMatrix
protected

Store the result of the optimization process

Definition at line 100 of file vtkPlusProbeCalibrationOptimizerAlgo.h.

◆ IsotropicPixelSpacing

bool vtkPlusProbeCalibrationOptimizerAlgo::IsotropicPixelSpacing
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.

◆ OptimizationMethod

OptimizationMethodType vtkPlusProbeCalibrationOptimizerAlgo::OptimizationMethod
protected

Cost function to minimize during the optimization

Definition at line 94 of file vtkPlusProbeCalibrationOptimizerAlgo.h.

◆ ProbeCalibrationAlgo

vtkPlusProbeCalibrationAlgo* vtkPlusProbeCalibrationOptimizerAlgo::ProbeCalibrationAlgo
protected

Definition at line 102 of file vtkPlusProbeCalibrationOptimizerAlgo.h.


The documentation for this class was generated from the following files: