- Source
Classes
- BucketQueue
- Circle
- Ellipse
- Index
- Line
- Matrix33
- Path
- Point
- Point2D
- Point3D
- ROI
- Rectangle
- Scissors
- SimpleStats
- Vector3D
Methods
(static) computeGradient(greyscale) → {object}
Name | Type | Description |
---|---|---|
greyscale | object | The input greyscale- |
- Source
A gradient object
- Type:
- object
(static) computeGreyscale(data, width, height) → {Array}
Name | Type | Description |
---|---|---|
data | Array | The input data. |
width | number | The width of the output. |
height | number | The height of the output. |
- Source
A greyscale object
- Type:
- Array
(static) computeLaplace(greyscale) → {object}
Name | Type | Description |
---|---|---|
greyscale | object | The input greyscale. |
- Source
A laplace object.
- Type:
- object
(static) getAngle(line0, line1) → {number}
Get the angle between two lines in degree.
Name | Type | Description |
---|---|---|
line0 | dwv. | The first line. |
line1 | dwv. | The second line. |
- Source
The angle.
- Type:
- number
(static) getCoronalMat33() → {dwv.math.Matrix33}
Create a 3x3 coronal (xzy) matrix.
- Source
The coronal matrix.
- Type:
- dwv.
math. Matrix33
(static) getEllipseIndices(center, radius, dir) → {Array}
Get the indices that form a ellpise.
Name | Type | Description |
---|---|---|
center | dwv. | The ellipse center. |
radius | Array | The 2 ellipse radiuses. |
dir | Array | The 2 ellipse directions. |
- Source
The indices of the ellipse.
- Type:
- Array
(static) getEqualPoint3DFunction(point) → {function}
Get an array find callback for an equal input point.
Name | Type | Description |
---|---|---|
point | dwv. | The point to compare to. |
- Source
A function that compares, using equals
, its input point to the one given as input to this function.
- Type:
- function
(static) getFullStats(array) → {dwv.math.FullStats}
Get full stats: minimum, maximum, mean, standard deviation, median, 25% and 75% percentile of an array of values.
Name | Type | Description |
---|---|---|
array | Array | The array of values to extract stats from. |
- Source
A full stats object.
- Type:
- dwv.
math. FullStats
(static) getIdentityMat33() → {dwv.math.Matrix33}
Create a 3x3 identity matrix.
- Source
The identity matrix.
- Type:
- dwv.
math. Matrix33
(static) getIndexCompareFunction(direction) → {function}
Get an array sort callback. f(a,b) > 0 -> b,a f(a,b) < 0 -> a,b f(a,b) = 0 -> original order
Name | Type | Description |
---|---|---|
direction | number | The direction to use to compare indices. |
- Source
A function that compares two dwv.math.Index.
- Type:
- function
(static) getIndexFromStringId(inputStr) → {dwv.math.Index}
Get an index from an id string in the form of: '#0-1_#1-2' (result of index.toStringId).
Name | Type | Description |
---|---|---|
inputStr | string | The input string. |
- Source
The corresponding index.
- Type:
- dwv.
math. Index
(static) getMatrixFromName(name) → {dwv.math.Matrix33}
Get an orientation matrix from a name.
Name | Type | Description |
---|---|---|
name | string | The orientation name. |
- Source
The orientation matrix.
- Type:
- dwv.
math. Matrix33
(static) getMatrixInverse(m) → {dwv.math.Matrix33|undefined}
Get the inverse of an input 3*3 matrix.
Name | Type | Description |
---|---|---|
m | dwv. | The input matrix. |
- Source
The inverse matrix or undefined if the determinant is zero.
- Type:
- dwv.
math. |Matrix33 undefined
(static) getPercentile(array, ratio) → {number}
Get an arrays' percentile. Uses linear interpolation for percentiles that lie between data points. see https://en.wikipedia.org/wiki/Percentile (second variant interpolation)
Name | Type | Description |
---|---|---|
array | Array | The sorted array of values. |
ratio | number | The percentile ratio [0-1]. |
- Source
The percentile,
- Type:
- number
(static) getPerpendicularLine(line, point, length) → {object}
Get a perpendicular line to an input one.
Name | Type | Description |
---|---|---|
line | dwv. | The line to be perpendicular to. |
point | dwv. | The middle point of the perpendicular line. |
length | number | The length of the perpendicular line. |
- Source
A perpendicular line.
- Type:
- object
(static) getSagittalMat33() → {dwv.math.Matrix33}
Create a 3x3 sagittal (yzx) matrix.
- Source
The sagittal matrix.
- Type:
- dwv.
math. Matrix33
(static) getSimilarPoint3DFunction(point, tol) → {function}
Get an array find callback for a similar input point.
Name | Type | Description |
---|---|---|
point | dwv. | The point to compare to. |
tol | number | The comparison tolerance default to Number.EPSILON. |
- Source
A function that compares, using isSimilar
, its input point to the one given as input to this function.
- Type:
- function
(static) getSimpleStats(array) → {dwv.math.SimpleStats}
Get simple stats: minimum, maximum, mean and standard deviation of an array of values.
Name | Type | Description |
---|---|---|
array | Array | The array of values to extract stats from. |
- Source
A simple stats object.
- Type:
- dwv.
math. SimpleStats
(static) getStats(array, flags) → {dwv.math.Stats}
Get the minimum, maximum, mean and standard deviation of an array of values. Note: could use https://github.com/tmcw/simple-statistics.
Name | Type | Description |
---|---|---|
array | Array | The array of values to extract stats from. |
flags | Array | A list of stat values to calculate. |
- Source
A stats object.
- Type:
- dwv.
math. Stats
(static) getZeroIndex(size) → {dwv.math.Index}
Get an index with values set to 0 and the input size.
Name | Type | Description |
---|---|---|
size | number | The size of the index. |
- Source
The zero index.
- Type:
- dwv.
math. Index
(static) guid() → {string}
Unique ID generator. See http://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript and this answer.
- Source
A unique ID.
- Type:
- string
(static) includesFullStatsFlags(flags) → {boolean}
Does the input flag list contain a full stat element?
Name | Type | Description |
---|---|---|
flags | Array | A list of stat values to calculate. |
- Source
True if one of the flags is a full start flag.
- Type:
- boolean
(static) isIdentityMat33(mat33) → {boolean}
Check if a matrix is a 3x3 identity matrix.
Name | Type | Description |
---|---|---|
mat33 | dwv. | The matrix to test. |
- Source
True if identity.
- Type:
- boolean
(static) isSimilar(a, b, tol) → {boolean}
Check if two numbers are similar.
Name | Type | Description |
---|---|---|
a | number | The first number. |
b | number | The second number. |
tol | number | The comparison tolerance default to Number.EPSILON. |
- Source
True if similar.
- Type:
- boolean
(static) mulABC(a, b, c) → {number}
Mulitply the three inputs if the last two are not null.
Name | Type | Description |
---|---|---|
a | number | The first input. |
b | number | The second input. |
c | number | The third input. |
- Source
The multiplication of the three inputs or null if one of the last two is null.
- Type:
- number
(static) mulABC(a, b, c) → {number}
Mulitply the three inputs if the last two are not null.
Name | Type | Description |
---|---|---|
a | number | The first input. |
b | number | The second input. |
c | number | The third input. |
- Source
The multiplication of the three inputs or null if one of the last two is null.
- Type:
- number
(static) mulABC(a, b, c) → {number}
Mulitply the three inputs if the last two are not null.
Name | Type | Description |
---|---|---|
a | number | The first input. |
b | number | The second input. |
c | number | The third input. |
- Source
The multiplication of the three inputs or null if one of the last two is null.
- Type:
- number