Constructor
new WindowCenterAndWidth(center, width)
Parameters:
Name | Type | Description |
---|---|---|
center | number | The window center. |
width | number | The window width. |
- See
DICOM doc for Window Center and Window Width
Classes
Methods
apply(value) → {number}
Apply the window level on an input value.
Parameters:
Name | Type | Description |
---|---|---|
value | number | The value to rescale as an integer. |
Returns:
The leveled value, in the [ymin, ymax] range (default [0,255]).
- Type:
- number
equals(rhs) → {boolean}
Check for window level equality.
Parameters:
Name | Type | Description |
---|---|---|
rhs | WindowCenterAndWidth | The other window level to compare to. |
Returns:
True if both window level are equal.
- Type:
- boolean
getCenter() → {number}
Get the window center.
Returns:
The window center.
- Type:
- number
getWidth() → {number}
Get the window width.
Returns:
The window width.
- Type:
- number
setRange(min, max)
Set the output value range.
Parameters:
Name | Type | Description |
---|---|---|
min | string | The output value minimum. |
max | string | The output value maximum. |
setSignedOffset(offset)
Set the signed offset.
Parameters:
Name | Type | Description |
---|---|---|
offset | number | The signed data offset, typically: slope * ( size / 2). |
toString() → {string}
Get a string representation of the window level.
Returns:
The window level as a string.
- Type:
- string