MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
WEMEdgeDiagnosis.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 EDGE_SEVERITY_NOTICE = 1;
23const int EDGE_SEVERITY_WARNING = 2;
24const int EDGE_SEVERITY_ERROR = 3;
25const int EDGE_SEVERITY_FATAL = 4;
26
28
31{
32public:
37
39 inline bool hasNULLHead() const
40 {
41 return _headNull;
42 }
44 inline bool hasNULLTail() const
45 {
46 return _tailNull;
47 }
49 inline bool isNeighborhoodNotSet() const
50 {
51 return _neighborhoodNotSet;
52 }
54 inline bool isBoundary() const
55 {
56 return _boundary;
57 }
59 inline bool hasEqualPointer() const
60 {
61 return _equalPointer;
62 }
64 inline bool hasNULLPointer() const
65 {
66 return _nullPointer;
67 }
69 inline bool hasNonConnectedPointer() const
70 {
71 return _edgePointerNotConnected;
72 }
74 inline bool hasIncorrectlyLinkedPointer() const
75 {
76 return _edgePointerLink;
77 }
79 inline bool hasWrongOrder() const
80 {
81 return _order;
82 }
84 inline bool hasCircularPointer() const
85 {
86 return _circularPointer;
87 }
89 inline bool hasZeroLength() const
90 {
91 return _zeroLength;
92 }
94 inline bool hasFold() const
95 {
96 return _fold;
97 }
98
100 inline int numNotices() const
101 {
102 return _numNotices;
103 }
105 inline int numWarnings() const
106 {
107 return _numWarnings;
108 }
110 inline int numErrors() const
111 {
112 return _numErrors;
113 }
115 inline int numFatals() const
116 {
117 return _numFatals;
118 }
119
121 inline bool isOk() const
122 {
123 return (_numNotices == 0 && _numWarnings == 0 && _numErrors == 0 && _numFatals == 0);
124 }
126 inline std::string getErrorMessage() const
127 {
128 return _message;
129 }
130
132 int getSeverity() const;
134 inline WEMEdge* getEdge()
135 {
136 return _edge;
137 }
139 inline const WEMEdge* getEdge() const
140 {
141 return _edge;
142 }
143
146
149 std::string message;
152
153
154private:
156 int _numNotices;
158 int _numWarnings;
160 int _numErrors;
162 int _numFatals;
163
165 WEMEdge* _edge;
166
168 std::string _message;
169
170
172 bool _headNull;
174 bool _tailNull;
176 bool _neighborhoodNotSet;
178 bool _boundary;
180 bool _equalPointer;
182 bool _nullPointer;
184 bool _edgePointerNotConnected;
186 bool _edgePointerLink;
188 bool _order;
190 bool _circularPointer;
192 bool _zeroLength;
194 bool _fold;
195};
196
198
#define MLWEM_EXPORT
Definition MLWEMSystem.h:18
This class provides diagnostic information on a WEMEdge.
bool hasZeroLength() const
Returns whether 'Zero length' errors were found.
bool hasWrongOrder() const
Returns whether 'Order' errors were found.
bool hasNULLPointer() const
Returns whether 'NULL edge pointer' errors were found.
WEMEdge * getEdge()
Returns the edge.
std::string getErrorMessage() const
Returns the error message.
int numFatals() const
Returns the number of fatals.
int numWarnings() const
Returns the number of warnings.
bool hasNonConnectedPointer() const
Returns whether 'Non connected edge pointer' errors were found.
bool isOk() const
Returns whether the edge is ok.
int numNotices() const
Returns the number of notices.
bool hasCircularPointer() const
Returns whether 'Circular edge pointer' errors wre found.
bool selected
Is the edge selected?
int getSeverity() const
Returns the severity of errors.
void checkIntegrity(WEMEdge *edge)
Checks the integrity of the given edge.
int numErrors() const
Returns the number of errors.
std::string message
Stuff used by SoWEMDiagnosis.
bool isNeighborhoodNotSet() const
Returns whether 'Neighborhood not set' errors were found.
bool isBoundary() const
Returns whether 'Boundary' errors were found.
bool hasNULLHead() const
Returns whether 'NULL head' errors were found.
bool hasEqualPointer() const
Returns whether 'Equal edge pointer' errors were found.
~WEMEdgeDiagnosis()
Standard destructor.
bool hasNULLTail() const
Returns whether 'NULL tail' errors were found.
bool hasIncorrectlyLinkedPointer() const
Returns whether 'Incorrectly linked edge pointer' were found.
WEMEdgeDiagnosis()
Standard constructor.
const WEMEdge * getEdge() const
Returns the edge.
bool hasFold() const
Returns whether 'Fold' errors were found.
Defines the mesh component: edge.
Definition WEMEdge.h:30
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
const int EDGE_SEVERITY_NOTICE
Error status: just a notice.
const int EDGE_SEVERITY_ALLISWELL
Error status: no error at all.
const int EDGE_SEVERITY_WARNING
Error status: a warning.
const int EDGE_SEVERITY_ERROR
Error status: an error.
const int EDGE_SEVERITY_FATAL
Error status: a serious error.