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
Properties
this[int]
Gets the value count at histogram bin value
.
public int this[int value] { get; }
Parameters
value
intBin 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
WindowStart
Gets the start bin of the histogram window.
public int WindowStart { get; }
Property Value
WindowTotal
Gets the total sum inside the window given by WindowStart and WindowEnd.
public int WindowTotal { get; }
Property Value
Methods
Add(int)
Increment histogram at bin position value
.
public void Add(int value)
Parameters
value
intBin 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
intTarget 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
Clear(int)
Reset histogram at bin position value
to 0.
public void Clear(int value)
Parameters
value
intBin position at which histogram should be reset.