MeVisLabToolboxReference
|
00001 // **InsertLicense** code 00002 //---------------------------------------------------------------------------------- 00004 00011 //---------------------------------------------------------------------------------- 00012 00013 00014 #ifndef __mlCompareGraphs_H 00015 #define __mlCompareGraphs_H 00016 00017 00018 // Local includes 00019 #include "mlVesselGraphSystem.h" 00020 00021 // ML includes 00022 #include <mlModuleIncludes.h> 00023 00024 #include "mlSystemWarningsDisable.h" 00025 #include <map> 00026 #include "mlSystemWarningsRestore.h" 00027 00028 ML_START_NAMESPACE 00029 00030 class Graph; 00031 class VesselNode; 00032 class VesselNode; 00033 class VesselEdge; 00034 class VesselEdge; 00035 00037 class VESSELGRAPH_EXPORT CompareGraphs : public Module 00038 { 00039 public: 00040 00042 CompareGraphs (); 00043 00045 virtual void handleNotification (Field *field); 00046 00047 private: 00048 00049 // ---------------------------------------------------------- 00051 00052 // ---------------------------------------------------------- 00053 00055 BaseField *_inBase0Fld; 00057 BaseField *_inBase1Fld; 00059 BoolField *_ignoreIDsFld; 00061 BoolField *_ignoreDirectionsFld; 00063 NotifyField *_updateFld; 00065 BoolField *_comparedEqualFld; 00067 00068 typedef std::map<MLint, MLint> IDMap; 00069 IDMap createNodeMapping(const Graph* graphFrom, const Graph* graphTo) const; 00070 IDMap createEdgeMapping(const Graph* graphFrom, const Graph* graphTo, const IDMap& nodeMapping) const; 00071 bool compareNodes(const VesselNode* node0, const VesselNode* node1) const; 00072 bool compareEdges(const VesselEdge* edge0, const VesselEdge* edge1, const IDMap& nodeMapping) const; 00073 bool compareGraphs() const; 00074 00076 ML_BASEOP_CLASS_HEADER(CompareGraphs) 00077 }; 00078 00079 00080 ML_END_NAMESPACE 00081 00082 #endif // __mlCompareGraphs_H