Medical Imaging Interaction Toolkit
2023.04.00
Medical Imaging Interaction Toolkit
|
In this group, the API documentation of methods useful for testing is collected. The more general concepts of testing in MITK are described on the General: Tests in MITK page. More...
Macros | |
#define | MITK_TEST_OUTPUT_NO_ENDL(x) |
Output some text without generating a terminating newline. Include. More... | |
#define | MITK_TEST_OUTPUT(x) |
Output some text. More... | |
#define | MITK_TEST_BEGIN(testName) |
Do some general test preparations. Must be called first in the main test function. More... | |
#define | MITK_TEST_FAILED_MSG(MSG) |
Fail and finish test with message MSG. More... | |
#define | MITK_TEST_END() |
Must be called last in the main test function. More... | |
#define | MITK_TEST_FOR_EXCEPTION_BEGIN(EXCEPTIONCLASS) |
Begin block which should be checked for exceptions. More... | |
#define | MITK_TEST_FOR_EXCEPTION(EXCEPTIONCLASS, STATEMENT) |
Simplified version of MITK_TEST_FOR_EXCEPTION_BEGIN / END for a single statement. More... | |
#define | MITK_ASSERT_EQUAL(EXPECTED, ACTUAL, MSG) |
Testing macro to test if two objects are equal. More... | |
#define | MITK_TEST_NOT_EQUAL(OBJ1, OBJ2, MSG) |
Testing macro to test if two objects are not equal. More... | |
#define | MITK_ASSERT_NOT_EQUAL(OBJ1, OBJ2, MSG) |
Testing macro to test if two objects are not equal. More... | |
#define | MITK_TEST_SUITE_REGISTRATION(TESTSUITE_NAME) |
Registers the given test suite. More... | |
#define | MITK_TEST(TESTMETHOD) |
Adds a test to the current test suite. More... | |
#define | MITK_PARAMETERIZED_TEST(TESTMETHOD, ARGS) |
Adds a parameterized test to the current test suite. More... | |
#define | MITK_PARAMETERIZED_CMD_LINE_TEST(TESTMETHOD) |
Adds a parameterized test to the current test suite. More... | |
#define | MITK_PARAMETERIZED_TEST_1(TESTMETHOD, arg1) |
Adds a parameterized test to the current test suite. More... | |
#define | MITK_PARAMETERIZED_TEST_2(TESTMETHOD, arg1, arg2) |
Adds a parameterized test to the current test suite. More... | |
Functions | |
MITKCORE_EXPORT bool | mitk::Equal (const mitk::BaseGeometry &leftHandSide, const mitk::BaseGeometry &rightHandSide, ScalarType coordinateEps, ScalarType directionEps, bool verbose=false) |
Equal A function comparing two geometries for being identical. More... | |
MITKCORE_EXPORT bool | mitk::Equal (const mitk::BaseGeometry &leftHandSide, const mitk::BaseGeometry &rightHandSide, ScalarType eps=mitk::eps, bool verbose=false) |
Equal A function comparing two geometries for being identical. More... | |
MITKCORE_EXPORT bool | mitk::Equal (const mitk::BaseGeometry::TransformType &leftHandSide, const mitk::BaseGeometry::TransformType &rightHandSide, ScalarType eps, bool verbose) |
Equal A function comparing two transforms (TransformType) for being identical. More... | |
MITKCORE_EXPORT bool | mitk::Equal (const mitk::BaseGeometry::BoundingBoxType &leftHandSide, const mitk::BaseGeometry::BoundingBoxType &rightHandSide, ScalarType eps, bool verbose) |
Equal A function comparing two bounding boxes (BoundingBoxType) for being identical. More... | |
bool | mitk::Equal (ScalarType scalar1, ScalarType scalar2, ScalarType eps=mitk::eps, bool verbose=false) |
MITKCORE_EXPORT bool | mitk::Equal (const mitk::GeometryData &leftHandSide, const mitk::GeometryData &rightHandSide, mitk::ScalarType eps, bool verbose) |
Equal Compare two GeometryData objects for equality, returns true if found equal. More... | |
MITKCORE_EXPORT bool | mitk::Equal (const mitk::Image &leftHandSide, const mitk::Image &rightHandSide, ScalarType eps, bool verbose) |
Equal A function comparing two images for being equal in meta- and imagedata. More... | |
template<typename TCoordRep , unsigned int NPointDimension> | |
bool | mitk::Equal (const itk::Point< TCoordRep, NPointDimension > &point1, const itk::Point< TCoordRep, NPointDimension > &point2, TCoordRep eps=mitk::eps, bool verbose=false) |
MITKCORE_EXPORT bool | mitk::Equal (const mitk::PointSet *leftHandSide, const mitk::PointSet *rightHandSide, mitk::ScalarType eps, bool verbose, bool checkGeometry=true) |
Equal A function comparing two pointsets for being identical. More... | |
MITKCORE_EXPORT bool | mitk::Equal (const mitk::PointSet &leftHandSide, const mitk::PointSet &rightHandSide, mitk::ScalarType eps, bool verbose, bool checkGeometry=true) |
Equal A function comparing two pointsets for being identical. More... | |
MITKCORE_EXPORT bool | mitk::Equal (const mitk::ProportionalTimeGeometry &leftHandSide, const mitk::ProportionalTimeGeometry &rightHandSide, ScalarType eps, bool verbose) |
Equal A function comparing two ProportionalTimeGeometries for being identical. More... | |
MITKCORE_EXPORT bool | mitk::Equal (mitk::Surface *leftHandSide, mitk::Surface *rightHandSide, mitk::ScalarType eps, bool verbose) |
Equal Compare two surfaces for equality, returns true if found equal. More... | |
MITKCORE_EXPORT bool | mitk::Equal (mitk::Surface &leftHandSide, mitk::Surface &rightHandSide, mitk::ScalarType eps, bool verbose) |
Equal Compare two surfaces for equality, returns true if found equal. More... | |
MITKCORE_EXPORT bool | mitk::Equal (vtkPolyData *leftHandSide, vtkPolyData *rightHandSide, mitk::ScalarType eps, bool verbose) |
Equal Compare two vtk PolyDatas for equality, returns true if found equal. More... | |
MITKCORE_EXPORT bool | mitk::Equal (vtkPolyData &leftHandSide, vtkPolyData &rightHandSide, mitk::ScalarType eps, bool verbose) |
Equal Compare two vtk PolyDatas for equality, returns true if found equal. More... | |
MITKCORE_EXPORT bool | mitk::Equal (const mitk::TimeGeometry &leftHandSide, const mitk::TimeGeometry &rightHandSide, ScalarType eps, bool verbose) |
Equal A function comparing two instances of TimeGeometry for being identical. More... | |
MITKCORE_EXPORT bool | mitk::Equal (const mitk::TimeGeometry &leftHandSide, const mitk::TimeGeometry &rightHandSide, ScalarType coordinateEps, ScalarType directionEps, bool verbose) |
Compare two instances of TimeGeometry. More... | |
template<typename TCoordRep , unsigned int NPointDimension> | |
bool | mitk::Equal (const itk::Vector< TCoordRep, NPointDimension > &vector1, const itk::Vector< TCoordRep, NPointDimension > &vector2, TCoordRep eps=mitk::eps, bool verbose=false) |
bool | mitk::Equal (const mitk::VnlVector &vector1, const mitk::VnlVector &vector2, ScalarType eps=mitk::eps, bool verbose=false) |
template<typename TCoordRep , unsigned int NPointDimension> | |
bool | mitk::Equal (const vnl_vector_fixed< TCoordRep, NPointDimension > &vector1, const vnl_vector_fixed< TCoordRep, NPointDimension > &vector2, TCoordRep eps=mitk::eps, bool verbose=false) |
MITKIGTBASE_EXPORT bool | mitk::Equal (const mitk::NavigationData &leftHandSide, const mitk::NavigationData &rightHandSide, ScalarType eps=mitk::eps, bool verbose=false) |
Equal A function comparing two navigation data objects for beeing equal in meta- and imagedata. More... | |
MITKMULTILABEL_EXPORT bool | mitk::Equal (const mitk::Label &leftHandSide, const mitk::Label &rightHandSide, ScalarType eps, bool verbose) |
Equal A function comparing two labels for beeing equal in data. More... | |
MITKMULTILABEL_EXPORT bool | mitk::Equal (const mitk::LabelSet &leftHandSide, const mitk::LabelSet &rightHandSide, ScalarType eps, bool verbose) |
Equal A function comparing two label sets for beeing equal in data. More... | |
MITKMULTILABEL_EXPORT bool | mitk::Equal (const mitk::LabelSetImage &leftHandSide, const mitk::LabelSetImage &rightHandSide, ScalarType eps, bool verbose) |
Equal A function comparing two label set images for beeing equal in meta- and imagedata. More... | |
MITKOPENIGTLINK_EXPORT bool | mitk::Equal (const mitk::IGTLMessage &leftHandSide, const mitk::IGTLMessage &rightHandSide, ScalarType eps=mitk::eps, bool verbose=false) |
Equal A function comparing two OpenIGTLink message objects for being equal in meta- and imagedata. More... | |
In this group, the API documentation of methods useful for testing is collected. The more general concepts of testing in MITK are described on the General: Tests in MITK page.
#define MITK_ASSERT_EQUAL | ( | EXPECTED, | |
ACTUAL, | |||
MSG | |||
) |
Testing macro to test if two objects are equal.
This macro uses mitk::eps and the corresponding mitk::Equal methods for all comparisons and will give verbose output on the dashboard/console. Feel free to implement mitk::Equal for your own datatype or purpose.
EXPECTED | First object. |
ACTUAL | Second object. |
MSG | Message to appear with the test. |
Throws | mitkException if a nullptr pointer is given as input. |
Definition at line 211 of file mitkTestingMacros.h.
#define MITK_ASSERT_NOT_EQUAL | ( | OBJ1, | |
OBJ2, | |||
MSG | |||
) |
Testing macro to test if two objects are not equal.
This macro uses mitk::eps and the corresponding mitk::Equal methods for all comparisons and will give verbose output on the dashboard/console.
OBJ1 | First object. |
OBJ2 | Second object. |
MSG | Message to appear with the test. |
Throws | mitkException if a nullptr pointer is given as input. |
Definition at line 252 of file mitkTestingMacros.h.
#define MITK_PARAMETERIZED_CMD_LINE_TEST | ( | TESTMETHOD | ) |
Adds a parameterized test to the current test suite.
Use this macro after the CPPUNIT_TEST_SUITE() macro to add test cases which need parameters from the command line.
TESTMETHOD | The name of the member function test. |
Definition at line 339 of file mitkTestingMacros.h.
#define MITK_PARAMETERIZED_TEST | ( | TESTMETHOD, | |
ARGS | |||
) |
Adds a parameterized test to the current test suite.
Use this macro after the CPPUNIT_TEST_SUITE() macro to add test cases which need custom parameters.
TESTMETHOD | The name of the member function test. |
ARGS | A std::vector<std::string> object containing test parameter. |
Definition at line 311 of file mitkTestingMacros.h.
#define MITK_PARAMETERIZED_TEST_1 | ( | TESTMETHOD, | |
arg1 | |||
) |
Adds a parameterized test to the current test suite.
Use this macro after the CPPUNIT_TEST_SUITE() macro to add test cases which need one custom parameter.
TESTMETHOD | The name of the member function test. |
arg1 | A custom string parameter being passed to the fixture. |
Definition at line 359 of file mitkTestingMacros.h.
#define MITK_PARAMETERIZED_TEST_2 | ( | TESTMETHOD, | |
arg1, | |||
arg2 | |||
) |
Adds a parameterized test to the current test suite.
Use this macro after the CPPUNIT_TEST_SUITE() macro to add test cases which need two custom parameter.
TESTMETHOD | The name of the member function test. |
arg1 | A custom string parameter being passed to the fixture. |
arg2 |
Definition at line 384 of file mitkTestingMacros.h.
#define MITK_TEST | ( | TESTMETHOD | ) |
Adds a test to the current test suite.
Use this macro after the CPPUNIT_TEST_SUITE() macro to add test cases. The macro internally just calls the CPPUNIT_TEST macro.
TESTMETHOD | The name of the member function test. |
Definition at line 295 of file mitkTestingMacros.h.
#define MITK_TEST_BEGIN | ( | testName | ) |
Do some general test preparations. Must be called first in the main test function.
Definition at line 60 of file mitkTestingMacros.h.
#define MITK_TEST_END | ( | ) |
Must be called last in the main test function.
Definition at line 81 of file mitkTestingMacros.h.
#define MITK_TEST_FAILED_MSG | ( | MSG | ) |
Fail and finish test with message MSG.
Definition at line 71 of file mitkTestingMacros.h.
#define MITK_TEST_FOR_EXCEPTION | ( | EXCEPTIONCLASS, | |
STATEMENT | |||
) |
Simplified version of MITK_TEST_FOR_EXCEPTION_BEGIN / END for a single statement.
Definition at line 192 of file mitkTestingMacros.h.
#define MITK_TEST_FOR_EXCEPTION_BEGIN | ( | EXCEPTIONCLASS | ) |
Begin block which should be checked for exceptions.
This macro, together with MITK_TEST_FOR_EXCEPTION_END, can be used to test whether a code block throws an expected exception. The test FAILS if the exception is NOT thrown. A simple example:
MITK_TEST_FOR_EXCEPTION_BEGIN(itk::ImageFileReaderException) typedef itk::ImageFileReader< itk::Image<unsigned char,2> > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName("/tmp/not-existing"); reader->Update(); MITK_TEST_FOR_EXCEPTION_END(itk::ImageFileReaderException)
Definition at line 169 of file mitkTestingMacros.h.
#define MITK_TEST_NOT_EQUAL | ( | OBJ1, | |
OBJ2, | |||
MSG | |||
) |
Testing macro to test if two objects are not equal.
This macro uses mitk::eps and the corresponding mitk::Equal methods for all comparisons and will give verbose output on the dashboard/console.
OBJ1 | First object. |
OBJ2 | Second object. |
MSG | Message to appear with the test. |
Definition at line 234 of file mitkTestingMacros.h.
#define MITK_TEST_OUTPUT | ( | x | ) |
Output some text.
Definition at line 51 of file mitkTestingMacros.h.
#define MITK_TEST_OUTPUT_NO_ENDL | ( | x | ) |
Output some text without generating a terminating newline. Include.
Definition at line 44 of file mitkTestingMacros.h.
#define MITK_TEST_SUITE_REGISTRATION | ( | TESTSUITE_NAME | ) |
Registers the given test suite.
TESTSUITE_NAME | The name of the test suite class, without "TestSuite" at the end. |
Definition at line 267 of file mitkTestingMacros.h.
|
inline |
point1 | Point to compare. |
point2 | Point to compare. |
eps | Tolerance for floating point comparison. |
verbose | Flag indicating detailed console output. |
Definition at line 112 of file mitkPoint.h.
References mitk::ConditionalOutputOfDifference(), mitk::DifferenceBiggerOrEqualEps(), and mitk::eps.
|
inline |
vector1 | Vector to compare. |
vector2 | Vector to compare. |
eps | Tolerance for floating point comparison. |
verbose | Flag indicating detailed console output. |
Definition at line 155 of file mitkVector.h.
References mitk::ConditionalOutputOfDifference(), mitk::DifferenceBiggerOrEqualEps(), and mitk::eps.
MITKCORE_EXPORT bool mitk::Equal | ( | const mitk::BaseGeometry & | leftHandSide, |
const mitk::BaseGeometry & | rightHandSide, | ||
ScalarType | coordinateEps, | ||
ScalarType | directionEps, | ||
bool | verbose = false |
||
) |
Equal A function comparing two geometries for being identical.
The function compares the spacing, origin, axisvectors, extents, the matrix of the IndexToWorldTransform (elementwise), the bounding (elementwise) and the ImageGeometry flag.
The parameter eps is a tolarence value for all methods which are internally used for comparison. If you want to use different tolerance values for different parts of the geometry, feel free to use the other comparison methods and write your own implementation of Equal.
rightHandSide | Compare this against leftHandSide. |
leftHandSide | Compare this against rightHandSide. |
coordinateEps | Tolerance for comparison of all spatial aspects (spacing, origin and grid alignment). You can use mitk::eps in most cases. |
directionEps | Tolerance for comparison of all directional aspects (axis). You can use mitk::eps in most cases. |
verbose | Flag indicating if the user wants detailed console output or not. |
MITKCORE_EXPORT bool mitk::Equal | ( | const mitk::BaseGeometry & | leftHandSide, |
const mitk::BaseGeometry & | rightHandSide, | ||
ScalarType | eps = mitk::eps , |
||
bool | verbose = false |
||
) |
Equal A function comparing two geometries for being identical.
This is an overloaded version that uses a single tolerance for spatial and directional aspects. For more details, see the other overloaded version.
rightHandSide | Compare this against leftHandSide. |
leftHandSide | Compare this against rightHandSide. |
eps | Tolarence for comparison. You can use mitk::eps in most cases. |
verbose | Flag indicating if the user wants detailed console output or not. |
MITKCORE_EXPORT bool mitk::Equal | ( | const mitk::BaseGeometry::BoundingBoxType & | leftHandSide, |
const mitk::BaseGeometry::BoundingBoxType & | rightHandSide, | ||
ScalarType | eps, | ||
bool | verbose | ||
) |
Equal A function comparing two bounding boxes (BoundingBoxType) for being identical.
The function compares the bounds (elementwise).
The parameter eps is a tolarence value for all methods which are internally used for comparison.
rightHandSide | Compare this against leftHandSide. |
leftHandSide | Compare this against rightHandSide. |
eps | Tolarence for comparison. You can use mitk::eps in most cases. |
verbose | Flag indicating if the user wants detailed console output or not. |
MITKCORE_EXPORT bool mitk::Equal | ( | const mitk::BaseGeometry::TransformType & | leftHandSide, |
const mitk::BaseGeometry::TransformType & | rightHandSide, | ||
ScalarType | eps, | ||
bool | verbose | ||
) |
Equal A function comparing two transforms (TransformType) for being identical.
The function compares the IndexToWorldTransform (elementwise).
The parameter eps is a tolarence value for all methods which are internally used for comparison.
rightHandSide | Compare this against leftHandSide. |
leftHandSide | Compare this against rightHandSide. |
eps | Tolarence for comparison. You can use mitk::eps in most cases. |
verbose | Flag indicating if the user wants detailed console output or not. |
MITKCORE_EXPORT bool mitk::Equal | ( | const mitk::GeometryData & | leftHandSide, |
const mitk::GeometryData & | rightHandSide, | ||
mitk::ScalarType | eps, | ||
bool | verbose | ||
) |
Equal Compare two GeometryData objects for equality, returns true if found equal.
rightHandSide | GeometryData to compare. |
leftHandSide | GeometryData to compare. |
eps | Epsilon to use for floating point comparison. Most of the time mitk::eps will be sufficient. |
verbose | Flag indicating if the method should give a detailed console output. |
MITKOPENIGTLINK_EXPORT bool mitk::Equal | ( | const mitk::IGTLMessage & | leftHandSide, |
const mitk::IGTLMessage & | rightHandSide, | ||
ScalarType | eps = mitk::eps , |
||
bool | verbose = false |
||
) |
Equal A function comparing two OpenIGTLink message objects for being equal in meta- and imagedata.
Following aspects are tested for equality:
rightHandSide | An IGTLMessage to be compared |
leftHandSide | An IGTLMessage to be compared |
eps | Tolarence for comparison. You can use mitk::eps in most cases. |
verbose | Flag indicating if the user wants detailed console output or not. |
MITKCORE_EXPORT bool mitk::Equal | ( | const mitk::Image & | leftHandSide, |
const mitk::Image & | rightHandSide, | ||
ScalarType | eps, | ||
bool | verbose | ||
) |
Equal A function comparing two images for being equal in meta- and imagedata.
Following aspects are tested for equality:
rightHandSide | An image to be compared |
leftHandSide | An image to be compared |
eps | Tolarence for comparison. You can use mitk::eps in most cases. |
verbose | Flag indicating if the user wants detailed console output or not. |
MITKMULTILABEL_EXPORT bool mitk::Equal | ( | const mitk::Label & | leftHandSide, |
const mitk::Label & | rightHandSide, | ||
ScalarType | eps, | ||
bool | verbose | ||
) |
Equal A function comparing two labels for beeing equal in data.
Following aspects are tested for equality:
rightHandSide | An image to be compared |
leftHandSide | An image to be compared |
eps | Tolarence for comparison. You can use mitk::eps in most cases. |
verbose | Flag indicating if the user wants detailed console output or not. |
MITKMULTILABEL_EXPORT bool mitk::Equal | ( | const mitk::LabelSet & | leftHandSide, |
const mitk::LabelSet & | rightHandSide, | ||
ScalarType | eps, | ||
bool | verbose | ||
) |
Equal A function comparing two label sets for beeing equal in data.
Following aspects are tested for equality:
rightHandSide | An image to be compared |
leftHandSide | An image to be compared |
eps | Tolarence for comparison. You can use mitk::eps in most cases. |
verbose | Flag indicating if the user wants detailed console output or not. |
MITKMULTILABEL_EXPORT bool mitk::Equal | ( | const mitk::LabelSetImage & | leftHandSide, |
const mitk::LabelSetImage & | rightHandSide, | ||
ScalarType | eps, | ||
bool | verbose | ||
) |
Equal A function comparing two label set images for beeing equal in meta- and imagedata.
Following aspects are tested for equality:
rightHandSide | An image to be compared |
leftHandSide | An image to be compared |
eps | Tolerance for comparison. You can use mitk::eps in most cases. |
verbose | Flag indicating if the user wants detailed console output or not. |
MITKIGTBASE_EXPORT bool mitk::Equal | ( | const mitk::NavigationData & | leftHandSide, |
const mitk::NavigationData & | rightHandSide, | ||
ScalarType | eps = mitk::eps , |
||
bool | verbose = false |
||
) |
Equal A function comparing two navigation data objects for beeing equal in meta- and imagedata.
Following aspects are tested for equality:
rightHandSide | An NavigationData to be compared |
leftHandSide | An NavigationData to be compared |
eps | Tolarence for comparison. You can use mitk::eps in most cases. |
verbose | Flag indicating if the user wants detailed console output or not. |
MITKCORE_EXPORT bool mitk::Equal | ( | const mitk::PointSet & | leftHandSide, |
const mitk::PointSet & | rightHandSide, | ||
mitk::ScalarType | eps, | ||
bool | verbose, | ||
bool | checkGeometry = true |
||
) |
Equal A function comparing two pointsets for being identical.
The function compares the Geometry, the size and all points element-wise. The parameter eps is a tolarence value for all methods which are internally used for comparison.
rightHandSide | Compare this against leftHandSide. |
leftHandSide | Compare this against rightHandSide. |
eps | Tolarence for comparison. You can use mitk::eps in most cases. |
verbose | Flag indicating if the user wants detailed console output or not. |
checkGeometry | if comparing point sets loaded from a file, the geometries might be different and must not be compared. In all other cases, you should compare the geometries. |
MITKCORE_EXPORT bool mitk::Equal | ( | const mitk::PointSet * | leftHandSide, |
const mitk::PointSet * | rightHandSide, | ||
mitk::ScalarType | eps, | ||
bool | verbose, | ||
bool | checkGeometry = true |
||
) |
Equal A function comparing two pointsets for being identical.
The function compares the Geometry, the size and all points element-wise. The parameter eps is a tolarence value for all methods which are internally used for comparison.
rightHandSide | Compare this against leftHandSide. |
leftHandSide | Compare this against rightHandSide. |
eps | Tolarence for comparison. You can use mitk::eps in most cases. |
verbose | Flag indicating if the user wants detailed console output or not. |
checkGeometry | if comparing point sets loaded from a file, the geometries might be different and must not be compared. In all other cases, you should compare the geometries. |
MITKCORE_EXPORT bool mitk::Equal | ( | const mitk::ProportionalTimeGeometry & | leftHandSide, |
const mitk::ProportionalTimeGeometry & | rightHandSide, | ||
ScalarType | eps, | ||
bool | verbose | ||
) |
Equal A function comparing two ProportionalTimeGeometries for being identical.
The function compares two instances of ProportionalTimeGeometries in all their aspects.
The parameter eps is a tolerance value for all methods which are internally used for comparison. If you want to use different tolerance values for different parts of the geometry, feel free to use the other comparison methods and write your own implementation of Equal.
rightHandSide | Compare this against leftHandSide. |
leftHandSide | Compare this against rightHandSide. |
eps | Tolerance for comparison. You can use mitk::eps in most cases. |
verbose | Flag indicating if the user wants detailed console output or not. |
MITKCORE_EXPORT bool mitk::Equal | ( | const mitk::TimeGeometry & | leftHandSide, |
const mitk::TimeGeometry & | rightHandSide, | ||
ScalarType | coordinateEps, | ||
ScalarType | directionEps, | ||
bool | verbose | ||
) |
Compare two instances of TimeGeometry.
The function compares two instances of TimeGeometries in all their aspects.
The parameter eps is a tolerance value for all methods which are internally used for comparison. If you want to use different tolerance values for different parts of the geometry, feel free to use the other comparison methods and write your own implementation of Equal.
leftHandSide | Compare this against rightHandSide. |
rightHandSide | Compare this against leftHandSide. |
coordinateEps | Tolerance for comparison of all spatial and temporal aspects (spacing, origin and grid alignment, time points). You can use mitk::eps in most cases. |
directionEps | Tolerance for comparison of all directional aspects (axis). You can use mitk::eps in most cases. |
verbose | Flag indicating if the user wants detailed console output or not. |
MITKCORE_EXPORT bool mitk::Equal | ( | const mitk::TimeGeometry & | leftHandSide, |
const mitk::TimeGeometry & | rightHandSide, | ||
ScalarType | eps, | ||
bool | verbose | ||
) |
Equal A function comparing two instances of TimeGeometry for being identical.
The function compares two instances of TimeGeometries in all their aspects.
The parameter eps is a tolerance value for all methods which are internally used for comparison. If you want to use different tolerance values for different parts of the geometry, feel free to use the other comparison methods and write your own implementation of Equal.
rightHandSide | Compare this against leftHandSide. |
leftHandSide | Compare this against rightHandSide. |
eps | Tolerance for comparison. You can use mitk::eps in most cases. |
verbose | Flag indicating if the user wants detailed console output or not. |
|
inline |
vector1 | Vector to compare. |
vector2 | Vector to compare. |
eps | Tolerance for floating point comparison. |
verbose | Flag indicating detailed console output. |
Definition at line 185 of file mitkVector.h.
References mitk::ConditionalOutputOfDifference(), mitk::DifferenceBiggerOrEqualEps(), and mitk::eps.
|
inline |
vector1 | Vector to compare. |
vector2 | Vector to compare. |
eps | Tolerance for floating point comparison. |
verbose | Flag indicating detailed console output. |
Definition at line 216 of file mitkVector.h.
References mitk::ConditionalOutputOfDifference(), mitk::DifferenceBiggerOrEqualEps(), and mitk::eps.
MITKCORE_EXPORT bool mitk::Equal | ( | mitk::Surface & | leftHandSide, |
mitk::Surface & | rightHandSide, | ||
mitk::ScalarType | eps, | ||
bool | verbose | ||
) |
Equal Compare two surfaces for equality, returns true if found equal.
rightHandSide | Surface to compare. |
leftHandSide | Surface to compare. |
eps | Epsilon to use for floating point comparison. Most of the time mitk::eps will be sufficient. |
verbose | Flag indicating if the method should give a detailed console output. |
MITKCORE_EXPORT bool mitk::Equal | ( | mitk::Surface * | leftHandSide, |
mitk::Surface * | rightHandSide, | ||
mitk::ScalarType | eps, | ||
bool | verbose | ||
) |
Equal Compare two surfaces for equality, returns true if found equal.
rightHandSide | Surface to compare. |
leftHandSide | Surface to compare. |
eps | Epsilon to use for floating point comparison. Most of the time mitk::eps will be sufficient. |
verbose | Flag indicating if the method should give a detailed console output. |
|
inline |
scalar1 | Scalar value to compare. |
scalar2 | Scalar value to compare. |
eps | Tolerance for floating point comparison. |
verbose | Flag indicating detailed console output. |
Definition at line 68 of file mitkEqual.h.
References mitk::ConditionalOutputOfDifference(), mitk::DifferenceBiggerOrEqualEps(), and mitk::eps.
MITKCORE_EXPORT bool mitk::Equal | ( | vtkPolyData & | leftHandSide, |
vtkPolyData & | rightHandSide, | ||
mitk::ScalarType | eps, | ||
bool | verbose | ||
) |
Equal Compare two vtk PolyDatas for equality, returns true if found equal.
rightHandSide | Surface to compare. |
leftHandSide | Surface to compare. |
eps | Epsilon to use for floating point comparison. Most of the time mitk::eps will be sufficient. |
verbose | Flag indicating if the method should give a detailed console output. |
This will only check if the number of cells, vertices, polygons, stripes and lines is the same and whether all the two poly datas have the same number of points with the same coordinates. It is not checked whether all points are correctly connected.
MITKCORE_EXPORT bool mitk::Equal | ( | vtkPolyData * | leftHandSide, |
vtkPolyData * | rightHandSide, | ||
mitk::ScalarType | eps, | ||
bool | verbose | ||
) |
Equal Compare two vtk PolyDatas for equality, returns true if found equal.
rightHandSide | Surface to compare. |
leftHandSide | Surface to compare. |
eps | Epsilon to use for floating point comparison. Most of the time mitk::eps will be sufficient. |
verbose | Flag indicating if the method should give a detailed console output. |
This will only check if the number of cells, vertices, polygons, stripes and lines is the same and whether all the two poly datas have the same number of points with the same coordinates. It is not checked whether all points are correctly connected.