template<typename TInputImage, typename TOutputImage, typename THistogramMeasurement = typename TInputImage::PixelType>
class itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >
Normalize the grayscale values between two images by histogram matching.
HistogramMatchingImageFilter normalizes the grayscale values of a source image based on the grayscale values of a reference image. This filter uses a histogram matching technique where the histograms of the two images are matched only at a specified number of quantile values.
This filter was originally designed to normalize MR images of the same MR protocol and same body part. The algorithm works best if background pixels are excluded from both the source and reference histograms. A simple background exclusion method is to exclude all pixels whose grayscale values are smaller than the mean grayscale value. ThresholdAtMeanIntensityOn() switches on this simple background exclusion method.
The source image can be set via either SetInput() or SetSourceImage(). The reference image can be set via SetReferenceImage().
SetNumberOfHistogramLevels() sets the number of bins used when creating histograms of the source and reference images. SetNumberOfMatchPoints() governs the number of quantile values to be matched.
This filter assumes that both the source and reference are of the same type and that the input and output image type have the same number of dimension and have scalar pixel types.
- REFERENCE
- Laszlo G. Nyul, Jayaram K. Udupa, and Xuan Zhang, "New Variants of a Method
of MRI Scale Standardization", IEEE Transactions on Medical Imaging, 19(2):143-150, 2000.
- Examples:
- Examples/RegistrationITKv3/DeformableRegistration1.cxx, Examples/RegistrationITKv3/DeformableRegistration10.cxx, Examples/RegistrationITKv3/DeformableRegistration11.cxx, Examples/RegistrationITKv3/DeformableRegistration16.cxx, Examples/RegistrationITKv3/DeformableRegistration17.cxx, Examples/RegistrationITKv3/DeformableRegistration2.cxx, Examples/RegistrationITKv3/DeformableRegistration3.cxx, Examples/RegistrationITKv3/DeformableRegistration5.cxx, Examples/RegistrationITKv3/DeformableRegistration9.cxx, Examples/RegistrationITKv4/DeformableRegistration1.cxx, Examples/RegistrationITKv4/DeformableRegistration10.cxx, Examples/RegistrationITKv4/DeformableRegistration11.cxx, Examples/RegistrationITKv4/DeformableRegistration16.cxx, Examples/RegistrationITKv4/DeformableRegistration17.cxx, Examples/RegistrationITKv4/DeformableRegistration2.cxx, Examples/RegistrationITKv4/DeformableRegistration3.cxx, Examples/RegistrationITKv4/DeformableRegistration5.cxx, and Examples/RegistrationITKv4/DeformableRegistration9.cxx.
Definition at line 68 of file itkHistogramMatchingImageFilter.h.
|
virtual ::itk::LightObject::Pointer | CreateAnother () const |
|
virtual void | GenerateInputRequestedRegion () override |
|
virtual const char * | GetNameOfClass () const |
|
const InputImageType * | GetReferenceImage () |
|
void | SetReferenceImage (const InputImageType *reference) |
|
| typedef (Concept::Convertible< int, InputPixelType >) IntConvertibleToInputCheck |
|
| typedef (Concept::SameDimension< ImageDimension, OutputImageDimension >) SameDimensionCheck |
|
| typedef (Concept::Convertible< double, InputPixelType >) DoubleConvertibleToInputCheck |
|
| typedef (Concept::Convertible< double, OutputPixelType >) DoubleConvertibleToOutputCheck |
|
| typedef (Concept::Convertible< InputPixelType, double >) InputConvertibleToDoubleCheck |
|
| typedef (Concept::Convertible< OutputPixelType, double >) OutputConvertibleToDoubleCheck |
|
| typedef (Concept::SameType< InputPixelType, OutputPixelType >) SameTypeCheck |
|
|
void | SetSourceImage (const InputImageType *source) |
|
const InputImageType * | GetSourceImage (void) |
|
|
virtual void | SetNumberOfHistogramLevels (SizeValueType _arg) |
|
virtual SizeValueType | GetNumberOfHistogramLevels () const |
|
|
virtual void | SetNumberOfMatchPoints (SizeValueType _arg) |
|
virtual SizeValueType | GetNumberOfMatchPoints () const |
|
|
virtual void | SetThresholdAtMeanIntensity (bool _arg) |
|
virtual bool | GetThresholdAtMeanIntensity () const |
|
virtual void | ThresholdAtMeanIntensityOn () |
|
virtual void | ThresholdAtMeanIntensityOff () |
|
|
virtual HistogramType * | GetModifiableSourceHistogram () |
|
virtual const HistogramType * | GetSourceHistogram () const |
|
virtual HistogramType * | GetModifiableReferenceHistogram () |
|
virtual const HistogramType * | GetReferenceHistogram () const |
|
virtual HistogramType * | GetModifiableOutputHistogram () |
|
virtual const HistogramType * | GetOutputHistogram () const |
|
const InputImageType * | GetInput () const |
|
const InputImageType * | GetInput (unsigned int idx) const |
|
virtual void | PopBackInput () override |
|
virtual void | PopFrontInput () override |
|
virtual void | PushBackInput (const InputImageType *image) |
|
virtual void | PushFrontInput (const InputImageType *image) |
|
virtual void | SetInput (const InputImageType *image) |
|
virtual void | SetInput (unsigned int, const TInputImage *image) |
|
virtual void | SetCoordinateTolerance (double _arg) |
|
virtual double | GetCoordinateTolerance () const |
|
virtual void | SetDirectionTolerance (double _arg) |
|
virtual double | GetDirectionTolerance () const |
|
OutputImageType * | GetOutput (unsigned int idx) |
|
virtual void | GraftNthOutput (unsigned int idx, DataObject *output) |
|
virtual void | GraftOutput (const DataObjectIdentifierType &key, DataObject *output) |
|
OutputImageType * | GetOutput () |
|
const OutputImageType * | GetOutput () const |
|
virtual void | GraftOutput (DataObject *output) |
|
virtual
ProcessObject::DataObjectPointer | MakeOutput (ProcessObject::DataObjectPointerArraySizeType idx) override |
|
virtual
ProcessObject::DataObjectPointer | MakeOutput (const ProcessObject::DataObjectIdentifierType &) override |
|
virtual void | AbortGenerateDataOff () |
|
virtual void | AbortGenerateDataOn () |
|
virtual void | EnlargeOutputRequestedRegion (DataObject *) |
|
virtual const bool & | GetAbortGenerateData () const |
|
DataObjectPointerArray | GetIndexedInputs () |
|
DataObjectPointerArray | GetIndexedOutputs () |
|
NameArray | GetInputNames () const |
|
DataObjectPointerArray | GetInputs () |
|
MultiThreader * | GetMultiThreader () const |
|
DataObjectPointerArraySizeType | GetNumberOfIndexedInputs () const |
|
DataObjectPointerArraySizeType | GetNumberOfIndexedOutputs () const |
|
DataObjectPointerArraySizeType | GetNumberOfInputs () const |
|
DataObjectPointerArraySizeType | GetNumberOfOutputs () const |
|
virtual
DataObjectPointerArraySizeType | GetNumberOfValidRequiredInputs () const |
|
NameArray | GetOutputNames () const |
|
DataObjectPointerArray | GetOutputs () |
|
virtual const float & | GetProgress () const |
|
NameArray | GetRequiredInputNames () const |
|
bool | HasInput (const DataObjectIdentifierType &key) const |
|
bool | HasOutput (const DataObjectIdentifierType &key) const |
|
virtual void | PrepareOutputs () |
|
virtual void | PropagateRequestedRegion (DataObject *output) |
|
virtual void | ResetPipeline () |
|
virtual void | SetAbortGenerateData (bool _arg) |
|
virtual void | Update () |
|
virtual void | UpdateLargestPossibleRegion () |
|
virtual void | UpdateOutputData (DataObject *output) |
|
virtual void | UpdateOutputInformation () |
|
void | UpdateProgress (float progress) |
|
void | SetProgress (float progress) |
|
virtual void | SetReleaseDataFlag (bool flag) |
|
virtual bool | GetReleaseDataFlag () const |
|
void | ReleaseDataFlagOn () |
|
void | ReleaseDataFlagOff () |
|
virtual void | SetReleaseDataBeforeUpdateFlag (bool _arg) |
|
virtual const bool & | GetReleaseDataBeforeUpdateFlag () const |
|
virtual void | ReleaseDataBeforeUpdateFlagOn () |
|
virtual void | ReleaseDataBeforeUpdateFlagOff () |
|
virtual void | SetNumberOfThreads (ThreadIdType _arg) |
|
virtual const ThreadIdType & | GetNumberOfThreads () const |
|
unsigned long | AddObserver (const EventObject &event, Command *) |
|
unsigned long | AddObserver (const EventObject &event, Command *) const |
|
virtual void | DebugOff () const |
|
virtual void | DebugOn () const |
|
Command * | GetCommand (unsigned long tag) |
|
bool | GetDebug () const |
|
MetaDataDictionary & | GetMetaDataDictionary () |
|
const MetaDataDictionary & | GetMetaDataDictionary () const |
|
virtual ModifiedTimeType | GetMTime () const |
|
virtual const TimeStamp & | GetTimeStamp () const |
|
bool | HasObserver (const EventObject &event) const |
|
void | InvokeEvent (const EventObject &) |
|
void | InvokeEvent (const EventObject &) const |
|
virtual void | Modified () const |
|
virtual void | Register () const override |
|
void | RemoveAllObservers () |
|
void | RemoveObserver (unsigned long tag) |
|
void | SetDebug (bool debugFlag) const |
|
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
|
virtual void | SetReferenceCount (int) override |
|
virtual void | UnRegister () const noexceptoverride |
|
virtual void | SetObjectName (std::string _arg) |
|
virtual const std::string & | GetObjectName () const |
|
virtual void | Delete () |
|
virtual int | GetReferenceCount () const |
|
| itkCloneMacro (Self) |
|
void | Print (std::ostream &os, Indent indent=0) const |
|
|
void | AfterThreadedGenerateData () override |
|
void | BeforeThreadedGenerateData () override |
|
void | ComputeMinMaxMean (const InputImageType *image, THistogramMeasurement &minValue, THistogramMeasurement &maxValue, THistogramMeasurement &meanValue) |
|
void | ConstructHistogram (const InputImageType *image, HistogramType *histogram, const THistogramMeasurement minValue, const THistogramMeasurement maxValue) |
|
| HistogramMatchingImageFilter () |
|
void | PrintSelf (std::ostream &os, Indent indent) const override |
|
void | ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override |
|
virtual void | VerifyInputInformation () override |
|
| ~HistogramMatchingImageFilter () |
|
virtual void | CallCopyInputRegionToOutputRegion (OutputImageRegionType &destRegion, const InputImageRegionType &srcRegion) |
|
virtual void | CallCopyOutputRegionToInputRegion (InputImageRegionType &destRegion, const OutputImageRegionType &srcRegion) |
|
| ImageToImageFilter () |
|
| ~ImageToImageFilter () |
|
void | PushBackInput (const DataObject *input) override |
|
void | PushFrontInput (const DataObject *input) override |
|
virtual void | AllocateOutputs () |
|
virtual void | GenerateData () override |
|
virtual const
ImageRegionSplitterBase * | GetImageRegionSplitter () const |
|
| ImageSource () |
|
virtual unsigned int | SplitRequestedRegion (unsigned int i, unsigned int pieces, OutputImageRegionType &splitRegion) |
|
virtual | ~ImageSource () |
|
virtual void | AddInput (DataObject *input) |
|
virtual void | AddOutput (DataObject *output) |
|
bool | AddRequiredInputName (const DataObjectIdentifierType &) |
|
bool | AddRequiredInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx) |
|
virtual void | CacheInputReleaseDataFlags () |
|
virtual void | GenerateOutputInformation () |
|
virtual void | GenerateOutputRequestedRegion (DataObject *output) |
|
DataObject * | GetInput (const DataObjectIdentifierType &key) |
|
const DataObject * | GetInput (const DataObjectIdentifierType &key) const |
|
virtual const
DataObjectPointerArraySizeType & | GetNumberOfRequiredInputs () const |
|
virtual const
DataObjectPointerArraySizeType & | GetNumberOfRequiredOutputs () const |
|
bool | IsIndexedInputName (const DataObjectIdentifierType &) const |
|
bool | IsIndexedOutputName (const DataObjectIdentifierType &) const |
|
bool | IsRequiredInputName (const DataObjectIdentifierType &) const |
|
| itkLegacyMacro (virtual void RemoveOutput(DataObject *output)) |
|
| itkLegacyMacro (void SetNumberOfOutputs(DataObjectPointerArraySizeType num)) |
|
| itkLegacyMacro (virtual void RemoveInput(DataObject *input)) |
|
| itkLegacyMacro (void SetNumberOfInputs(DataObjectPointerArraySizeType num)) |
|
DataObjectPointerArraySizeType | MakeIndexFromInputName (const DataObjectIdentifierType &name) const |
|
DataObjectPointerArraySizeType | MakeIndexFromOutputName (const DataObjectIdentifierType &name) const |
|
DataObjectIdentifierType | MakeNameFromInputIndex (DataObjectPointerArraySizeType idx) const |
|
DataObjectIdentifierType | MakeNameFromOutputIndex (DataObjectPointerArraySizeType idx) const |
|
| ProcessObject () |
|
virtual void | PropagateResetPipeline () |
|
virtual void | ReleaseInputs () |
|
virtual void | RemoveInput (const DataObjectIdentifierType &key) |
|
virtual void | RemoveInput (DataObjectPointerArraySizeType) |
|
virtual void | RemoveOutput (const DataObjectIdentifierType &key) |
|
virtual void | RemoveOutput (DataObjectPointerArraySizeType idx) |
|
bool | RemoveRequiredInputName (const DataObjectIdentifierType &) |
|
virtual void | RestoreInputReleaseDataFlags () |
|
virtual void | SetInput (const DataObjectIdentifierType &key, DataObject *input) |
|
virtual void | SetNthInput (DataObjectPointerArraySizeType num, DataObject *input) |
|
virtual void | SetNthOutput (DataObjectPointerArraySizeType num, DataObject *output) |
|
void | SetNumberOfIndexedInputs (DataObjectPointerArraySizeType num) |
|
void | SetNumberOfIndexedOutputs (DataObjectPointerArraySizeType num) |
|
virtual void | SetNumberOfRequiredInputs (DataObjectPointerArraySizeType) |
|
virtual void | SetNumberOfRequiredOutputs (DataObjectPointerArraySizeType _arg) |
|
virtual void | SetOutput (const DataObjectIdentifierType &key, DataObject *output) |
|
virtual void | SetPrimaryInput (DataObject *input) |
|
virtual void | SetPrimaryOutput (DataObject *output) |
|
void | SetRequiredInputNames (const NameArray &) |
|
virtual void | VerifyPreconditions () |
|
| ~ProcessObject () |
|
DataObject * | GetInput (DataObjectPointerArraySizeType idx) |
|
const DataObject * | GetInput (DataObjectPointerArraySizeType idx) const |
|
DataObject * | GetPrimaryInput () |
|
const DataObject * | GetPrimaryInput () const |
|
virtual void | SetPrimaryInputName (const DataObjectIdentifierType &key) |
|
virtual const char * | GetPrimaryInputName (void) const |
|
DataObject * | GetOutput (const DataObjectIdentifierType &key) |
|
const DataObject * | GetOutput (const DataObjectIdentifierType &key) const |
|
virtual void | SetPrimaryOutputName (const DataObjectIdentifierType &key) |
|
virtual const char * | GetPrimaryOutputName (void) const |
|
DataObject * | GetOutput (DataObjectPointerArraySizeType idx) |
|
const DataObject * | GetOutput (DataObjectPointerArraySizeType idx) const |
|
DataObject * | GetPrimaryOutput () |
|
const DataObject * | GetPrimaryOutput () const |
|
| Object () |
|
bool | PrintObservers (std::ostream &os, Indent indent) const |
|
virtual void | SetTimeStamp (const TimeStamp &time) |
|
virtual | ~Object () |
|
virtual LightObject::Pointer | InternalClone () const |
|
| LightObject () |
|
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
|
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
|
virtual | ~LightObject () |
|
template<typename TInputImage , typename TOutputImage , typename THistogramMeasurement = typename TInputImage::PixelType>