- Source
Classes
- AsynchPixelBufferDecoder
- DeleteSegmentCommand
- DicomBufferToView
- Geometry
- Image
- ImageFactory
- MaskFactory
- MaskSegmentHelper
- PixelBufferDecoder
- PlaneHelper
- RescaleLut
- RescaleSlopeAndIntercept
- Size
- Spacing
- SynchPixelBufferDecoder
- View
- ViewFactory
- WindowLevel
- WindowLut
Namespaces
Members
(static) MinWindowWidth
Minimum window width value.
- Source
(static) viewEventNames :Array
List of view event names.
- Array
- Source
Methods
(static) colourRange(colours, end) → {object}
Get a colour iterator. The input array defines the colours and their start index.
Name | Type | Description |
---|---|---|
colours | Array | An array of {index, colour} pairs. |
end | number | The end of the range (excluded). |
- Source
An iterator folowing the iterator and iterable protocol.
- Type:
- object
(static) generateImageDataMonochrome(array, iterator, alphaFunc, windowLut, colourMap)
Generate image data for 'MONOCHROME*' photometric interpretation.
Name | Type | Description |
---|---|---|
array | Array | The array to store the outut data |
iterator | object | Position iterator. |
alphaFunc | function | The alpha function. |
windowLut | object | The window/level LUT. |
colourMap | object | The colour map. |
(static) generateImageDataPaletteColor(array, iterator, alphaFunc, colourMap, is16BitsStored)
Generate image data for 'PALETTE COLOR' photometric interpretation.
Name | Type | Description |
---|---|---|
array | Array | The array to store the outut data |
iterator | object | Position iterator. |
alphaFunc | function | The alpha function. |
colourMap | object | The colour map. |
is16BitsStored | boolean | Flag to know if the data is 16bits. |
(static) generateImageDataRgb(array, iterator, alphaFunc)
Generate image data for 'RGB' photometric interpretation.
Name | Type | Description |
---|---|---|
array | Array | The array to store the outut data |
iterator | object | Position iterator. |
alphaFunc | function | The alpha function. |
- Source
(static) generateImageDataYbrFull(array, iterator, alphaFunc)
Generate image data for 'YBR_FULL' photometric interpretation.
Name | Type | Description |
---|---|---|
array | Array | The array to store the outut data |
iterator | object | Position iterator. |
alphaFunc | function | The alpha function. |
- Source
(static) getDeOrientedArray3D(array3D, orientation) → {Array}
Get the raw values of an oriented input 3D array.
Name | Type | Description |
---|---|---|
array3D | Array | The 3D array. |
orientation | dwv. | The orientation 3D matrix. |
- Source
The values reordered to compensate the orientation.
- Type:
- Array
(static) getDefaultImage(width, height, sliceIndex, imageBuffer, numberOfFrames, imageUid) → {object}
Get an image from an input context imageData.
Name | Type | Description |
---|---|---|
width | number | The width of the coresponding image. |
height | number | The height of the coresponding image. |
sliceIndex | number | The slice index of the imageData. |
imageBuffer | object | The image buffer. |
numberOfFrames | number | The final number of frames. |
imageUid | string | The image UID. |
- Source
The corresponding view.
- Type:
- object
(static) getIteratorValues(iterator) → {Array}
Get a list of values for a given iterator.
Name | Type | Description |
---|---|---|
iterator | object | The iterator to use to loop through data. |
- Source
The list of values.
- Type:
- Array
(static) getOrientedArray3D(array3D, orientation) → {Array}
Get the oriented values of an input 3D array.
Name | Type | Description |
---|---|---|
array3D | Array | The 3D array. |
orientation | dwv. | The orientation 3D matrix. |
- Source
The values reordered according to the orientation.
- Type:
- Array
(static) getRegionSliceIterator(image, position, isRescaled, min, max) → {object}
Get a slice index iterator for a rectangular region.
Name | Type | Description |
---|---|---|
image | dwv. | The image to parse. |
position | dwv. | The current position. |
isRescaled | boolean | Flag for rescaled values (default false). |
min | dwv. | The minimum position (optional). |
max | dwv. | The maximum position (optional). |
- Source
The slice iterator.
- Type:
- object
(static) getSliceGeometrySpacing(origins, orientation, withCheck) → {number|undefined}
Get the slice spacing from the difference in the Z directions of input origins.
Name | Type | Description |
---|---|---|
origins | Array | An array of dwv.math.Point3D. |
orientation | dwv. | The oritentation matrix. |
withCheck | boolean | Flag to activate spacing variation check, default to true. |
- Source
The spacing.
- Type:
- number |
undefined
(static) getSliceIndex(volumeGeometry, sliceGeometry) → {dwv.math.Index}
Get the slice index of an input slice into a volume geometry.
Name | Type | Description |
---|---|---|
volumeGeometry | dwv. | The volume geometry. |
sliceGeometry | dwv. | The slice geometry. |
- Source
The index of the slice in the volume geomtry.
- Type:
- dwv.
math. Index
(static) getSliceIterator(image, position, isRescaled, viewOrientation) → {object}
Get a slice index iterator.
Name | Type | Description |
---|---|---|
image | dwv. | The image to parse. |
position | dwv. | The current position. |
isRescaled | boolean | Flag for rescaled values (default false). |
viewOrientation | dwv. | The view orientation. |
- Source
The slice iterator.
- Type:
- object
(static) getVariableRegionSliceIterator(image, position, isRescaled, regions) → {object|undefined}
Get a slice index iterator for a rectangular region.
Name | Type | Description |
---|---|---|
image | dwv. | The image to parse. |
position | dwv. | The current position. |
isRescaled | boolean | Flag for rescaled values (default false). |
regions | Array | An array of regions. |
- Source
The slice iterator.
- Type:
- object |
undefined
(static) getViewFromDOMImage(domImage, origin) → {object}
Get data from an input image using a canvas.
Name | Type | Description |
---|---|---|
domImage | object | The DOM Image. |
origin | object | The data origin. |
- Source
A load data event.
- Type:
- object
(static) getViewFromDOMVideo(video, onloaditem, onload, onprogress, onloadend, dataIndex, origin)
Get data from an input image using a canvas.
Name | Type | Description |
---|---|---|
video | object | The DOM Video. |
onloaditem | function | On load callback. |
onload | object | The function to call once the data is loaded. |
onprogress | object | The function to call to report progress. |
onloadend | object | The function to call to report load end. |
dataIndex | number | The data index. |
origin | object | The data origin. |
- Source
(static) imageDataToBuffer(imageData) → {Array}
Create a simple array buffer from an ImageData buffer.
Name | Type | Description |
---|---|---|
imageData | object | The ImageData taken from a context. |
- Source
The image buffer.
- Type:
- Array
(static) range(dataAccessor, start, maxIter, increment, blockMaxIter, blockIncrement, reverse1, reverse2) → {object}
Get an iterator for a given range for a one component data.
Using 'maxIter' and not an 'end' index since it fails in some edge cases (for ex coronal2, ie zxy)
Name | Type | Description |
---|---|---|
dataAccessor | function | Function to access data. |
start | number | Zero-based index at which to start the iteration. |
maxIter | number | The maximum number of iterations. |
increment | number | Increment between indicies. |
blockMaxIter | number | Number of applied increment after which blockIncrement is applied. |
blockIncrement | number | Increment after blockMaxIter is reached, the value is from block start to the next block start. |
reverse1 | boolean | If true, loop from end to start. WARN: don't forget to set the value of start as the last index! |
reverse2 | boolean | If true, loop from block end to block start. |
- Source
An iterator folowing the iterator and iterable protocol.
- Type:
- object
(static) range3d(dataAccessor, start, maxIter, increment, blockMaxIter, blockIncrement, reverse1, reverse2, isPlanar) → {object}
Get an iterator for a given range for a 3 components data.
Using 'maxIter' and not an 'end' index since it fails in some edge cases (for ex coronal2, ie zxy)
Name | Type | Description |
---|---|---|
dataAccessor | function | Function to access data. |
start | number | Zero-based index at which to start the iteration. |
maxIter | number | The maximum number of iterations. |
increment | number | Increment between indicies. |
blockMaxIter | number | Number of applied increment after which blockIncrement is applied. |
blockIncrement | number | Increment after blockMaxIter is reached, the value is from block start to the next block start. |
reverse1 | boolean | If true, loop from end to start. WARN: don't forget to set the value of start as the last index! |
reverse2 | boolean | If true, loop from block end to block start. |
isPlanar | boolean | A flag to know if the data is planar (RRRR...GGGG...BBBB...) or not (RGBRGBRGBRGB...), defaults to false. |
- Source
An iterator folowing the iterator and iterable protocol.
- Type:
- object
(static) rangeRegion(dataAccessor, start, end, increment, regionSize, regionOffset) → {object}
Get an iterator for a given range with bounds (for a one component data).
Name | Type | Description |
---|---|---|
dataAccessor | function | Function to access data. |
start | number | The start of the range (included). |
end | number | The end of the range (excluded). |
increment | number | The increment between indicies. |
regionSize | number | The size of the region to iterate through. |
regionOffset | number | The offset between regions. |
- Source
An iterator folowing the iterator and iterable protocol.
- Type:
- object
(static) rangeRegions(dataAccessor, start, end, increment, regions) → {object}
Get an iterator for a given range with bounds (for a one component data).
Name | Type | Description |
---|---|---|
dataAccessor | function | Function to access data. |
start | number | The start of the range (included). |
end | number | The end of the range (excluded). |
increment | number | The increment between indicies. |
regions | Array | An array of regions: [off0, size, off1]. |
- Source
An iterator folowing the iterator and iterable protocol.
- Type:
- object
(static) simpleRange(dataAccessor, start, end, increment) → {object}
Get an simple iterator for a given range for a one component data.
Name | Type | Description |
---|---|---|
dataAccessor | function | Function to access data. |
start | number | The start of the range (included). |
end | number | The end of the range (excluded). |
increment | number | The increment between indicies (default=1). |
- Source
An iterator folowing the iterator and iterable protocol.
- Type:
- object
(static) simpleRange3d(dataAccessor, start, end, increment, isPlanar) → {object}
Get an iterator for a given range for a 3 components data.
Name | Type | Description |
---|---|---|
dataAccessor | function | Function to access data. |
start | number | The start of the range (included). |
end | number | The end of the range (excluded). (end - start) needs to be a multiple of 3... |
increment | number | The increment between indicies (default=1). |
isPlanar | boolean | A flag to know if the data is planar (RRRR...GGGG...BBBB...) or not (RGBRGBRGBRGB...), defaults to false. |
- Source
A 3 components iterator folowing the iterator and iterable protocol, the value is an array of size 3 with each component.
- Type:
- object
(static) validateWindowWidth(value) → {number}
Validate an input window width.
Name | Type | Description |
---|---|---|
value | number | The value to test. |
- Source
A valid window width.
- Type:
- number