MeVisLab Toolbox Reference
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 
17 ML_START_NAMESPACE
18 
20 
21 const int EDGE_SEVERITY_ALLISWELL = 0;
22 const int EDGE_SEVERITY_NOTICE = 1;
23 const int EDGE_SEVERITY_WARNING = 2;
24 const int EDGE_SEVERITY_ERROR = 3;
25 const int EDGE_SEVERITY_FATAL = 4;
26 
28 
31 {
32 public:
33 
38 
40  inline bool hasNULLHead() const { return _headNull; }
42  inline bool hasNULLTail() const { return _tailNull; }
44  inline bool isNeighborhoodNotSet() const { return _neighborhoodNotSet; }
46  inline bool isBoundary() const { return _boundary; }
48  inline bool hasEqualPointer() const { return _equalPointer; }
50  inline bool hasNULLPointer() const { return _nullPointer; }
52  inline bool hasNonConnectedPointer() const { return _edgePointerNotConnected; }
54  inline bool hasIncorrectlyLinkedPointer() const { return _edgePointerLink; }
56  inline bool hasWrongOrder() const { return _order; }
58  inline bool hasCircularPointer() const { return _circularPointer; }
60  inline bool hasZeroLength() const { return _zeroLength; }
62  inline bool hasFold() const { return _fold; }
63 
65  inline int numNotices() const { return _numNotices; }
67  inline int numWarnings() const { return _numWarnings; }
69  inline int numErrors() const { return _numErrors; }
71  inline int numFatals() const { return _numFatals; }
72 
74  inline bool isOk() const {
75  return (_numNotices == 0 && _numWarnings == 0 && _numErrors == 0 && _numFatals == 0);
76  }
78  inline std::string getErrorMessage() const { return _message; }
79 
81  int getSeverity() const;
83  inline WEMEdge* getEdge() { return _edge; }
85  inline const WEMEdge* getEdge() const { return _edge; }
86 
88  void checkIntegrity(WEMEdge* edge);
89 
92  std::string message;
94  bool selected;
95 
96 
97 private:
98 
100  int _numNotices;
102  int _numWarnings;
104  int _numErrors;
106  int _numFatals;
107 
109  WEMEdge *_edge;
110 
112  std::string _message;
113 
114 
116  bool _headNull;
118  bool _tailNull;
120  bool _neighborhoodNotSet;
122  bool _boundary;
124  bool _equalPointer;
126  bool _nullPointer;
128  bool _edgePointerNotConnected;
130  bool _edgePointerLink;
132  bool _order;
134  bool _circularPointer;
136  bool _zeroLength;
138  bool _fold;
139 };
140 
142 
143 ML_END_NAMESPACE
#define MLWEM_EXPORT
Definition: MLWEMSystem.h:18
This class provides diagnostic information on a WEMEdge.
const WEMEdge * getEdge() const
Returns the edge.
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.
std::string getErrorMessage() const
Returns the error message.
int numFatals() const
Returns the number of fatals.
int numWarnings() const
Returns the number of warnings.
WEMEdge * getEdge()
Returns the edge.
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.
bool hasFold() const
Returns whether 'Fold' errors were found.
Defines the mesh component: edge.
Definition: WEMEdge.h:30
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.