TVecSmallInt.Median Method

Overload List

#SignatureDescription
1TVecInt Median(TMtxVecInt Src, Int32 MaskSize)Applies median filter with size Mask to data in Src and stores the result in the calling vector.
└ indexed: TMtxVecInt Median(TMtxVecInt Src, Int32 MaskSize, Int32 SrcIndex, Int32 Index, Int32 Len)
2TVecInt Median(Int32 MaskSize)Applies median filter with size Mask to the calling vector.
└ indexed: TMtxVecInt Median(Int32 MaskSize, Int32 Index, Int32 Len)
3Int32 MedianMedian.
└ indexed: Int32 Median(Int32 Index, Int32 Len)

Overload 1: TVecInt Median(TMtxVecInt Src, Int32 MaskSize)

Applies median filter with size Mask to data in Src and stores the result in the calling vector.

#NameTypeDescription
1SrcTMtxVecIntsource TVecInt or TMtxInt
2MaskSizeInt32

Result: stored in self (calling object), returns self for chaining

Remarks:

Median filter is a nonlinear filter which replaces each element of the calling vector with the median value, calculated over the fixed range (mask) centered around that element and stores the result in the calling vector.

Indexed: TMtxVecInt Median(TMtxVecInt Src, Int32 MaskSize, Int32 SrcIndex, Int32 Index, Int32 Len)

Applies median filter with size Mask to Src object elements [SrcIndex..SrcIndex+Len-1] and stores the result in the calling vector elements [Index..Index+Len-1].

#NameTypeDescription
1SrcTMtxVecIntsource TVecInt or TMtxInt
2MaskSizeInt32
3SrcIndexInt32source start index
4IndexInt32start index
5LenInt32element count

Result: stored in self (calling object), returns self for chaining

Remarks:

Median filter is a nonlinear filter which replaces each element of the Src vector with the median value, calculated over the fixed range (mask) centered around that element and stores the result in the calling vector.

Overload 2: TVecInt Median(Int32 MaskSize)

Applies median filter with size Mask to the calling vector.

#NameTypeDescription
1MaskSizeInt32

Result: stored in self (calling object), returns self for chaining

Remarks:

Median filter is a nonlinear filter which replaces each element of the calling vector with the median value, calculated over the fixed range (mask) centered around that element.

Indexed: TMtxVecInt Median(Int32 MaskSize, Int32 Index, Int32 Len)

Applies median filter with size Mask to the calling vector elements [Index.. Index+Len-1].

#NameTypeDescription
1MaskSizeInt32
2IndexInt32start index
3LenInt32element count

Result: stored in self (calling object), returns self for chaining

Remarks:

Median filter is a nonlinear filter which replaces each element of the calling vector with the median value, calculated over the fixed range (mask) centered around that element.

Overload 3: Int32 Median

Median.

Returns: Int32

Remarks:

Calculate median value for all calling object elements.

Examples
Matrix a;
double c;
a.SetIt(1,4,false,new double[] {1,2,3,4});
c = a.Median;

Indexed: Int32 Median(Int32 Index, Int32 Len)

Calculate median value for calling vector elements [Index]..[Index+Len-1].

#NameTypeDescription
1IndexInt32start index
2LenInt32element count

Returns: Int32

Remarks:

An exception is raised if Dew.Math.TMtxVecBase.ConditionCheck is true and array borders are overrun.