C# Class Pinta.ImageManipulation.Histogram

Histogram is used to calculate a histogram for a surface (in a selection, if desired). This can then be used to retrieve percentile, average, peak, and distribution information.
Mostrar archivo Open project: PintaProject/Pinta.ImageManipulation

Protected Properties

Property Type Description
histogram long[][]
visualColors Pinta.ImageManipulation.ColorBgra[]

Public Methods

Method Description
GetMax ( ) : long
GetMax ( int channel ) : long
GetMean ( ) : float[]
GetMeanColor ( ) : ColorBgra
GetOccurrences ( int channel, int val ) : long
GetPercentile ( float fraction ) : int[]
GetPercentileColor ( float fraction ) : ColorBgra
GetVisualColor ( int channel ) : ColorBgra
UpdateHistogram ( ISurface surface, Rectangle rect ) : void

Protected Methods

Method Description
AddSurfaceRectangleToHistogram ( ISurface surface, Rectangle rect ) : void
Clear ( ) : void

Sets the histogram to be all zeros.

Histogram ( int channels, int entries ) : System
OnHistogramUpdated ( ) : void

Method Details

AddSurfaceRectangleToHistogram() protected abstract method

protected abstract AddSurfaceRectangleToHistogram ( ISurface surface, Rectangle rect ) : void
surface ISurface
rect Rectangle
return void

Clear() protected method

Sets the histogram to be all zeros.
protected Clear ( ) : void
return void

GetMax() public method

public GetMax ( ) : long
return long

GetMax() public method

public GetMax ( int channel ) : long
channel int
return long

GetMean() public method

public GetMean ( ) : float[]
return float[]

GetMeanColor() public abstract method

public abstract GetMeanColor ( ) : ColorBgra
return ColorBgra

GetOccurrences() public method

public GetOccurrences ( int channel, int val ) : long
channel int
val int
return long

GetPercentile() public method

public GetPercentile ( float fraction ) : int[]
fraction float
return int[]

GetPercentileColor() public abstract method

public abstract GetPercentileColor ( float fraction ) : ColorBgra
fraction float
return ColorBgra

GetVisualColor() public method

public GetVisualColor ( int channel ) : ColorBgra
channel int
return ColorBgra

Histogram() protected method

protected Histogram ( int channels, int entries ) : System
channels int
entries int
return System

OnHistogramUpdated() protected method

protected OnHistogramUpdated ( ) : void
return void

UpdateHistogram() public method

public UpdateHistogram ( ISurface surface, Rectangle rect ) : void
surface ISurface
rect Rectangle
return void

Property Details

histogram protected_oe property

protected long[][] histogram
return long[][]

visualColors protected_oe property

protected ColorBgra[],Pinta.ImageManipulation visualColors
return Pinta.ImageManipulation.ColorBgra[]