13#ifndef QmitkUltrasoundCalibration_h
14#define QmitkUltrasoundCalibration_h
16#include <berryISelectionListener.h>
18#include <QmitkAbstractView.h>
24#include <mitkPointSet.h>
25#include <mitkPointSetDifferenceStatisticsCalculator.h>
29#include "ui_QmitkUltrasoundCalibrationControls.h"
31#include <vtkLandmarkTransform.h>
32#include <vtkPolyData.h>
33#include <vtkSmartPointer.h>
35#include <ctkServiceEvent.h>
229 void OnSelectionChanged(berry::IWorkbenchPart::Pointer source,
const QList<mitk::DataNode::Pointer> &nodes)
override;
303 mitk::PointSet::Pointer
366 double ComputeFRE(mitk::PointSet::Pointer imageFiducials,
367 mitk::PointSet::Pointer realWorldFiducials,
377 mitk::MessageDelegate2<QmitkUltrasoundCalibration, const std::string &, const std::string &> m_USDeviceChanged;
QmitkUltrasoundCalibration.
void CreateQtPartControl(QWidget *parent) override
mitk::PointSet::Pointer m_CalibPointsImage
Pointset containing all tool points.
mitk::PointSetDifferenceStatisticsCalculator::Pointer m_CalibrationStatistics
StatisticsRegarding Calibration Accuracy. (Compares m_CalibPointsTool to a transformed copy of m_Cali...
mitk::NavigationDataSource::Pointer m_Tracker
NavigationDataSource used for tracking data. This will be gotten by the combined modality.
mitk::PointSetDifferenceStatisticsCalculator::Pointer m_EvaluationStatistics
StatisticsRegarding Evaluation Accuracy. (Compares m_EvalPointsTool to m_EvalPointsImage)
mitk::PointSet::Pointer m_EvalPointsTool
Pointset containing tracked evaluation points.
void OnStartPlusCalibration()
Method to use the PLUS-Toolkoit for Calibration of EchoTrack.
unsigned long m_NewConnectionObserverTag
mitk::Image::Pointer m_Image
The current Ultrasound Image.
mitk::PointSet::Pointer m_SpacingPoints
void OnAddCurrentTipPositionForVerification()
void OnPhantomBasedCalibration()
void OnReset()
Triggered when the user clicks "Run Next Round". Also used as a reset mechanism.
mitk::DataNode::Pointer m_Node
void OnSaveEvaluation()
Triggered when the user clicks "Save Results" in the Evaluation tab.
void SwitchFreeze()
Freezes or unfreezes the image.
mitk::AffineTransform3D::Pointer m_Transformation
Result of the Calibration.
void OnPhantomCalibPointsChanged()
Ui::QmitkUltrasoundCalibrationControls m_Controls
void OnUSDepthChanged(const std::string &, const std::string &)
void OnMovePhantomAnnotationsUp()
void NewConnectionSignal()
used for thread separation, the worker thread must not call OnNewConnection directly....
void OnStreamingTimerTimeout()
mitk::DataNode::Pointer m_VerificationReferencePointsDataNode
void OnDeviceServiceEvent(const ctkServiceEvent event)
void TranslatePhantomAnnotations(double tx, double ty, double tz)
translate the annotated image feature m_CalibPoints image by the specified translation vector
void ApplyTransformToPointSet(mitk::PointSet::Pointer pointSet, vtkSmartPointer< vtkAbstractTransform > transform)
void OnMatchAnnotationToPhantomConfiguration()
mitk::PointSet::Pointer m_EvalPointsProjected
Pointset containing Projected Points (aka "where we thought the needle was gonna land")
std::vector< mitk::Point3D > m_allReferencePoints
double ComputeFRE(mitk::PointSet::Pointer imageFiducials, mitk::PointSet::Pointer realWorldFiducials, vtkSmartPointer< vtkLandmarkTransform > transform=nullptr)
void RotatePhantomAnnotations(double angle)
rotate the annotated image feature m_CalibPoints image by the specified angle
mitk::IGTLServer::Pointer m_USServer
~QmitkUltrasoundCalibration() override
void OnStartVerification()
void OnAddCurrentTipPositionToReferencePoints()
void OnStartCalibrationProcess()
void OnAddCalibPoint()
Triggered, when the user clicks "Add Point".
mitk::DataNode::Pointer m_WorldNode
mitk::PointSet::Pointer m_PhantomConfigurationPointSet
pointset holding the feature position of the phantom in tool coordinates
mitk::PointSet::Pointer m_CalibPointsTool
Pointset containing corresponding points on the image.
QTimer * m_StreamingTimer
mitk::DataNode::Pointer m_SpacingNode
void OnAddEvalProjectedPoint()
Triggered, when the user clicks "Add Point".
void OnGetPlusCalibration()
mitk::IGTLMessageProvider::Pointer m_TrackingMessageProvider
QmitkUltrasoundCalibration()
void OnLoadPhantomConfiguration()
mitk::IGTLMessageProvider::Pointer m_USMessageProvider
void OnStopCalibrationProcess()
mitk::AbstractUltrasoundTrackerDevice::Pointer m_CombinedModality
The combined modality used for imaging and tracking.
void OnTabSwitch(int index)
Triggered, whenever the user switches Tabs.
void OnMovePhantomAnnotationsDown()
void OnCalibration()
Triggered, when the user clicks "Calibrate".
static const std::string VIEW_ID
void OnRotatePhantomAnnotationsRight()
void ClearTemporaryMembers()
Clears all member attributes which are holding intermediate results for the calibration.
vtkSmartPointer< vtkPolyData > ConvertPointSetToVtkPolyData(mitk::PointSet::Pointer PointSet)
void OnRotatePhantomAnnotationsLeft()
mitk::IGTLClient::Pointer m_TransformClient
void OnDeviceDeselected()
mitk::ImageToIGTLMessageFilter::Pointer m_USImageToIGTLMessageFilter
int m_CalibPointsCount
Total number of calibration points set.
void OnStopPlusCalibration()
void OnSelectionChanged(berry::IWorkbenchPart::Pointer source, const QList< mitk::DataNode::Pointer > &nodes) override
mitk::IGTLDeviceSource::Pointer m_TransformDeviceSource
std::vector< double > m_allErrors
mitk::NeedleProjectionFilter::Pointer m_NeedleProjectionFilter
Creates a Pointset that projects the needle's path.
mitk::PointSet::Pointer m_VerificationReferencePoints
Pointset containing tracked evaluation points.
void OnCalculateSpacing()
void ProcessPlusCalibration(igtl::Matrix4x4 &imageToTracker)
void OnDeviceSelected()
Triggered, when the user has clicked "select Devices".
void OnMovePhantomAnnotationsLeft()
void OnAddEvalTargetPoint()
Triggered, when the user clicks "Add Target Points".
mitk::PointSetDifferenceStatisticsCalculator::Pointer m_ProjectionStatistics
StatisticsRegarding Projection Accuracy. (Compares m_EvalPointsProjected to m_EvalPointsImage)
void Update()
Triggered in regular intervals by a timer, when live view is enabled.
void OnSaveCalibration()
Triggered when the user clicks "Save Calibration" in the Calibration tab.
void ShowNeedlePath()
Internal function that activates display of the needle path.
mitk::Point3D m_FreezePoint
Current point when the image was last frozen.
mitk::DataNode::Pointer m_CalibNode
void OnMovePhantomAnnotationsRight()
mitk::PointSet::Pointer m_EvalPointsImage
Pointset containing the evaluated points on the image.
mitk::NavigationDataToIGTLMessageFilter::Pointer m_TrackingToIGTLMessageFilter
void UpdatePhantomAnnotationPointVisualization(int index=-1)
mitk::IGTLServer::Pointer m_TrackingServer