13 #ifndef mitkCompareImageDataFilter_h
14 #define mitkCompareImageDataFilter_h
119 template <
typename TPixel,
unsigned int VImageDimension>
Filter for pixel-wise comparison of two mitk::Image objects.
~CompareImageDataFilter() override
Destructor.
CompareFilterResults m_CompareDetails
Detailed comparison statistics.
mitkClassMacro(CompareImageDataFilter, ImageToImageFilter)
double m_Tolerance
Per-pixel tolerance value.
void ResetCompareResultsToInitial()
Reset the comparison detail struct to its initial state.
void GenerateData() override
Perform the pixel-wise comparison.
CompareFilterResults GetCompareResults()
Get the detailed results of the comparison run.
bool m_CompareResult
Overall pass/fail result.
bool GetResult(size_t threshold=0)
Check whether the comparison passes a given threshold.
CompareImageDataFilter()
Constructor. Sets the number of required inputs to 2.
void EstimateValueDifference(const itk::Image< TPixel, VImageDimension > *itkImage1, const mitk::Image *referenceImage)
Run itk::Testing::ComparisonImageFilter on the two inputs.
void SetTolerance(double eps)
Set the tolerance for per-pixel difference comparison.
Superclass of all classes having one or more Images as input and generating Images as output.
Image class for storing multi-dimensional medical image data.
#define MITK_INFO
Log an informational message.
Find image slices visible on a given plane.
MITKCORE_EXPORT const ScalarType eps
Epsilon value for floating point comparison (vnl_math::eps * 100).
Holds the detailed results of a CompareImageDataFilter comparison.
double m_MaximumDifference
Largest per-pixel difference found.
std::string m_ExceptionMessage
Exception message if the filter did not complete.
size_t m_PixelsWithDifference
Number of pixels that differ beyond tolerance.
double m_TotalDifference
Sum of all per-pixel differences.
double m_MinimumDifference
Smallest per-pixel difference found.
bool m_FilterCompleted
Whether the comparison finished without exception.
double m_MeanDifference
Mean per-pixel difference.
void PrintSelf()
Print the comparison results to MITK_INFO.