template<typename TInputImage, typename TOutputImage, typename TKernel = FlatStructuringElement<TInputImage::ImageDimension>>
class itk::RankImageFilter< TInputImage, TOutputImage, TKernel >
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 1979, 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
- See also
- MedianImageFilter
- Author
- Richard Beare
Definition at line 70 of file itkRankImageFilter.h.
|
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 = RankImageFilter |
|
using | SizeType = typename TInputImage::SizeType |
|
using | Superclass = MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, Function::RankHistogram< typename TInputImage::PixelType > > |
|
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 = MovingHistogramImageFilter |
|
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 | 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 |
|
|
void | ConfigureHistogram (HistogramType &histogram) override |
|
void | PrintSelf (std::ostream &os, Indent indent) const override |
|
| RankImageFilter () |
|
| ~RankImageFilter () override=default |
|
void | DynamicThreadedGenerateData (const OutputImageRegionType &outputRegionForThread) override |
|
| MovingHistogramImageFilter () |
|
void | PushHistogram (HistogramType &histogram, const OffsetListType *addedList, const OffsetListType *removedList, const RegionType &inputRegion, const RegionType &kernRegion, const InputImageType *inputImage, const IndexType currentIdx) |
|
| ~MovingHistogramImageFilter () override=default |
|
void | GetDirAndOffset (const IndexType LineStart, const IndexType PrevLineStart, OffsetType &LineOffset, OffsetType &Changes, int &LineDirection) |
|
| MovingHistogramImageFilterBase () |
|
| ~MovingHistogramImageFilterBase () override=default |
|
| KernelImageFilter () |
|
| ~KernelImageFilter () override=default |
|
| BoxImageFilter () |
|
void | GenerateInputRequestedRegion () override |
|
| ~BoxImageFilter () override=default |
|
virtual void | CallCopyInputRegionToOutputRegion (OutputImageRegionType &destRegion, const InputImageRegionType &srcRegion) |
|
virtual void | CallCopyOutputRegionToInputRegion (InputImageRegionType &destRegion, const OutputImageRegionType &srcRegion) |
|
| ImageToImageFilter () |
|
void | VerifyInputInformation () const override |
|
| ~ImageToImageFilter () override=default |
|
virtual void | PushBackInput (const DataObject *input) |
|
virtual void | PushFrontInput (const DataObject *input) |
|
virtual void | AfterThreadedGenerateData () |
|
virtual void | AllocateOutputs () |
|
virtual void | BeforeThreadedGenerateData () |
|
void | ClassicMultiThread (ThreadFunctionType callbackFunction) |
|
void | GenerateData () override |
|
virtual const ImageRegionSplitterBase * | GetImageRegionSplitter () const |
|
| ImageSource () |
|
virtual unsigned int | SplitRequestedRegion (unsigned int i, unsigned int pieces, OutputImageRegionType &splitRegion) |
|
| ~ImageSource () override=default |
|
virtual void | ThreadedGenerateData (const OutputImageRegionType ®ion, ThreadIdType threadId) |
|
virtual bool | GetDynamicMultiThreading () const |
|
virtual void | SetDynamicMultiThreading (bool _arg) |
|
virtual void | DynamicMultiThreadingOn () |
|
virtual void | AddInput (DataObject *input) |
|
void | AddOptionalInputName (const DataObjectIdentifierType &) |
|
void | AddOptionalInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx) |
|
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 |
|
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 | PushBackInput (const DataObject *input) |
|
virtual void | PushFrontInput (const DataObject *input) |
|
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 idx, DataObject *input) |
|
virtual void | SetNthOutput (DataObjectPointerArraySizeType idx, DataObject *output) |
|
void | SetNumberOfIndexedInputs (DataObjectPointerArraySizeType num) |
|
void | SetNumberOfIndexedOutputs (DataObjectPointerArraySizeType num) |
|
virtual void | SetNumberOfRequiredInputs (DataObjectPointerArraySizeType) |
|
virtual void | SetNumberOfRequiredOutputs (DataObjectPointerArraySizeType _arg) |
|
virtual void | SetOutput (const DataObjectIdentifierType &name, DataObject *output) |
|
virtual void | SetPrimaryInput (DataObject *object) |
|
virtual void | SetPrimaryOutput (DataObject *object) |
|
void | SetRequiredInputNames (const NameArray &) |
|
virtual void | VerifyPreconditions () const |
|
| ~ProcessObject () override |
|
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 () const |
|
DataObject * | GetOutput (const DataObjectIdentifierType &key) |
|
const DataObject * | GetOutput (const DataObjectIdentifierType &key) const |
|
virtual void | SetPrimaryOutputName (const DataObjectIdentifierType &key) |
|
virtual const char * | GetPrimaryOutputName () const |
|
DataObject * | GetOutput (DataObjectPointerArraySizeType i) |
|
const DataObject * | GetOutput (DataObjectPointerArraySizeType i) const |
|
DataObject * | GetPrimaryOutput () |
|
const DataObject * | GetPrimaryOutput () const |
|
virtual bool | GetThreaderUpdateProgress () const |
|
virtual void | ThreaderUpdateProgressOn () |
|
virtual void | SetThreaderUpdateProgress (bool arg) |
|
| Object () |
|
bool | PrintObservers (std::ostream &os, Indent indent) const |
|
virtual void | SetTimeStamp (const TimeStamp &timeStamp) |
|
| ~Object () override |
|
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 () |
|