MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
WEMFaceDiagnosis.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 FACE_SEVERITY_NOTICE = 1;
23const int FACE_SEVERITY_WARNING = 2;
24const int FACE_SEVERITY_ERROR = 3;
25const int FACE_SEVERITY_FATAL = 4;
26
28
31{
32public:
34 WEMFaceDiagnosis(bool hasEdges);
37
39 inline bool hasBadNormalLength() const
40 {
41 return _badNormalLength;
42 }
44 inline bool isNeighborhoodNotSet() const
45 {
46 return _neighborhoodNotSet;
47 }
49 inline bool hasNULLNode() const
50 {
51 return _nullNode;
52 }
54 inline bool hasNULLEdge() const
55 {
56 return _nullEdge;
57 }
59 inline bool isInvalid() const
60 {
61 return _invalid;
62 }
64 inline bool hasEdgeOffset() const
65 {
66 return _edgeOffset;
67 }
69 inline bool isConcave() const
70 {
71 return _concave;
72 }
74 inline bool isNormalInverted() const
75 {
76 return _normalInverted;
77 }
79 inline bool hasDoubleEntry() const
80 {
81 return _doubleEntry;
82 }
84 inline bool hasNonConnected() const
85 {
86 return _nonConnected;
87 }
89 inline bool hasZeroArea() const
90 {
91 return _zeroArea;
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 WEMFace* getFace()
130 {
131 return _face;
132 }
134 inline const WEMFace* getFace() const
135 {
136 return _face;
137 }
138
141
144 std::string message;
147
148private:
150 int _numNotices;
152 int _numWarnings;
154 int _numErrors;
156 int _numFatals;
157
159 WEMFace* _face;
160
162 bool _hasEdges;
163
165 std::string _message;
166
168 bool _badNormalLength;
170 bool _neighborhoodNotSet;
172 bool _nullNode;
174 bool _nullEdge;
176 bool _invalid;
178 bool _edgeOffset;
180 bool _concave;
182 bool _normalInverted;
184 bool _doubleEntry;
186 bool _nonConnected;
188 bool _zeroArea;
189};
190
192
#define MLWEM_EXPORT
Definition MLWEMSystem.h:18
This class provides diagnostic information on a WEMFace.
bool isConcave() const
Returns whether 'Concave' errors were found.
int getSeverity() const
Returns the severity of errors.
int numErrors() const
Returns the number of errors.
std::string getErrorMessage() const
Returns the error message.
bool selected
Is the face selected?
WEMFaceDiagnosis(bool hasEdges)
Standard constructor.
bool hasNULLNode() const
Returns whether 'NULL node' errors were found.
const WEMFace * getFace() const
Returns the face.
~WEMFaceDiagnosis()
Standard destructor.
bool hasNonConnected() const
Returns whether 'Non connected' errors were found.
bool isOk() const
Returns whether the face is ok.
WEMFace * getFace()
Returns the face.
int numNotices() const
Returns the number of notices.
bool hasNULLEdge() const
Returns whether 'NULL edge' errors were found.
bool isInvalid() const
Returns whether 'Invalid' error were found.
bool isNormalInverted() const
Returns whether 'Normal inverted' errors were found.
int numWarnings() const
Returns the number of warnings.
bool hasBadNormalLength() const
Returns whether 'Bad normal length' errors were found.
void checkIntegrity(WEMFace *face)
Checks the integrity of the given face.
bool hasEdgeOffset() const
Returns whether 'Edge offset' errors were found.
bool hasZeroArea() const
Returns whether 'Zero area' errors were found.
std::string message
Stuff used by SoWEMDiagnosis.
bool isNeighborhoodNotSet() const
Returns whether 'Neighborhood not set' errors were found.
bool hasDoubleEntry() const
Returns whether 'Double entry' errors were found.
int numFatals() const
Returns the number of fatals.
Defines the mesh component: face.
Definition WEMFace.h:30
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
const int FACE_SEVERITY_ERROR
Error status: an error.
const int FACE_SEVERITY_FATAL
Error status: a serious error.
const int FACE_SEVERITY_WARNING
Error status: a warning.
const int FACE_SEVERITY_ALLISWELL
Error status: no error at all.
const int FACE_SEVERITY_NOTICE
Error status: just a notice.