MeVisLab Toolbox Reference
SmartSnapSkeletonFinder.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2018, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #pragma once
14 
15 #include "mlGraphComponents.h"
16 
17 
18 ML_START_NAMESPACE
19 
20 
22 {
23 public:
24  SmartSnapSkeletonFinder(size_t maxDistanceInSkeletons);
25 
26  VESSELGRAPH_NAMESPACE::Skeleton* find(VESSELGRAPH_NAMESPACE::VesselEdge* selectedEdge, VESSELGRAPH_NAMESPACE::Skeleton* selectedSkeleton);
27 
28 private:
29  void determineSelectedSkeletonIndex();
30  VESSELGRAPH_NAMESPACE::Skeleton* findSkeletonWithChangedLabelWithinDistance() const;
31  VESSELGRAPH_NAMESPACE::Skeleton* findNodeSkeletonWithinDistance() const;
32  bool isIndexValidAndWithinRange(int index, int startIndex) const;
33 
34  size_t _maxDistanceInSkeletons;
35  VESSELGRAPH_NAMESPACE::VesselEdge* _selectedEdge;
36  VESSELGRAPH_NAMESPACE::Skeleton* _selectedSkeleton;
37  size_t _selectedSkeletonIndex;
38  size_t _numEdgeSkeletons;
39 };
40 
41 ML_END_NAMESPACE
42 
VESSELGRAPH_NAMESPACE::Skeleton * find(VESSELGRAPH_NAMESPACE::VesselEdge *selectedEdge, VESSELGRAPH_NAMESPACE::Skeleton *selectedSkeleton)
SmartSnapSkeletonFinder(size_t maxDistanceInSkeletons)