34 if (left ==
nullptr && right ==
nullptr)
37 if (AreSameClasses(left, right, verbose))
39 return InternalAreEqual(*left, *right, eps, verbose);
45 bool mitk::BaseDataCompare::AreSameClasses(
const BaseData *left,
const BaseData *right,
bool verbose)
47 if (left ==
nullptr && right ==
nullptr)
50 if (left ==
nullptr && right !=
nullptr)
53 MITK_WARN <<
"Left data is nullptr, right data is not (type " << right->GetNameOfClass() <<
")";
57 if (left !=
nullptr && right ==
nullptr)
60 MITK_WARN <<
"Right data is nullptr, left data is not (type " << left->GetNameOfClass() <<
")";
65 if (left->GetNameOfClass() != right->GetNameOfClass())
68 MITK_WARN <<
"Mismatch: Left data is '" << left->GetNameOfClass() <<
"', "
69 <<
"right data is '" << right->GetNameOfClass() <<
"'";
78 static bool comparatorsCreated =
false;
79 if (!comparatorsCreated)
101 comparatorsCreated =
true;
ServiceRegistrationU RegisterService(const InterfaceMap &service, const ServiceProperties &properties=ServiceProperties())
Base of all data objects.
Implementation of BaseDataCompare that uses a non-const version of mitk:Equal() for comparisons...
Implementation of BaseDataCompare that uses mitk:Equal() for comparisons.
bool AreEqual(const BaseData *left, const BaseData *right, ScalarType eps=mitk::eps, bool verbose=false)
Main interface method, compares two given BaseData instances.
static const char * GetStaticNameOfClass()
static const char * GetStaticNameOfClass()
US_UNORDERED_MAP_TYPE< std::string, Any > ServiceProperties
static const char * GetStaticNameOfClass()
static const char * GetStaticNameOfClass()
static void RegisterCoreEquals()
Register core type comparators that come with mitk::Equal() functions.
MITKCORE_EXPORT const ScalarType eps
Interface to compare two BaseData objects for (near) equality.
static ModuleContext * GetModuleContext()
Returns the module context of the calling module.