Class AbstractRankMorphology

All Implemented Interfaces:
Cloneable, ArrayProcessor, ArrayProcessorWithContextSwitching, Morphology, RankMorphology
Direct Known Subclasses:
BasicRankMorphology

public abstract class AbstractRankMorphology extends AbstractMorphology implements RankMorphology

A skeletal implementation of the RankMorphology interface to minimize the effort required to implement this interface.

This class extends AbstractMorphology and inherits from it all implementations of Morphology methods, excepting dilationOrErosion, which is declared here as abstract.

Among methods of RankMorphology interface, this class implements the 2nd method from each triplet: 1) asOperation, 2) operation, creating new matrix and 3) operation, storing result in the 1st dest argument. Every 2nd method from such a triplet is implemented via the 3rd one: it creates the necessary resulting updatable matrix and pass it as dest argument to the 3rd method. See more details in comments to the methods of this class.

In addition, this class fully implements all 3 methods asMean, mean (creating new matrix) and mean (storing result in dest argument) via the corresponding asFunctionOfSum and functionOfSum methods. Also this class fully implements the methods which get the percentile indexes in a form of double parameters: these methods are implemented via the analogous methods getting the percentile indexes in Matrix parameters.

Besides implementing methods of RankMorphology, this class declares constantPercentileMatrix(Matrix, double) method, convenient for implementing methods which get the percentile indexes in a form of double parameters.

Author:
Daniel Alievsky