DicomObjects Reference
DicomObjects Reference / DicomImage Object / Histogram Method
The lowest pixel value to be included
The highest pixel value to be included
The number of adjacent pixel values to be grouped into each bin
Histogram Method
Description
Computes the histogram of pixel values
Syntax
Visual Basic
Public Function Histogram( _
   ByVal MinValue As Long, _
   ByVal MaxValue As Long, _
   ByVal BinWidth As Long _
) As Variant
Parameters
MinValue
The lowest pixel value to be included
MaxValue
The highest pixel value to be included
BinWidth
The number of adjacent pixel values to be grouped into each bin
Remarks

The format of the returned data is suitable for creating DICOM Image Histogram modules, though to use this a few other attributes must be added.
In keeping with the image histogram module, the values used are raw pixel values before application of a modality lookup table or rescaling – use LookupTable if such translation is required.
The array returned is, like most arrays in DicomObjects, “1-based”, so the bin corresponding to the minimum pixel value quoted is bin 1 (not 0).

For multi-frame images, only the first frame is used for this method.

See Also