new Spacing(values)
- Source:
Immutable Spacing class. Warning: the input array is NOT cloned, modifying it will modify the index values.
Parameters:
Name | Type | Description |
---|---|---|
values |
Array | The size values. |
Methods
equals(rhs) → {boolean}
- Source:
Check for equality.
Parameters:
Name | Type | Description |
---|---|---|
rhs |
dwv.image.Spacing | The object to compare to. |
Returns:
True if both objects are equal.
- Type
- boolean
get(i) → {number}
- Source:
Get the spacing value at the given array index.
Parameters:
Name | Type | Description |
---|---|---|
i |
number | The index to get. |
Returns:
The value.
- Type
- number
get2D() → {object}
- Source:
Get the 2D base of this size.
Returns:
The 2D base [col,row] as {x,y}.
- Type
- object
getValues() → {Array}
- Source:
Get the values of this spacing.
Returns:
The array of values.
- Type
- Array
length() → {number}
- Source:
Get the length of the spacing.
Returns:
The length.
- Type
- number
toString() → {string}
- Source:
Get a string representation of the spacing.
Returns:
The spacing as a string.
- Type
- string