Table of Contents

Class Histogram

Namespace
FellowOakDicom.Imaging.Mathematics
Assembly
fo-dicom.core.dll

Representation of a histogram.

The Histogram can be seen as an integer array of value counts divided into bins from a specified minimum to maximum value. Bins are accessed via their absolute position, regardless of specified minimum bin.

public class Histogram
Inheritance
Histogram
Inherited Members
Extension Methods

Constructors

Histogram(int, int)

Initializes an intstance of the Histogram class.

public Histogram(int min, int max)

Parameters

min int

Minimum histogram bin.

max int

Maximum histogram bin.

Properties

this[int]

Gets the value count at histogram bin value.

public int this[int value] { get; }

Parameters

value int

Bin at which value count is requested.

Property Value

int

Value count at value.

WindowEnd

Gets the end bin of the histogram window.

public int WindowEnd { get; }

Property Value

int

WindowStart

Gets the start bin of the histogram window.

public int WindowStart { get; }

Property Value

int

WindowTotal

Gets the total sum inside the window given by WindowStart and WindowEnd.

public int WindowTotal { get; }

Property Value

int

Methods

Add(int)

Increment histogram at bin position value.

public void Add(int value)

Parameters

value int

Bin position at which histogram should be incremented.

ApplyWindow(int)

Define WindowStart and WindowEnd properties by gradually shrinking the window until the value count inside the window is less than or equal to percent % of the total value count.

public void ApplyWindow(int percent)

Parameters

percent int

Target percentage for the active window.

ApplyWindow(int, int)

Apply an active histogram window at the specified start and end bins.

public void ApplyWindow(int start, int end)

Parameters

start int

Position of the window's start bin.

end int

Position of the window's end bin.

Clear(int)

Reset histogram at bin position value to 0.

public void Clear(int value)

Parameters

value int

Bin position at which histogram should be reset.