13#ifndef QmitkUSNavigationStepCtUsRegistration_h
14#define QmitkUSNavigationStepCtUsRegistration_h
18#include <mitkNodePredicateDataType.h>
19#include <mitkNodePredicateAnd.h>
20#include <mitkNodePredicateOr.h>
22#include <mitkPointSet.h>
24#include <mitkPlaneFit.h>
27#include <itkThresholdImageFilter.h>
28#include <itkBinaryThresholdImageFilter.h>
29#include <itkGradientMagnitudeImageFilter.h>
30#include <itkLaplacianRecursiveGaussianImageFilter.h>
31#include "itkVotingBinaryIterativeHoleFillingImageFilter.h"
32#include <itkBinaryImageToShapeLabelMapFilter.h>
35template<
class T>
class SmartPointer;
40class NodeDisplacementFilter;
41class NavigationDataSource;
43class FloatingImageToUltrasoundRegistrationFilter;
158 bool FindFiducialNo1(std::vector<std::vector<double>> &distanceVectorsFiducials);
160 bool FindFiducialNo4(std::vector<std::vector<double>> &distanceVectorsFiducials);
185 Ui::QmitkUSNavigationStepCtUsRegistration *ui;
187 mitk::NodePredicateAnd::Pointer m_IsOfTypeImagePredicate;
188 mitk::NodePredicateOr::Pointer m_IsASegmentationImagePredicate;
189 mitk::NodePredicateAnd::Pointer m_IsAPatientImagePredicate;
190 mitk::TNodePredicateDataType<mitk::PointSet>::Pointer m_IsAPointSetPredicate;
191 mitk::NodePredicateDataType::Pointer m_IsASurfacePredicate;
194 mitk::Image::Pointer m_FloatingImage;
195 mitk::PointSet::Pointer m_MarkerModelCoordinateSystemPointSet;
196 mitk::PointSet::Pointer m_MarkerFloatingImageCoordinateSystemPointSet;
198 std::vector<mitk::Image::Pointer> m_ImagesGroundTruthProtocol;
199 bool m_PerformingGroundTruthProtocolEvaluation;
200 std::vector<double> m_GroundTruthProtocolFRE;
201 std::map<int, double> m_GroundTruthProtocolTRE;
202 std::map<int, mitk::Point3D> m_PointsToTransformGroundTruthProtocol;
203 std::map<int, mitk::PointSet::Pointer> m_GroundTruthProtocolTransformedPoints;
205 ThresholdImageFilterType::Pointer m_ThresholdFilter;
206 BinaryThresholdImageFilterType::Pointer m_BinaryThresholdFilter;
207 LaplacianRecursiveGaussianImageFilterType::Pointer m_LaplacianFilter1;
208 LaplacianRecursiveGaussianImageFilterType::Pointer m_LaplacianFilter2;
209 VotingBinaryIterativeHoleFillingImageFilterType::Pointer m_HoleFillingFilter;
210 BinaryImageToShapeLabelMapFilterType::Pointer m_BinaryImageToShapeLabelMapFilter;
214 std::vector<mitk::Vector3D> m_CentroidsOfFiducialCandidates;
215 std::map<double, mitk::Vector3D> m_EigenVectorsFiducialCandidates;
216 std::vector<double> m_EigenValuesFiducialCandidates;
217 mitk::Vector3D m_MeanCentroidFiducialCandidates;
218 std::map<int, mitk::Vector3D> m_FiducialMarkerCentroids;
220 mitk::AffineTransform3D::Pointer m_TransformMarkerCSToFloatingImageCS;
225 mitk::Vector3D m_ImageDimension;
226 mitk::Vector3D m_ImageSpacing;
228 bool m_FreezeCombinedModality;
229 mitk::Point3D m_CentroidOfTargetInUSImage;
itk::BinaryImageToShapeLabelMapFilter< ImageType > BinaryImageToShapeLabelMapFilterType
itk::BinaryThresholdImageFilter< ImageType, ImageType > BinaryThresholdImageFilterType
itk::LaplacianRecursiveGaussianImageFilter< ImageType, ImageType > LaplacianRecursiveGaussianImageFilterType
itk::ThresholdImageFilter< ImageType > ThresholdImageFilterType
itk::VotingBinaryIterativeHoleFillingImageFilter< ImageType > VotingBinaryIterativeHoleFillingImageFilterType
itk::Image< int, 3 > ImageType
Abstract base class for navigation step widgets.
std::vector< itk::SmartPointer< mitk::NavigationDataToNavigationDataFilter > > FilterVector
Navigation step for marking risk structures. The user can add risk structures by interacting with the...
double GetCharacteristicDistanceAWithUpperMargin()
void OnCalculateTRE(mitk::Point3D centroidOfTargetInUSImage)
void OnVisualizeCTtoUSregistration()
void OnLocalizeFiducials()
FilterVector GetFilter() override
void InitializeImageFilters()
void InitializePointsToTransformForGroundTruthProtocol()
void OnSetCombinedModality() override
Called every time SetCombinedModality() was called. This method may be implemented by a concrete subc...
bool FindFiducialNo4(std::vector< std::vector< double > > &distanceVectorsFiducials)
bool FilterFloatingImage()
double GetCharacteristicDistanceBWithLowerMargin()
void OnActualizeSegmentationSurfacePointSetData()
void CreatePointsToTransformForGroundTruthProtocol()
void AddTransformedPointsToDataStorage()
void OnEvaluateGroundTruthFiducialLocalizationProtocol()
double GetFiducialVolume(double radius)
void NumerateFiducialMarks()
void EliminateTooSmallLabeledObjects(ImageType::Pointer binaryImage)
bool OnStartStep() override
Initialization of the data storage nodes.
bool EliminateFiducialCandidatesByEuclideanDistances()
void CalculateDistancesBetweenFiducials(std::vector< std::vector< double > > &distanceVectorsFiducials)
void OnFloatingImageComboBoxSelectionChanged(const mitk::DataNode *node)
void OnRemoveCtImageClicked()
void OnGetCursorPosition()
QString GetTitle() override
Getter for the title of the navigation step. This title should be human readable and can be used to d...
double GetCharacteristicDistanceBWithUpperMargin()
bool FindFiducialNo1(std::vector< std::vector< double > > &distanceVectorsFiducials)
bool FindFiducialNo2And3()
double CalculateStandardDeviationOfFRE(double meanFRE)
void OnSettingsChanged(const itk::SmartPointer< mitk::DataNode > settingsNode) override
void DefineDataStorageImageFilter()
void TransformPointsGroundTruthProtocol()
void ClassifyFiducialCandidates()
bool OnFinishStep() override
There is nothing to be done.
void CreateQtPartControl(QWidget *parent)
void OnAddCtImageClicked()
bool OnActivateStep() override
Selects input for the node displacement filter and emits "ReadyForNextStep" signal....
double CalculateMeanFRE()
void CreateMarkerModelCoordinateSystemPointSet()
QmitkUSNavigationStepCtUsRegistration(QWidget *parent=nullptr)
bool OnDeactivateStep() override
Called when the navigation step gets deactivated (-> state started). This method may be implemented b...
void OnRegisterMarkerToFloatingImageCS()
void CalculateGroundTruthProtocolTRE()
void ActualizeCtToUsRegistrationWidget()
double GetMinimalFiducialConfigurationDistance()
void SetFloatingImageGeometryInformation(mitk::Image *image)
bool OnStopStep() override
Resets widget and filter and removes nodes from the data storage.
~QmitkUSNavigationStepCtUsRegistration() override
void OnUpdate() override
Updates the tracking validity status and the combined modality.
void GetCentroidsOfLabeledObjects()
void UnsetFloatingImageGeometry()