23 #include "itkNumericTraits.h"
42 compareResult.m_MeanDifference = 0.0f;
43 compareResult.m_FilterCompleted =
false;
44 compareResult.m_TotalDifference = 0.0f;
45 compareResult.m_PixelsWithDifference = 0;
46 testObject->SetCompareFilterResult(&compareResult);
49 "Testing set/get of compare result struct");
56 testObject->SetValidImage(testImg);
57 testObject->SetTestImage(testImg2);
67 unsigned char *imgData = (
unsigned char *)imgAcc.GetData();
76 mitk::Equal((
int)testObject->GetCompareFilterResult()->m_PixelsWithDifference, (int)3) &&
77 mitk::Equal((
double)testObject->GetCompareFilterResult()->m_MaximumDifference, (double)3.0) &&
78 mitk::Equal((
double)testObject->GetCompareFilterResult()->m_MeanDifference, (double)2.0),
79 "Assessing calculated image differences");
double m_MaximumDifference
#define MITK_TEST_CONDITION_REQUIRED(COND, MSG)
section GeneralTestsDeprecatedOldTestingStyle Deprecated macros All tests with MITK_TEST_BEGIN()
A simple struct to hold the result of the comparison filter.
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.
ImageReadAccessor class to get locked read access for a particular image part.
int mitkMultiComponentImageDataComparisonFilterTest(int, char *argv[])
static mitk::Image::Pointer LoadImage(const std::string &path)
LoadImage Convenience method to load an arbitrary mitkImage.