#include <itkMaskedRankImageFilter.h>
Rank filter of a greyscale image.
Nonlinear filter in which each output pixel is a user defined rank of input pixels in a user defined neighborhood. The default rank is 0.5 (median). The boundary conditions are different to the standard itkMedianImageFilter. In this filter the neighborhood is cropped at the boundary, and is therefore smaller.
This filter uses a recursive implementation - essentially the one by Huang [52], I believe, to compute the rank, and is therefore usually a lot faster than the direct implementation. The extensions to Huang are support for arbitrary pixel types (using c++ maps) and arbitrary neighborhoods. I presume that these are not new ideas.
This filter is based on the sliding window code from the consolidatedMorphology package on InsightJournal.
The structuring element is assumed to be composed of binary values (zero or one). Only elements of the structuring element having values > 0 are candidates for affecting the center pixel.
This code was contributed in the Insight Journal paper: "Efficient implementation of kernel filtering" by Beare R., Lehmann G https://doi.org/10.54294/igq8fn
Definition at line 67 of file itkMaskedRankImageFilter.h.
Public Types | |
using | ConstPointer = SmartPointer<const Self> |
using | IndexType = typename TInputImage::IndexType |
using | InputImageType = TInputImage |
using | InputPixelType = typename TInputImage::PixelType |
using | KernelIteratorType = typename KernelType::ConstIterator |
using | KernelType = TKernel |
using | OffsetType = typename TInputImage::OffsetType |
using | OutputImageType = TOutputImage |
using | OutputPixelType = typename TOutputImage::PixelType |
using | PixelType = typename TInputImage::PixelType |
using | Pointer = SmartPointer<Self> |
using | RadiusType = typename KernelType::SizeType |
using | RegionType = typename TInputImage::RegionType |
using | Self = MaskedRankImageFilter |
using | SizeType = typename TInputImage::SizeType |
using | Superclass |
![]() | |
using | ConstPointer = SmartPointer<const Self> |
using | DataObjectPointerArraySizeType = ProcessObject::DataObjectPointerArraySizeType |
using | HistogramType = THistogram |
using | IndexType = typename TInputImage::IndexType |
using | InputImageType = TInputImage |
using | InputPixelType = typename TInputImage::PixelType |
using | KernelIteratorType = typename KernelType::ConstIterator |
using | KernelType = TKernel |
using | MaskImageType = TMaskImage |
using | MaskPixelType = typename MaskImageType::PixelType |
using | OffsetListType = typename std::list<OffsetType> |
using | OffsetMapType = typename std::map<OffsetType, OffsetListType, Functor::LexicographicCompare> |
using | OffsetType = typename TInputImage::OffsetType |
using | OutputImageType = TOutputImage |
using | OutputPixelType = typename TOutputImage::PixelType |
using | PixelType = typename TInputImage::PixelType |
using | Pointer = SmartPointer<Self> |
using | RadiusType = typename KernelType::SizeType |
using | RegionType = typename TInputImage::RegionType |
using | Self = MaskedMovingHistogramImageFilter |
using | SizeType = typename TInputImage::SizeType |
using | Superclass = MovingHistogramImageFilterBase<TInputImage, TOutputImage, TKernel> |
![]() | |
using | ConstPointer = SmartPointer<const Self> |
using | IndexType = typename TInputImage::IndexType |
using | InputImageType = TInputImage |
using | KernelIteratorType = typename KernelType::ConstIterator |
using | KernelType = TKernel |
using | OffsetListType = typename std::list<OffsetType> |
using | OffsetMapType = typename std::map<OffsetType, OffsetListType, Functor::LexicographicCompare> |
using | OffsetType = typename TInputImage::OffsetType |
using | OutputImageType = TOutputImage |
using | OutputPixelType = typename TOutputImage::PixelType |
using | PixelType = typename TInputImage::PixelType |
using | Pointer = SmartPointer<Self> |
using | RadiusType = typename KernelType::SizeType |
using | RegionType = typename TInputImage::RegionType |
using | Self = MovingHistogramImageFilterBase |
using | SizeType = typename TInputImage::SizeType |
using | Superclass = KernelImageFilter<TInputImage, TOutputImage, TKernel> |
![]() | |
using | ConstPointer = SmartPointer<const Self> |
using | FlatKernelType = FlatStructuringElement<(Self::ImageDimension)> |
using | IndexType = typename TInputImage::IndexType |
using | InputImageType = TInputImage |
using | InputPixelType = typename TInputImage::PixelType |
using | KernelType = TKernel |
using | OffsetType = typename TInputImage::OffsetType |
using | OutputImageType = TOutputImage |
using | OutputPixelType = typename TOutputImage::PixelType |
using | Pointer = SmartPointer<Self> |
using | RadiusType = typename TInputImage::SizeType |
using | RegionType = typename TInputImage::RegionType |
using | Self = KernelImageFilter |
using | SizeType = typename TInputImage::SizeType |
using | Superclass = BoxImageFilter<TInputImage, TOutputImage> |
![]() | |
using | ConstPointer = SmartPointer<const Self> |
using | IndexType = typename TInputImage::IndexType |
using | InputImageType = TInputImage |
using | InputPixelType = typename TInputImage::PixelType |
using | OffsetType = typename TInputImage::OffsetType |
using | OutputImageType = TOutputImage |
using | OutputPixelType = typename TOutputImage::PixelType |
using | Pointer = SmartPointer<Self> |
using | RadiusType = typename TInputImage::SizeType |
using | RadiusValueType = typename TInputImage::SizeValueType |
using | RegionType = typename TInputImage::RegionType |
using | Self = BoxImageFilter |
using | SizeType = typename TInputImage::SizeType |
using | Superclass = ImageToImageFilter<TInputImage, TOutputImage> |
![]() | |
using | ConstPointer = SmartPointer<const Self> |
using | InputImageConstPointer = typename InputImageType::ConstPointer |
using | InputImagePixelType = typename InputImageType::PixelType |
using | InputImagePointer = typename InputImageType::Pointer |
using | InputImageRegionType = typename InputImageType::RegionType |
using | InputImageType = TInputImage |
using | OutputImagePixelType |
using | OutputImageRegionType |
using | Pointer = SmartPointer<Self> |
using | Self = ImageToImageFilter |
using | Superclass = ImageSource<TOutputImage> |
![]() | |
using | ConstPointer = SmartPointer<const Self> |
using | DataObjectIdentifierType = Superclass::DataObjectIdentifierType |
using | DataObjectPointer = DataObject::Pointer |
using | DataObjectPointerArraySizeType = Superclass::DataObjectPointerArraySizeType |
using | OutputImagePixelType = typename OutputImageType::PixelType |
using | OutputImagePointer = typename OutputImageType::Pointer |
using | OutputImageRegionType = typename OutputImageType::RegionType |
using | OutputImageType = TOutputImage |
using | Pointer = SmartPointer<Self> |
using | Self = ImageSource |
using | Superclass = ProcessObject |
![]() | |
using | ConstPointer = SmartPointer<const Self> |
using | DataObjectIdentifierType = DataObject::DataObjectIdentifierType |
using | DataObjectPointer = DataObject::Pointer |
using | DataObjectPointerArray = std::vector<DataObjectPointer> |
using | DataObjectPointerArraySizeType = DataObjectPointerArray::size_type |
using | MultiThreaderType = MultiThreaderBase |
using | NameArray = std::vector<DataObjectIdentifierType> |
using | Pointer = SmartPointer<Self> |
using | Self = ProcessObject |
using | Superclass = Object |
![]() | |
using | ConstPointer = SmartPointer<const Self> |
using | Pointer = SmartPointer<Self> |
using | Self = Object |
using | Superclass = LightObject |
![]() | |
using | ConstPointer = SmartPointer<const Self> |
using | Pointer = SmartPointer<Self> |
using | Self = LightObject |
Static Public Attributes | |
static constexpr unsigned int | ImageDimension = TInputImage::ImageDimension |
![]() | |
static constexpr unsigned int | ImageDimension = TInputImage::ImageDimension |
![]() | |
static constexpr unsigned int | ImageDimension = TInputImage::ImageDimension |
![]() | |
static constexpr unsigned int | ImageDimension = TInputImage::ImageDimension |
![]() | |
static constexpr unsigned int | ImageDimension = TInputImage::ImageDimension |
![]() | |
static constexpr unsigned int | InputImageDimension = TInputImage::ImageDimension |
static constexpr unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
![]() | |
static constexpr unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
Private Attributes | |
float | m_Rank {} |
using itk::MaskedRankImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel >::ConstPointer = SmartPointer<const Self> |
Definition at line 86 of file itkMaskedRankImageFilter.h.
using itk::MaskedRankImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel >::IndexType = typename TInputImage::IndexType |
Definition at line 99 of file itkMaskedRankImageFilter.h.
using itk::MaskedRankImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel >::InputImageType = TInputImage |
Image related type alias.
Definition at line 95 of file itkMaskedRankImageFilter.h.
using itk::MaskedRankImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel >::InputPixelType = typename TInputImage::PixelType |
Definition at line 104 of file itkMaskedRankImageFilter.h.
using itk::MaskedRankImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel >::KernelIteratorType = typename KernelType::ConstIterator |
Kernel (structuring element) iterator.
Definition at line 115 of file itkMaskedRankImageFilter.h.
using itk::MaskedRankImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel >::KernelType = TKernel |
Kernel type alias.
Definition at line 112 of file itkMaskedRankImageFilter.h.
using itk::MaskedRankImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel >::OffsetType = typename TInputImage::OffsetType |
Definition at line 101 of file itkMaskedRankImageFilter.h.
using itk::MaskedRankImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel >::OutputImageType = TOutputImage |
Definition at line 96 of file itkMaskedRankImageFilter.h.
using itk::MaskedRankImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel >::OutputPixelType = typename TOutputImage::PixelType |
Definition at line 103 of file itkMaskedRankImageFilter.h.
using itk::MaskedRankImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel >::PixelType = typename TInputImage::PixelType |
Definition at line 100 of file itkMaskedRankImageFilter.h.
using itk::MaskedRankImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel >::Pointer = SmartPointer<Self> |
Definition at line 85 of file itkMaskedRankImageFilter.h.
using itk::MaskedRankImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel >::RadiusType = typename KernelType::SizeType |
n-dimensional Kernel radius.
Definition at line 118 of file itkMaskedRankImageFilter.h.
using itk::MaskedRankImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel >::RegionType = typename TInputImage::RegionType |
Definition at line 97 of file itkMaskedRankImageFilter.h.
using itk::MaskedRankImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel >::Self = MaskedRankImageFilter |
Standard class type aliases.
Definition at line 78 of file itkMaskedRankImageFilter.h.
using itk::MaskedRankImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel >::SizeType = typename TInputImage::SizeType |
Definition at line 98 of file itkMaskedRankImageFilter.h.
using itk::MaskedRankImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel >::Superclass |
Definition at line 79 of file itkMaskedRankImageFilter.h.
|
protected |
Referenced by GetNameOfClass().
|
overrideprotecteddefault |
|
overrideprotectedvirtual |
ConfigureHistogram can be used to configure the histogram. The default version just does nothing.
Reimplemented from itk::MaskedMovingHistogramImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel, THistogram >.
|
virtual |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::MaskedMovingHistogramImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel, THistogram >.
|
overridevirtual |
Reimplemented from itk::MaskedMovingHistogramImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel, THistogram >.
References MaskedRankImageFilter().
|
virtual |
|
inline |
Definition at line 124 of file itkMaskedRankImageFilter.h.
|
static |
Standard New method.
|
overrideprotectedvirtual |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from itk::MaskedMovingHistogramImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel, THistogram >.
|
virtual |
|
staticconstexpr |
Image related type alias.
Definition at line 109 of file itkMaskedRankImageFilter.h.
|
private |
Definition at line 140 of file itkMaskedRankImageFilter.h.