ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkTestingComparisonImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef itkTestingComparisonImageFilter_h
19#define itkTestingComparisonImageFilter_h
20
21#include "itkArray.h"
22#include "itkNumericTraits.h"
24#include <mutex>
25
26namespace itk::Testing
27{
41template <typename TInputImage, typename TOutputImage>
42class ITK_TEMPLATE_EXPORT ComparisonImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
43{
44public:
45 ITK_DISALLOW_COPY_AND_MOVE(ComparisonImageFilter);
46
52
54 itkNewMacro(Self);
55
57 itkOverrideGetNameOfClassMacro(ComparisonImageFilter);
58
60 using InputImageType = TInputImage;
61 using InputPixelType = typename InputImageType::PixelType;
62 using OutputImageType = TOutputImage;
63 using OutputPixelType = typename OutputImageType::PixelType;
64 using OutputImageRegionType = typename OutputImageType::RegionType;
67
70
73
76 itkSetMacro(VerifyInputInformation, bool);
77 itkGetConstMacro(VerifyInputInformation, bool);
78 itkBooleanMacro(VerifyInputInformation);
79
82 itkSetMacro(ToleranceRadius, int);
83 itkGetConstMacro(ToleranceRadius, int);
84
87 itkSetMacro(DifferenceThreshold, OutputPixelType);
88 itkGetConstMacro(DifferenceThreshold, OutputPixelType);
89
93 itkSetMacro(IgnoreBoundaryPixels, bool);
94 itkGetConstMacro(IgnoreBoundaryPixels, bool);
95 itkBooleanMacro(IgnoreBoundaryPixels);
96
99 itkGetConstMacro(MinimumDifference, OutputPixelType);
100 itkGetConstMacro(MaximumDifference, OutputPixelType);
101 itkGetConstMacro(MeanDifference, RealType);
102 itkGetConstMacro(TotalDifference, AccumulateType);
103 itkGetConstMacro(NumberOfPixelsWithDifferences, SizeValueType);
104
105protected:
107 ~ComparisonImageFilter() override = default;
108
109 void
110 PrintSelf(std::ostream & os, Indent indent) const override;
111
115 void
117
118 void
120
121 void
123
124 void
125 VerifyInputInformation() const override;
126
128
133
135
137
139
140private:
142
143 std::mutex m_Mutex;
144};
145} // namespace itk::Testing
146
147#ifndef ITK_MANUAL_INSTANTIATION
148# include "itkTestingComparisonImageFilter.hxx"
149#endif
150
151
152#endif
Control indentation during Print() invocation.
Definition itkIndent.h:50
static constexpr T NonpositiveMin()
static constexpr T max(const T &)
Implements transparent reference counting.
typename OutputImageType::PixelType OutputPixelType
void VerifyInputInformation() const override
Verifies that the inputs meta-data is consistent and valid for continued execution of the pipeline,...
typename InputImageType::PixelType InputPixelType
void DynamicThreadedGenerateData(const OutputImageRegionType &) override
void BeforeThreadedGenerateData() override
ImageToImageFilter< TInputImage, TOutputImage > Superclass
typename NumericTraits< RealType >::AccumulateType AccumulateType
~ComparisonImageFilter() override=default
typename OutputImageType::RegionType OutputImageRegionType
itkSetInputMacro(ValidInput, InputImageType)
itkSetInputMacro(TestInput, InputImageType)
void PrintSelf(std::ostream &os, Indent indent) const override
typename NumericTraits< OutputPixelType >::RealType RealType
unsigned long SizeValueType
Definition itkIntTypes.h:86