MeVisLabToolboxReference
|
00001 // **InsertLicense** code 00002 //---------------------------------------------------------------------------------- 00004 00011 #ifndef __WEMFaceDiagnosis_H 00012 #define __WEMFaceDiagnosis_H 00013 00014 #include "WEMTools/WEMToolsIncludes.h" 00015 00016 00017 ML_START_NAMESPACE 00018 00020 00021 const int FACE_SEVERITY_ALLISWELL = 0; 00022 const int FACE_SEVERITY_NOTICE = 1; 00023 const int FACE_SEVERITY_WARNING = 2; 00024 const int FACE_SEVERITY_ERROR = 3; 00025 const int FACE_SEVERITY_FATAL = 4; 00026 00028 00030 class MLWEM_EXPORT WEMFaceDiagnosis 00031 { 00032 00033 public: 00034 00036 WEMFaceDiagnosis(bool hasEdges); 00038 ~WEMFaceDiagnosis(); 00039 00041 inline bool hasBadNormalLength() const { return _badNormalLength; } 00043 inline bool isNeighborhoodNotSet() const { return _neighborhoodNotSet; } 00045 inline bool hasNULLNode() const { return _nullNode; } 00047 inline bool hasNULLEdge() const { return _nullEdge; } 00049 inline bool isInvalid() const { return _invalid; } 00051 inline bool hasEdgeOffset() const { return _edgeOffset; } 00053 inline bool isConcave() const { return _concave; } 00055 inline bool isNormalInverted() const { return _normalInverted; } 00057 inline bool hasDoubleEntry() const { return _doubleEntry; } 00059 inline bool hasNonConnected() const { return _nonConnected; } 00061 inline bool hasZeroArea() const { return _zeroArea; } 00062 00064 inline int numNotices() const { return _numNotices; } 00066 inline int numWarnings() const { return _numWarnings; } 00068 inline int numErrors() const { return _numErrors; } 00070 inline int numFatals() const { return _numFatals; } 00071 00073 inline bool isOk() const { 00074 return (_numNotices == 0 && _numWarnings == 0 && _numErrors == 0 && _numFatals == 0); 00075 } 00077 inline std::string getErrorMessage() const { return _message; } 00078 00080 int getSeverity() const; 00082 inline WEMFace* getFace() { return _face; } 00084 inline const WEMFace* getFace() const { return _face; } 00085 00087 void checkIntegrity(WEMFace* face); 00088 00091 std::string message; 00093 bool selected; 00094 00095 private: 00096 00098 int _numNotices; 00100 int _numWarnings; 00102 int _numErrors; 00104 int _numFatals; 00105 00107 WEMFace *_face; 00108 00110 bool _hasEdges; 00111 00113 std::string _message; 00114 00116 bool _badNormalLength; 00118 bool _neighborhoodNotSet; 00120 bool _nullNode; 00122 bool _nullEdge; 00124 bool _invalid; 00126 bool _edgeOffset; 00128 bool _concave; 00130 bool _normalInverted; 00132 bool _doubleEntry; 00134 bool _nonConnected; 00136 bool _zeroArea; 00137 }; 00138 00140 00141 ML_END_NAMESPACE 00142 00143 #endif // __WEMFaceDiagnosis_H