18 #ifndef itkHistogramMatchingImageFilter_h
19 #define itkHistogramMatchingImageFilter_h
23 #include "vnl/vnl_matrix.h"
67 template<
typename TInputImage,
typename TOutputImage,
typename THistogramMeasurement =
typename TInputImage::PixelType >
87 static constexpr
unsigned int ImageDimension = TInputImage::ImageDimension;
88 static constexpr
unsigned int OutputImageDimension = TOutputImage::ImageDimension;
110 { this->SetInput(source); }
112 {
return this->GetInput(); }
116 void SetReferenceImage(
const InputImageType *reference);
118 const InputImageType * GetReferenceImage();
135 itkSetMacro(ThresholdAtMeanIntensity,
bool);
136 itkGetConstMacro(ThresholdAtMeanIntensity,
bool);
137 itkBooleanMacro(ThresholdAtMeanIntensity);
141 void GenerateInputRequestedRegion()
override;
146 itkGetModifiableObjectMacro(SourceHistogram, HistogramType);
147 itkGetModifiableObjectMacro(ReferenceHistogram, HistogramType);
148 itkGetModifiableObjectMacro(OutputHistogram, HistogramType);
151 #ifdef ITK_USE_CONCEPT_CHECKING
173 void PrintSelf(std::ostream & os,
Indent indent)
const override;
175 void BeforeThreadedGenerateData()
override;
177 void AfterThreadedGenerateData()
override;
179 void DynamicThreadedGenerateData(
const OutputImageRegionType & outputRegionForThread)
override;
190 void ComputeMinMaxMean(
const InputImageType *image,
191 THistogramMeasurement & minValue,
192 THistogramMeasurement & maxValue,
193 THistogramMeasurement & meanValue);
196 void ConstructHistogram(
const InputImageType *image,
197 HistogramType *histogram,
const THistogramMeasurement minValue,
198 const THistogramMeasurement maxValue);
203 bool m_ThresholdAtMeanIntensity{
true};
228 double m_LowerGradient{0.0};
229 double m_UpperGradient{0.0};
233 #ifndef ITK_MANUAL_INSTANTIATION
234 #include "itkHistogramMatchingImageFilter.hxx"
THistogramMeasurement m_OutputMeanValue
InputPixelType m_ReferenceIntensityThreshold
vnl_vector< double > GradientArrayType
THistogramMeasurement m_OutputMaxValue
TableType m_QuantileTable
typename OutputImageType::Pointer OutputImagePointer
HistogramPointer m_ReferenceHistogram
THistogramMeasurement m_ReferenceMeanValue
THistogramMeasurement m_ReferenceMaxValue
unsigned long SizeValueType
This class stores measurement vectors in the context of n-dimensional histogram.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
THistogramMeasurement m_ReferenceMinValue
InputPixelType m_SourceIntensityThreshold
THistogramMeasurement m_SourceMeanValue
Base class for all process objects that output image data.
THistogramMeasurement m_OutputMinValue
const InputImageType * GetSourceImage()
typename HistogramType::Pointer HistogramPointer
TInputImage InputImageType
HistogramPointer m_OutputHistogram
typename InputImageType::Pointer InputImagePointer
THistogramMeasurement m_SourceMaxValue
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
HistogramPointer m_SourceHistogram
Base class for filters that take an image as input and produce an image as output.
void SetSourceImage(const InputImageType *source)
Normalize the grayscale values between two images by histogram matching.
Control indentation during Print() invocation.
OutputPixelType m_OutputIntensityThreshold
GradientArrayType m_Gradients
typename OutputImageType::PixelType OutputPixelType
typename InputImageType::PixelType InputPixelType
vnl_matrix< double > TableType
void VerifyInputInformation() ITKv5_CONST override
ImageBaseType::RegionType RegionType
#define itkConceptMacro(name, concept)
typename InputImageType::ConstPointer InputImageConstPointer
THistogramMeasurement m_SourceMinValue