public class RankProcessors
extends java.lang.Object
A set of streaming aperture processors
,
implementing all operations, specified in RankMorphology
interface.
This class cannot be instantiated.
Modifier and Type  Method and Description 

static StreamingApertureProcessor 
getAveragerBetweenPercentiles(ArrayContext context,
double filler,
boolean interpolated,
int... bitLevels)
Creates a new streaming aperture processor, which finds the mean between 2 percentiles
of the source matrix M.

static StreamingApertureProcessor 
getAveragerBetweenValues(ArrayContext context,
double filler,
boolean interpolated,
int... bitLevels)
Creates a new streaming aperture processor, which finds the mean between 2 values
of the source matrix M.

static StreamingApertureProcessor 
getPercentilePairProcessor(ArrayContext context,
Func processingFunc,
boolean interpolated,
int... bitLevels)
Creates a new streaming aperture processor, which finds the result of some given function

static StreamingApertureProcessor 
getPercentiler(ArrayContext context,
boolean interpolated,
int... bitLevels)
Creates a new streaming aperture processor, which finds the percentile of the source matrix M.

static StreamingApertureProcessor 
getRanker(ArrayContext context,
boolean interpolated,
int... bitLevels)
Creates a new streaming aperture processor, which finds the rank of the source matrix M.

static StreamingApertureProcessor 
getSummator(ArrayContext context,
Func processingFunc)
Creates a new streaming aperture processor, which finds the result of some given function

public static StreamingApertureProcessor getPercentiler(ArrayContext context, boolean interpolated, int... bitLevels)
comments to RankMorphology
, section 4 about the "percentile" term.
The real index r of the percentile for every element of the result is equal
to the corresponding element of the additional matrix M_{0}.
More precisely, let rm is an instance of BasicRankMorphology
, created by the call
rm = BasicRankMorphology.getInstance(ArrayContext context, double dilationLevel, CustomRankPrecision precision)
,
so that context, precision.interpolated()
and
precision.bitLevels()
are the same as the arguments
of this method. Then in the streaming aperture processor, created by this method:
asProcessed
method is equivalent to
asPercentile
(M, M_{0}, P)asProcessed
method is equal to
M.type()
==R.type()
;type()
, it is equivalent to
Matrices.asFuncMatrix
(true, Func.IDENTITY
, requiredType, R)process
method is equivalent to
percentile
(R, M, M_{0}, P)This processor is really created and called in the implementation of
asPercentile
and percentile
methods in BasicRankMorphology
class.
context
 the context
that will be used by this object;
may be null, then it will be ignored.interpolated
 the histogram model used while calculating percentile: true means
the precise histogram model, false means the simple histogram model
(see comments to Histogram
class).bitLevels
 the bit levels
used while calculations.java.lang.NullPointerException
 if bitLevels argument is null.java.lang.IllegalArgumentException
 if bitLevels.length==0, or if bitLevels.length>31,
or if some of elements bitLevels is not in 1..30 range, or if
public static StreamingApertureProcessor getRanker(ArrayContext context, boolean interpolated, int... bitLevels)
comments to RankMorphology
, section 4 about the "rank" term.
The real value v for every element of the result is equal
to the corresponding element of the additional matrix M_{0}.
More precisely, let rm is an instance of BasicRankMorphology
, created by the call
rm = BasicRankMorphology.getInstance(ArrayContext context, double dilationLevel, CustomRankPrecision precision)
,
so that context, precision.interpolated()
and
precision.bitLevels()
are the same as the arguments
of this method. Then in the streaming aperture processor, created by this method:
asProcessed
method is equivalent to
asRank
(requiredType, M, M_{0}, P)asProcessed
method;process
method is equivalent to
rank
(R, M, M_{0}, P)This processor is really created and called in the implementation of
asRank
and rank
methods in BasicRankMorphology
class.
context
 the context
that will be used by this object;
may be null, then it will be ignored.interpolated
 the histogram model used while calculating percentile: true means
the precise histogram model, false means the simple histogram model
(see comments to Histogram
class).bitLevels
 the bit levels
used while calculations.java.lang.NullPointerException
 if bitLevels argument is null.java.lang.IllegalArgumentException
 if bitLevels.length==0, or if bitLevels.length>31,
or if some of elements bitLevels is not in 1..30 range, or if
public static StreamingApertureProcessor getAveragerBetweenPercentiles(ArrayContext context, double filler, boolean interpolated, int... bitLevels)
comments to RankMorphology
, section 4 about the
"mean between 2 percentiles" term.
The real indexes r_{1} and r_{2} of the percentiles
for every element of the result are equal
to the corresponding elements of the additional matrices M_{0} and M_{1}.
More precisely, let rm is an instance of BasicRankMorphology
, created by the call
rm = BasicRankMorphology.getInstance(ArrayContext context, double dilationLevel, CustomRankPrecision precision)
,
so that context, precision.interpolated()
and
precision.bitLevels()
are the same as the arguments
of this method. Then in the streaming aperture processor, created by this method:
asProcessed
method is equivalent to
asMeanBetweenPercentiles
(M, M_{0}, M_{1}, P,
filler)asProcessed
method is equal to
M.type()
==R.type()
;type()
, it analogously calculates
the mean between percentile with maximal (double) precision and then
casts the floatingpoint results to the desired element type by the same rules
as Arrays.asFuncArray(boolean, Func, Class, PArray...)
method with the argument truncateOverflows=true;
note that such result cannot be obtained by RankMorphology
methods;process
method is equivalent to
meanBetweenPercentiles
(R, M, M_{0}, M_{1}, P,
filler)This processor is really created and called in the implementation of
asMeanBetweenPercentiles
and meanBetweenPercentiles
methods in BasicRankMorphology
class.
context
 the context
that will be used by this object;
may be null, then it will be ignored.filler
 the reserved value, returned when
interpolated
 the histogram model used while calculating percentile: true means
the precise histogram model, false means the simple histogram model
(see comments to Histogram
class).bitLevels
 the bit levels
used while calculations.java.lang.NullPointerException
 if bitLevels argument is null.java.lang.IllegalArgumentException
 if bitLevels.length==0, or if bitLevels.length>31,
or if some of elements bitLevels is not in 1..30 range, or if
public static StreamingApertureProcessor getAveragerBetweenValues(ArrayContext context, double filler, boolean interpolated, int... bitLevels)
comments to RankMorphology
, section 4 about the
"mean between 2 values" term.
The real numbers v_{1} and v_{2}
for every element of the result are equal
to the corresponding elements of the additional matrices M_{0} and M_{1}.
More precisely, let rm is an instance of BasicRankMorphology
, created by the call
rm = BasicRankMorphology.getInstance(ArrayContext context, double dilationLevel, CustomRankPrecision precision)
,
so that context, precision.interpolated()
and
precision.bitLevels()
are the same as the arguments
of this method. Then in the streaming aperture processor, created by this method:
asProcessed
method is equivalent to
asMeanBetweenValues
(M, M_{0}, M_{1}, P,
filler)asProcessed
method is equal to
M.type()
==R.type()
;type()
, it analogously calculates
the mean between values with maximal (double) precision and then
casts the floatingpoint results to the desired element type by the same rules
as Arrays.asFuncArray(boolean, Func, Class, PArray...)
method with the argument truncateOverflows=true;
note that such result cannot be obtained by RankMorphology
methods;process
method is equivalent to
meanBetweenValues
(R, M, M_{0}, M_{1}, P,
filler)This processor is really created and called in the implementation of
asMeanBetweenValues
and meanBetweenValues
methods in BasicRankMorphology
class.
context
 the context
that will be used by this object;
may be null, then it will be ignored.filler
 the reserved value, returned when
r(v_{1}*σ)≥r(v_{2}*σ),
or one of the special keys RankMorphology.FILL_MIN_VALUE
,
RankMorphology.FILL_MAX_VALUE
, RankMorphology.FILL_NEAREST_VALUE
,
which mean using of special calculation modes B, C, D.interpolated
 the histogram model used while calculating percentile: true means
the precise histogram model, false means the simple histogram model
(see comments to Histogram
class).bitLevels
 the bit levels
used while calculations.java.lang.NullPointerException
 if bitLevels argument is null.java.lang.IllegalArgumentException
 if bitLevels.length==0, or if bitLevels.length>31,
or if some of elements bitLevels is not in 1..30 range, or if
public static StreamingApertureProcessor getSummator(ArrayContext context, Func processingFunc)
comments to RankMorphology
, section 4 about the
"aperture sum" term.
More precisely, let rm is an instance of BasicRankMorphology
, created by the call
rm = BasicRankMorphology.getInstance(ArrayContext context, double dilationLevel, CustomRankPrecision precision)
,
so that context is the same as the argument of this method and other argument are any (they do not affect calculating the aperture sum). Then in the streaming aperture processor, created by this method:
asProcessed
method is equivalent to
asFunctionOfSum
(M, P, processingFunc)asProcessed
method is equal to
M.type()
==R.type()
;type()
, it analogously calculates
the function Arrays.asFuncArray(boolean, Func, Class, PArray...)
method with the argument truncateOverflows=true;
note that such result cannot be obtained by RankMorphology
methods;process
method is equivalent to
functionOfSum
(R, M, P, processingFunc)This processor is really created and called in the implementation of
asFunctionOfSum
and functionOfSum
methods in BasicRankMorphology
class.
context
 the context
that will be used by this object;
may be null, then it will be ignored.processingFunc
 the function, which should be applied to every calculated aperture sum.java.lang.NullPointerException
 if bitLevels argument is null.java.lang.IllegalArgumentException
 if bitLevels.length==0, or if bitLevels.length>31,
or if some of elements bitLevels is not in 1..30 range, or if
public static StreamingApertureProcessor getPercentilePairProcessor(ArrayContext context, Func processingFunc, boolean interpolated, int... bitLevels)
comments to RankMorphology
, section 4 about the "percentile" term.
The real indexes r of two percentiles for every element of the result are equal
to the corresponding elements of the additional matrices M_{1} and M_{2}.
More precisely, let rm is an instance of BasicRankMorphology
, created by the call
rm = BasicRankMorphology.getInstance(ArrayContext context, double dilationLevel, CustomRankPrecision precision)
,
so that context, precision.interpolated()
and
precision.bitLevels()
are the same as the arguments
of this method. Then in the streaming aperture processor, created by this method:
asProcessed
method is equivalent to
asFunctionOfPercentilePair
(M, M_{1}, M_{2}, P,
processingFunc)asProcessed
method is equal to
M.type()
==R.type()
;type()
, it analogously calculates
the function Arrays.asFuncArray(boolean, Func, Class, PArray...)
method with the argument truncateOverflows=true;process
method is equivalent to
functionOfPercentilePair
(R, M, M_{1}, M_{2}, P,
processingFunc)Note that this processor, unlike RankMorphology.asFunctionOfPercentilePair
and RankMorphology.functionOfPercentilePair
methods, allows to use any matrix M_{0} as the source of first arguments of the function
This processor is really created and called in the implementation of
asFunctionOfPercentilePair
and functionOfPercentilePair
methods in BasicRankMorphology
class. Those methods pass the same src matrix to this
processor twice: as the main source matrix M and as the first additional matrix M_{0}.
context
 the context
that will be used by this object;
may be null, then it will be ignored.processingFunc
 the function, which should be applied to every three
interpolated
 the histogram model used while calculating percentiles: true means
the precise histogram model, false means the simple histogram model
(see comments to Histogram
class).bitLevels
 the bit levels
used while calculations.java.lang.NullPointerException
 if bitLevels argument is null.java.lang.IllegalArgumentException
 if bitLevels.length==0, or if bitLevels.length>31,
or if some of elements bitLevels is not in 1..30 range, or if