18 #ifndef itkHistogramMatchingImageFilter_h
19 #define itkHistogramMatchingImageFilter_h
23 #include "vnl/vnl_matrix.h"
74 template <
typename TInputImage,
typename TOutputImage,
typename THistogramMeasurement =
typename TInputImage::PixelType>
93 static constexpr
unsigned int ImageDimension = TInputImage::ImageDimension;
94 static constexpr
unsigned int OutputImageDimension = TOutputImage::ImageDimension;
100 using typename Superclass::InputImageType;
101 using typename Superclass::InputImagePointer;
102 using typename Superclass::InputImageConstPointer;
103 using typename Superclass::OutputImageType;
104 using typename Superclass::OutputImagePointer;
151 itkSetMacro(ThresholdAtMeanIntensity,
bool);
152 itkGetConstMacro(ThresholdAtMeanIntensity,
bool);
153 itkBooleanMacro(ThresholdAtMeanIntensity);
165 itkSetMacro(GenerateReferenceHistogramFromImage,
bool);
166 itkGetConstMacro(GenerateReferenceHistogramFromImage,
bool);
167 itkBooleanMacro(GenerateReferenceHistogramFromImage);
172 GenerateInputRequestedRegion()
override;
181 #ifdef ITK_USE_CONCEPT_CHECKING
197 PrintSelf(std::ostream & os,
Indent indent)
const override;
200 BeforeThreadedGenerateData()
override;
203 AfterThreadedGenerateData()
override;
219 VerifyPreconditions()
const override;
223 ComputeMinMaxMean(
const InputImageType * image,
224 THistogramMeasurement & minValue,
225 THistogramMeasurement & maxValue,
226 THistogramMeasurement & meanValue);
233 ConstructHistogramFromIntensityRange(
const InputImageType * image,
234 HistogramType * histogram,
235 const THistogramMeasurement minHistogramValidValue,
236 const THistogramMeasurement maxHistogramValidValue,
237 const THistogramMeasurement imageTrueMinValue,
238 const THistogramMeasurement imageTrueMaxValue);
243 bool m_ThresholdAtMeanIntensity{
true };
245 THistogramMeasurement m_SourceMinValue{};
246 THistogramMeasurement m_SourceMaxValue{};
248 THistogramMeasurement m_ReferenceMinValue{};
249 THistogramMeasurement m_ReferenceMaxValue{};
259 double m_LowerGradient{ 0.0 };
260 double m_UpperGradient{ 0.0 };
261 bool m_GenerateReferenceHistogramFromImage{
true };
265 #ifndef ITK_MANUAL_INSTANTIATION
266 # include "itkHistogramMatchingImageFilter.hxx"