17 #ifndef mitkBaseDataCompare_h_included
18 #define mitkBaseDataCompare_h_included
57 virtual bool InternalAreEqual(
const BaseData &left,
60 bool verbose =
false) = 0;
65 bool AreSameClasses(
const BaseData *left,
const BaseData *right,
bool verbose =
false);
99 virtual bool InternalAreEqual(
const BaseData &left,
102 bool verbose =
false)
106 const T &leftT =
dynamic_cast<const T &
>(left);
107 const T &rightT =
dynamic_cast<const T &
>(right);
111 catch (
const std::exception &e)
113 MITK_ERROR <<
"Bad cast in BaseDataCompareT<>::InternalAreEqual()" << e.what();
134 virtual bool InternalAreEqual(
const BaseData &left,
137 bool verbose =
false)
141 const T &leftT =
dynamic_cast<const T &
>(left);
142 const T &rightT =
dynamic_cast<const T &
>(right);
144 T &leftTNonConst =
const_cast<T &
>(leftT);
145 T &rightTNonConst =
const_cast<T &
>(rightT);
149 catch (
const std::exception &e)
151 MITK_ERROR <<
"Bad cast in BaseDataCompareTNonConst<>::InternalAreEqual(): " << e.what();
Base of all data objects.
Implementation of BaseDataCompare that uses a non-const version of mitk:Equal() for comparisons...
DataCollection - Class to facilitate loading/accessing structured data.
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.
MITKNEWMODULE_EXPORT bool Equal(mitk::ExampleDataStructure *leftHandSide, mitk::ExampleDataStructure *rightHandSide, mitk::ScalarType eps, bool verbose)
Returns true if the example data structures are considered equal.
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.