MeVisLabToolboxReference
|
00001 // **InsertLicense** code 00002 //---------------------------------------------------------------------------------- 00004 00011 #ifndef __WEMPatchDiagnosis_H 00012 #define __WEMPatchDiagnosis_H 00013 00014 #include "WEMTools/WEMToolsIncludes.h" 00015 00016 00017 ML_START_NAMESPACE 00018 00020 00021 const int PATCH_SEVERITY_ALLISWELL = 0; 00022 const int PATCH_SEVERITY_NOTICE = 1; 00023 const int PATCH_SEVERITY_WARNING = 2; 00024 const int PATCH_SEVERITY_ERROR = 3; 00025 const int PATCH_SEVERITY_FATAL = 4; 00026 00028 00030 class MLWEM_EXPORT WEMPatchDiagnosis 00031 { 00032 00033 public: 00034 00036 WEMPatchDiagnosis(bool hasEdges); 00038 ~WEMPatchDiagnosis(); 00039 00041 inline bool hasDuplicateNodes() const { return (_duplicateNodes > 0); } 00043 inline int numDuplicateNodes() const { return _duplicateNodes; } 00045 inline bool hasHoles() const { return (_holes > 0); } 00047 inline int numHoles() const { return _holes; } 00049 inline bool hasNonCloseableHoles() const { return (_nonCloseableHoles > 0); } 00051 inline int numNonCloseableHoles() const { return _nonCloseableHoles; } 00053 inline bool isInverted() const { return _inverted; } 00054 00056 inline int numNotices() const { return _numNotices; } 00058 inline int numWarnings() const { return _numWarnings; } 00060 inline int numErrors() const { return _numErrors; } 00062 inline int numFatals() const { return _numFatals; } 00063 00065 inline bool isOk() const { 00066 return (_numNotices == 0 && _numWarnings == 0 && _numErrors == 0 && _numFatals == 0); 00067 } 00069 inline std::string getErrorMessage() const { return _message; } 00070 00072 int getSeverity() const; 00074 inline WEMPatch* getPatch() { return _patch; } 00076 inline const WEMPatch* getPatch() const { return _patch; } 00077 00079 void checkIntegrity(WEMPatch* patch); 00080 00083 std::string message; 00085 bool selected; 00086 00087 private: 00088 00090 int _numNotices; 00092 int _numWarnings; 00094 int _numErrors; 00096 int _numFatals; 00097 00099 WEMPatch *_patch; 00100 00102 bool _hasEdges; 00103 00105 std::string _message; 00106 00108 int _duplicateNodes; 00110 int _holes; 00112 int _nonCloseableHoles; 00114 bool _inverted; 00115 }; 00116 00118 00119 ML_END_NAMESPACE 00120 00121 #endif // __WEMPatchDiagnosis_H