MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
WEMNodeDiagnosis.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2007, 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
16
18
20
22const int NODE_SEVERITY_NOTICE = 1;
23const int NODE_SEVERITY_WARNING = 2;
24const int NODE_SEVERITY_ERROR = 3;
25const int NODE_SEVERITY_FATAL = 4;
26
28
31{
32public:
34 WEMNodeDiagnosis(bool hasEdges);
37
39 inline bool hasDoubleEntry() const
40 {
41 return _doubleEntry;
42 }
44 inline bool hasNonConnected() const
45 {
46 return _nonConnected;
47 }
49 inline bool isBoundary() const
50 {
51 return _boundary;
52 }
54 inline bool isOrphan() const
55 {
56 return _orphan;
57 }
59 inline bool isRedundant() const
60 {
61 return _redundant;
62 }
64 inline bool isCollinear() const
65 {
66 return _collinear;
67 }
69 inline bool hasBadNormalLength() const
70 {
71 return _badNormalLength;
72 }
74 inline bool isDeadEnd() const
75 {
76 return _deadEnd;
77 }
79 inline bool isFlatRegion() const
80 {
81 return _flatRegion;
82 }
84 inline bool isNeighborhoodNotSet() const
85 {
86 return _neighborhoodNotSet;
87 }
89 inline bool hasValence3() const
90 {
91 return _valence3;
92 }
93
95 inline int numNotices() const
96 {
97 return _numNotices;
98 }
100 inline int numWarnings() const
101 {
102 return _numWarnings;
103 }
105 inline int numErrors() const
106 {
107 return _numErrors;
108 }
110 inline int numFatals() const
111 {
112 return _numFatals;
113 }
114
116 inline bool isOk() const
117 {
118 return (_numNotices == 0 && _numWarnings == 0 && _numErrors == 0 && _numFatals == 0);
119 }
121 inline std::string getErrorMessage() const
122 {
123 return _message;
124 }
125
127 int getSeverity() const;
129 inline WEMNode* getNode()
130 {
131 return _node;
132 }
134 inline const WEMNode* getNode() const
135 {
136 return _node;
137 }
138
141
144 std::string message;
147
148private:
150 int _numNotices;
152 int _numWarnings;
154 int _numErrors;
156 int _numFatals;
157
159 WEMNode* _node;
160
162 bool _hasEdges;
163
165 std::string _message;
166
168 bool _doubleEntry;
170 bool _nonConnected;
172 bool _boundary;
174 bool _orphan;
176 bool _redundant;
178 bool _collinear;
180 bool _badNormalLength;
182 bool _deadEnd;
184 bool _flatRegion;
186 bool _neighborhoodNotSet;
188 bool _valence3;
189};
190
192
#define MLWEM_EXPORT
Definition MLWEMSystem.h:18
This class provides diagnostic information on a WEMNode.
int numWarnings() const
Returns the number of warnings.
~WEMNodeDiagnosis()
Standard destructor.
const WEMNode * getNode() const
Returns the node.
WEMNodeDiagnosis(bool hasEdges)
Standard constructor.
std::string message
Stuff used by SoWEMDiagnosis.
void checkIntegrity(WEMNode *node)
Checks integrity of the given node.
bool isNeighborhoodNotSet() const
Returns whether 'Neighborhood not set' errors were found.
bool isOk() const
Returns whether the node is ok.
bool isRedundant() const
Returns whether 'Redundant' errors were found.
bool isFlatRegion() const
Returns whether 'Flat region' errors were found.
bool selected
Is the node selected?
int numFatals() const
Returns the number of fatals.
int getSeverity() const
Returns the severity of errors.
bool isDeadEnd() const
Returns whether 'Dead end' errors were found.
bool hasValence3() const
Returns whether 'Node valence 3 with 3 triangles' errors were found.
bool isBoundary() const
Returns whether 'Boundary' errors were found.
bool hasNonConnected() const
Returns whether 'Non connected' errors were found.
bool hasDoubleEntry() const
Returns whether 'Double entry' errors were found.
bool isOrphan() const
Returns whether 'Orphan' errors were found.
int numNotices() const
Returns the number of notices.
bool isCollinear() const
Returns whether 'Collinear' errors were found.
std::string getErrorMessage() const
Returns the error message.
WEMNode * getNode()
Returns the node.
bool hasBadNormalLength() const
Returns whether 'Bad normal length' errors were found.
int numErrors() const
Returns the number of errors.
Defines the mesh component: node.
Definition WEMNode.h:33
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
const int NODE_SEVERITY_FATAL
Error status: a serious error.
const int NODE_SEVERITY_WARNING
Error status: a warning.
const int NODE_SEVERITY_ALLISWELL
Error status: no error at all.
const int NODE_SEVERITY_ERROR
Error status: an error.
const int NODE_SEVERITY_NOTICE
Error status: just a notice.