MeVisLab Toolbox Reference
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:
33
35 WEMNodeDiagnosis(bool hasEdges);
38
40 inline bool hasDoubleEntry() const { return _doubleEntry; }
42 inline bool hasNonConnected() const { return _nonConnected; }
44 inline bool isBoundary() const { return _boundary; }
46 inline bool isOrphan() const { return _orphan; }
48 inline bool isRedundant() const { return _redundant; }
50 inline bool isCollinear() const { return _collinear; }
52 inline bool hasBadNormalLength() const { return _badNormalLength; }
54 inline bool isDeadEnd() const { return _deadEnd; }
56 inline bool isFlatRegion() const { return _flatRegion; }
58 inline bool isNeighborhoodNotSet() const { return _neighborhoodNotSet; }
60 inline bool hasValence3() const { return _valence3; }
61
63 inline int numNotices() const { return _numNotices; }
65 inline int numWarnings() const { return _numWarnings; }
67 inline int numErrors() const { return _numErrors; }
69 inline int numFatals() const { return _numFatals; }
70
72 inline bool isOk() const {
73 return (_numNotices == 0 && _numWarnings == 0 && _numErrors == 0 && _numFatals == 0);
74 }
76 inline std::string getErrorMessage() const { return _message; }
77
79 int getSeverity() const;
81 inline WEMNode* getNode() { return _node; }
83 inline const WEMNode* getNode() const { return _node; }
84
87
90 std::string message;
93
94private:
95
97 int _numNotices;
99 int _numWarnings;
101 int _numErrors;
103 int _numFatals;
104
106 WEMNode *_node;
107
109 bool _hasEdges;
110
112 std::string _message;
113
115 bool _doubleEntry;
117 bool _nonConnected;
119 bool _boundary;
121 bool _orphan;
123 bool _redundant;
125 bool _collinear;
127 bool _badNormalLength;
129 bool _deadEnd;
131 bool _flatRegion;
133 bool _neighborhoodNotSet;
135 bool _valence3;
136};
137
139
#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.