NifTK
16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
|
Base class for Ultrasound Pin/Cross-Wire calibration and Video Hand-Eye calibration cost functions. More...
Public Types | |
typedef InvariantPointCalibrationCostFunction | Self |
typedef itk::MultipleValuedCostFunction | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
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 > ¶ms) |
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 ¶meters, 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 ¶meters) 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 &) | |
InvariantPointCalibrationCostFunction & | operator= (const InvariantPointCalibrationCostFunction &) |
void | ValidateSizeOfParametersArray (const ParametersType ¶meters) 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 ¶meters) 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 ¶meters) 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 ¶meters) 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 ¶meters) const |
Computes the translation transformation. More... | |
double | GetLag (const ParametersType ¶meters) 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::TrackingAndTimeStampsContainer * | m_TrackingData |
bool | m_Verbose |
Base class for Ultrasound Pin/Cross-Wire calibration and Video Hand-Eye calibration cost functions.
Ultrasound:
typedef itk::SmartPointer<const Self> itk::InvariantPointCalibrationCostFunction::ConstPointer |
typedef Superclass::DerivativeType itk::InvariantPointCalibrationCostFunction::DerivativeType |
typedef Superclass::MeasureType itk::InvariantPointCalibrationCostFunction::MeasureType |
typedef Superclass::ParametersType itk::InvariantPointCalibrationCostFunction::ParametersType |
typedef itk::SmartPointer<Self> itk::InvariantPointCalibrationCostFunction::Pointer |
typedef itk::MultipleValuedCostFunction itk::InvariantPointCalibrationCostFunction::Superclass |
typedef mitk::TimeStampsContainer::TimeStamp itk::InvariantPointCalibrationCostFunction::TimeStampType |
|
protected |
|
protectedvirtual |
|
protected |
|
virtual |
|
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.
|
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 |
|
protected |
Extracts the lag parameter from the array of things being optimised.
|
overridevirtual |
Required by base class to return the number of parameters. See introduction to this class.
|
overridevirtual |
Equal to the number of points * 3.
|
virtual |
|
virtual |
|
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 |
|
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 |
|
protected |
Computes the translation transformation.
This is always 3 DOF, pure translation, translating from tracker coordinates to the invariant point.
|
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 |
|
protected |
|
virtual |
|
virtual |
void itk::InvariantPointCalibrationCostFunction::SetNumberOfParameters | ( | const int & | numberOfParameters | ) |
Sets the number of parameters being optimised. This should be called before optimisation starts.
|
virtual |
|
virtual |
|
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::SetTrackingData | ( | mitk::TrackingAndTimeStampsContainer * | trackingData | ) |
Sets the tracking data onto this object.
|
virtual |
|
protected |
Checks the supplied parameters array is the right size (i.e. it equals this->GetNumberOfParameters()), and throws mitk::Exception if it isnt.
|
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.
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |