18#ifndef itkHistogramMatchingImageFilter_h
19#define itkHistogramMatchingImageFilter_h
23#include "vnl/vnl_matrix.h"
74template <
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);
181#ifdef ITK_USE_CONCEPT_CHECKING
224 THistogramMeasurement & minValue,
225 THistogramMeasurement & maxValue,
226 THistogramMeasurement & meanValue);
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"
Normalize the grayscale values for a source image by matching the shape of the source image histogram...
typename HistogramType::Pointer HistogramPointer
HistogramMatchingImageFilter()
~HistogramMatchingImageFilter() override=default
void GenerateInputRequestedRegion() override
itkSetInputMacro(ReferenceHistogram, HistogramType)
void VerifyPreconditions() const override
Verifies that the process object has been configured correctly, that all required inputs are set,...
void ConstructHistogramFromIntensityRange(const InputImageType *image, HistogramType *histogram, const THistogramMeasurement minHistogramValidValue, const THistogramMeasurement maxHistogramValidValue, const THistogramMeasurement imageTrueMinValue, const THistogramMeasurement imageTrueMaxValue)
typename OutputImageType::PixelType OutputPixelType
itkSetInputMacro(SourceImage, InputImageType)
void ComputeMinMaxMean(const InputImageType *image, THistogramMeasurement &minValue, THistogramMeasurement &maxValue, THistogramMeasurement &meanValue)
vnl_vector< double > GradientArrayType
void VerifyInputInformation() const override
void PrintSelf(std::ostream &os, Indent indent) const override
itkGetInputMacro(SourceImage, InputImageType)
vnl_matrix< double > TableType
typename InputImageType::PixelType InputPixelType
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) override
itkGetInputMacro(ReferenceImage, InputImageType)
itkSetInputMacro(ReferenceImage, InputImageType)
void AfterThreadedGenerateData() override
void BeforeThreadedGenerateData() override
itkGetInputMacro(ReferenceHistogram, HistogramType)
Base class for all process objects that output image data.
typename OutputImageType::RegionType OutputImageRegionType
Base class for filters that take an image as input and produce an image as output.
TInputImage InputImageType
Control indentation during Print() invocation.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
This class stores measurement vectors in the context of n-dimensional histogram.
SmartPointer< Self > Pointer
#define itkConceptMacro(name, concept)
ImageBaseType::RegionType RegionType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType