NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
itk::InvariantPointCalibrationCostFunction Class Referenceabstract

Base class for Ultrasound Pin/Cross-Wire calibration and Video Hand-Eye calibration cost functions. More...

Inheritance diagram for itk::InvariantPointCalibrationCostFunction:
Inheritance graph
[legend]
Collaboration diagram for itk::InvariantPointCalibrationCostFunction:
Collaboration graph
[legend]

Public Types

typedef
InvariantPointCalibrationCostFunction 
Self
 
typedef
itk::MultipleValuedCostFunction 
Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer
< const Self
ConstPointer
 
typedef Superclass::ParametersType ParametersType
 
typedef Superclass::DerivativeType DerivativeType
 
typedef Superclass::MeasureType MeasureType
 
typedef
mitk::TimeStampsContainer::TimeStamp 
TimeStampType
 

Public Member Functions

virtual void SetInvariantPoint (mitk::Point3D _arg)
 
virtual mitk::Point3D GetInvariantPoint () const
 
virtual void SetOptimiseInvariantPoint (bool _arg)
 
virtual bool GetOptimiseInvariantPoint () const
 
virtual void SetTimingLag (double _arg)
 
virtual double GetTimingLag () const
 
virtual void SetAllowableTimingError (TimeStampType _arg)
 
virtual TimeStampType GetAllowableTimingError () const
 
virtual void SetOptimiseTimingLag (bool _arg)
 
virtual bool GetOptimiseTimingLag () const
 
virtual void SetOptimiseRigidTransformation (bool _arg)
 
virtual bool GetOptimiseRigidTransformation () const
 
virtual void SetVerbose (bool _arg)
 
virtual bool GetVerbose () const
 
void SetRigidTransformation (const cv::Matx44d &rigidBodyTrans)
 
cv::Matx44d GetRigidTransformation () const
 
std::vector< double > GetRigidTransformationParameters () const
 
void SetRigidTransformationParameters (const std::vector< double > &params)
 
virtual unsigned int GetNumberOfValues (void) const override
 Equal to the number of points * 3. More...
 
virtual unsigned int GetNumberOfParameters () const override
 Required by base class to return the number of parameters. See introduction to this class. More...
 
void SetNumberOfParameters (const int &numberOfParameters)
 Sets the number of parameters being optimised. This should be called before optimisation starts. More...
 
virtual void GetDerivative (const ParametersType &parameters, DerivativeType &derivative) const override
 Simply uses central differences to approximate the derivative for each of the parameters. See also SetScales where you set the relative size of each parameter step size. More...
 
void SetScales (const ParametersType &scales)
 Used when calculating derivative using central differences. More...
 
double GetResidual (const MeasureType &values) const
 Returns the RMS residual of all the values stored in the values array. More...
 
void SetTrackingData (mitk::TrackingAndTimeStampsContainer *trackingData)
 Sets the tracking data onto this object. More...
 
void SetPointData (std::vector< std::pair< unsigned long long, cv::Point3d > > *pointData)
 Sets the point data onto this object, setting the number of values = pointData.size()*3. More...
 
virtual MeasureType GetValue (const ParametersType &parameters) const override
 The cost function is the residual error of the reconstructed point, where this function returns an array of n (x, y, z) tuples where n is the number of points, and each x, y, z measure is the difference from the invariant point. More...
 

Protected Member Functions

 InvariantPointCalibrationCostFunction ()
 
virtual ~InvariantPointCalibrationCostFunction ()
 
 InvariantPointCalibrationCostFunction (const InvariantPointCalibrationCostFunction &)
 
InvariantPointCalibrationCostFunctionoperator= (const InvariantPointCalibrationCostFunction &)
 
void ValidateSizeOfParametersArray (const ParametersType &parameters) const
 Checks the supplied parameters array is the right size (i.e. it equals this->GetNumberOfParameters()), and throws mitk::Exception if it isnt. More...
 
void ValidateSizeOfScalesArray (const ParametersType &parameters) const
 Checks the supplied parameters array is the right size (i.e. it equals this->m_Scales.GetSize()), and throws mitk::Exception if it isnt. More...
 
virtual cv::Matx44d GetCalibrationTransformation (const ParametersType &parameters) const =0
 Computes the calibration (image-to-probe) or (hand-eye) transformation from the current estimate of the parameters. More...
 
cv::Matx44d GetRigidTransformation (const ParametersType &parameters) const
 Computes the rigid body part (US: image-to-probe) or (Video: hand-eye) transformation from the current estimate of the parameters. More...
 
cv::Matx44d GetTranslationTransformation (const ParametersType &parameters) const
 Computes the translation transformation. More...
 
double GetLag (const ParametersType &parameters) const
 Extracts the lag parameter from the array of things being optimised. More...
 

Protected Attributes

ParametersType m_Scales
 
mitk::Point3D m_InvariantPoint
 
bool m_OptimiseInvariantPoint
 
double m_TimingLag
 
bool m_OptimiseTimingLag
 
std::vector< double > m_RigidTransformation
 
bool m_OptimiseRigidTransformation
 
unsigned int m_NumberOfValues
 
TimeStampType m_AllowableTimingError
 
unsigned int m_NumberOfParameters
 
std::vector< std::pair
< TimeStampType, cv::Point3d > > * 
m_PointData
 
mitk::TrackingAndTimeStampsContainerm_TrackingData
 
bool m_Verbose
 

Detailed Description

Base class for Ultrasound Pin/Cross-Wire calibration and Video Hand-Eye calibration cost functions.

Ultrasound:

Video:

See also
itk::UltrasoundPinCalibrationCostFunction
itk::VideoHandEyeCalibrationCostFunction

Member Typedef Documentation

typedef itk::MultipleValuedCostFunction itk::InvariantPointCalibrationCostFunction::Superclass

Constructor & Destructor Documentation

itk::InvariantPointCalibrationCostFunction::InvariantPointCalibrationCostFunction ( )
protected
itk::InvariantPointCalibrationCostFunction::~InvariantPointCalibrationCostFunction ( )
protectedvirtual
itk::InvariantPointCalibrationCostFunction::InvariantPointCalibrationCostFunction ( const InvariantPointCalibrationCostFunction )
protected

Member Function Documentation

virtual TimeStampType itk::InvariantPointCalibrationCostFunction::GetAllowableTimingError ( ) const
virtual
virtual cv::Matx44d itk::InvariantPointCalibrationCostFunction::GetCalibrationTransformation ( const ParametersType parameters) const
protectedpure virtual

Computes the calibration (image-to-probe) or (hand-eye) transformation from the current estimate of the parameters.

ie. Derived class itk::UltrasoundPinCalibrationCostFunction can choose to add scaling, whereas itk::VideoHandEyeCalibrationCostFunction can choose not to for examples.

Implemented in itk::UltrasoundPinCalibrationCostFunction, and itk::VideoHandEyeCalibrationCostFunction.

void itk::InvariantPointCalibrationCostFunction::GetDerivative ( const ParametersType parameters,
DerivativeType derivative 
) const
overridevirtual

Simply uses central differences to approximate the derivative for each of the parameters. See also SetScales where you set the relative size of each parameter step size.

virtual mitk::Point3D itk::InvariantPointCalibrationCostFunction::GetInvariantPoint ( ) const
virtual
double itk::InvariantPointCalibrationCostFunction::GetLag ( const ParametersType parameters) const
protected

Extracts the lag parameter from the array of things being optimised.

unsigned int itk::InvariantPointCalibrationCostFunction::GetNumberOfParameters ( void  ) const
overridevirtual

Required by base class to return the number of parameters. See introduction to this class.

unsigned int itk::InvariantPointCalibrationCostFunction::GetNumberOfValues ( void  ) const
overridevirtual

Equal to the number of points * 3.

virtual bool itk::InvariantPointCalibrationCostFunction::GetOptimiseInvariantPoint ( ) const
virtual
virtual bool itk::InvariantPointCalibrationCostFunction::GetOptimiseRigidTransformation ( ) const
virtual
virtual bool itk::InvariantPointCalibrationCostFunction::GetOptimiseTimingLag ( ) const
virtual
double itk::InvariantPointCalibrationCostFunction::GetResidual ( const MeasureType values) const

Returns the RMS residual of all the values stored in the values array.

cv::Matx44d itk::InvariantPointCalibrationCostFunction::GetRigidTransformation ( ) const
cv::Matx44d itk::InvariantPointCalibrationCostFunction::GetRigidTransformation ( const ParametersType parameters) const
protected

Computes the rigid body part (US: image-to-probe) or (Video: hand-eye) transformation from the current estimate of the parameters.

This is always 6 DOF, so no scaling.

std::vector< double > itk::InvariantPointCalibrationCostFunction::GetRigidTransformationParameters ( ) const
virtual double itk::InvariantPointCalibrationCostFunction::GetTimingLag ( ) const
virtual
cv::Matx44d itk::InvariantPointCalibrationCostFunction::GetTranslationTransformation ( const ParametersType parameters) const
protected

Computes the translation transformation.

This is always 3 DOF, pure translation, translating from tracker coordinates to the invariant point.

InvariantPointCalibrationCostFunction::MeasureType itk::InvariantPointCalibrationCostFunction::GetValue ( const ParametersType parameters) const
overridevirtual

The cost function is the residual error of the reconstructed point, where this function returns an array of n (x, y, z) tuples where n is the number of points, and each x, y, z measure is the difference from the invariant point.

virtual bool itk::InvariantPointCalibrationCostFunction::GetVerbose ( ) const
virtual
InvariantPointCalibrationCostFunction& itk::InvariantPointCalibrationCostFunction::operator= ( const InvariantPointCalibrationCostFunction )
protected
virtual void itk::InvariantPointCalibrationCostFunction::SetAllowableTimingError ( TimeStampType  _arg)
virtual
virtual void itk::InvariantPointCalibrationCostFunction::SetInvariantPoint ( mitk::Point3D  _arg)
virtual
void itk::InvariantPointCalibrationCostFunction::SetNumberOfParameters ( const int numberOfParameters)

Sets the number of parameters being optimised. This should be called before optimisation starts.

virtual void itk::InvariantPointCalibrationCostFunction::SetOptimiseInvariantPoint ( bool  _arg)
virtual
virtual void itk::InvariantPointCalibrationCostFunction::SetOptimiseRigidTransformation ( bool  _arg)
virtual
virtual void itk::InvariantPointCalibrationCostFunction::SetOptimiseTimingLag ( bool  _arg)
virtual
void itk::InvariantPointCalibrationCostFunction::SetPointData ( std::vector< std::pair< unsigned long long, cv::Point3d > > *  pointData)

Sets the point data onto this object, setting the number of values = pointData.size()*3.

void itk::InvariantPointCalibrationCostFunction::SetRigidTransformation ( const cv::Matx44d &  rigidBodyTrans)
void itk::InvariantPointCalibrationCostFunction::SetRigidTransformationParameters ( const std::vector< double > &  params)
void itk::InvariantPointCalibrationCostFunction::SetScales ( const ParametersType scales)

Used when calculating derivative using central differences.

virtual void itk::InvariantPointCalibrationCostFunction::SetTimingLag ( double  _arg)
virtual
void itk::InvariantPointCalibrationCostFunction::SetTrackingData ( mitk::TrackingAndTimeStampsContainer trackingData)

Sets the tracking data onto this object.

virtual void itk::InvariantPointCalibrationCostFunction::SetVerbose ( bool  _arg)
virtual
void itk::InvariantPointCalibrationCostFunction::ValidateSizeOfParametersArray ( const ParametersType parameters) const
protected

Checks the supplied parameters array is the right size (i.e. it equals this->GetNumberOfParameters()), and throws mitk::Exception if it isnt.

void itk::InvariantPointCalibrationCostFunction::ValidateSizeOfScalesArray ( const ParametersType parameters) const
protected

Checks the supplied parameters array is the right size (i.e. it equals this->m_Scales.GetSize()), and throws mitk::Exception if it isnt.

Member Data Documentation

TimeStampType itk::InvariantPointCalibrationCostFunction::m_AllowableTimingError
protected
mitk::Point3D itk::InvariantPointCalibrationCostFunction::m_InvariantPoint
protected
unsigned int itk::InvariantPointCalibrationCostFunction::m_NumberOfParameters
protected
unsigned int itk::InvariantPointCalibrationCostFunction::m_NumberOfValues
mutableprotected
bool itk::InvariantPointCalibrationCostFunction::m_OptimiseInvariantPoint
protected
bool itk::InvariantPointCalibrationCostFunction::m_OptimiseRigidTransformation
protected
bool itk::InvariantPointCalibrationCostFunction::m_OptimiseTimingLag
protected
std::vector< std::pair<TimeStampType, cv::Point3d> >* itk::InvariantPointCalibrationCostFunction::m_PointData
protected
std::vector<double> itk::InvariantPointCalibrationCostFunction::m_RigidTransformation
protected
ParametersType itk::InvariantPointCalibrationCostFunction::m_Scales
protected
double itk::InvariantPointCalibrationCostFunction::m_TimingLag
protected
mitk::TrackingAndTimeStampsContainer* itk::InvariantPointCalibrationCostFunction::m_TrackingData
protected
bool itk::InvariantPointCalibrationCostFunction::m_Verbose
protected

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