MeVisLab Toolbox Reference
WEMPatchDiagnosis.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2010, 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 PATCH_SEVERITY_NOTICE = 1;
24const int PATCH_SEVERITY_ERROR = 3;
25const int PATCH_SEVERITY_FATAL = 4;
26
28
31{
32public:
33
35 WEMPatchDiagnosis(bool hasEdges);
38
40 inline bool hasDuplicateNodes() const { return (_duplicateNodes > 0); }
42 inline int numDuplicateNodes() const { return _duplicateNodes; }
44 inline bool hasHoles() const { return (_holes > 0); }
46 inline int numHoles() const { return _holes; }
48 inline bool hasNonCloseableHoles() const { return (_nonCloseableHoles > 0); }
50 inline int numNonCloseableHoles() const { return _nonCloseableHoles; }
52 inline bool isInverted() const { return _inverted; }
53
55 inline int numNotices() const { return _numNotices; }
57 inline int numWarnings() const { return _numWarnings; }
59 inline int numErrors() const { return _numErrors; }
61 inline int numFatals() const { return _numFatals; }
62
64 inline bool isOk() const {
65 return (_numNotices == 0 && _numWarnings == 0 && _numErrors == 0 && _numFatals == 0);
66 }
68 inline std::string getErrorMessage() const { return _message; }
69
71 int getSeverity() const;
73 inline WEMPatch* getPatch() { return _patch; }
75 inline const WEMPatch* getPatch() const { return _patch; }
76
79
82 std::string message;
85
86private:
87
89 int _numNotices;
91 int _numWarnings;
93 int _numErrors;
95 int _numFatals;
96
98 WEMPatch *_patch;
99
101 bool _hasEdges;
102
104 std::string _message;
105
107 int _duplicateNodes;
109 int _holes;
111 int _nonCloseableHoles;
113 bool _inverted;
114};
115
117
#define MLWEM_EXPORT
Definition MLWEMSystem.h:18
This class provides diagnostic information on a WEMNode.
int numFatals() const
Returns the number of fatals.
WEMPatchDiagnosis(bool hasEdges)
Standard constructor.
std::string getErrorMessage() const
Returns the error message.
void checkIntegrity(WEMPatch *patch)
Checks the integrity of the given patch.
bool hasNonCloseableHoles() const
Returns whether 'Non-closeable holes' errors were found.
bool selected
Is the node selected.
std::string message
Stuff used by SoWEMDiagnosis.
int numDuplicateNodes() const
Returns whether 'Get amount of duplicate nodes' errors were found.
int numHoles() const
Returns the number of found holes.
int numWarnings() const
Returns the number of warnings.
bool hasDuplicateNodes() const
Returns whether 'Duplicate nodes' errors were found.
WEMPatch * getPatch()
Returns the patch.
bool isOk() const
Returns whether the patch is ok.
bool isInverted() const
Returns whether the patch is inverted.
int getSeverity() const
Returns the severity of errors.
int numErrors() const
Returns the number of errors.
const WEMPatch * getPatch() const
Returns the patch.
int numNonCloseableHoles() const
Returns the number of non-closeable holes.
int numNotices() const
Returns the number of notices.
bool hasHoles() const
Returns whether Get 'Holes' errors were found.
~WEMPatchDiagnosis()
Standard destructor.
Base class for triangle and quad patches.
Definition WEMPatch.h:48
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
const int PATCH_SEVERITY_WARNING
Error status: a warning.
const int PATCH_SEVERITY_ALLISWELL
Error status: no error at all.
const int PATCH_SEVERITY_ERROR
Error status: an error.
const int PATCH_SEVERITY_NOTICE
Error status: just a notice.
const int PATCH_SEVERITY_FATAL
Error status: a serious error.