MaskFactory

Mask Image factory.

Constructor

new MaskFactory()

Methods

checkElements(_dicomElements) → {string|undefined}

Check dicom elements. Throws an error if not suitable.

Parameters:
NameTypeDescription
_dicomElementsObject.<string, DataElement>

The DICOM tags.

Returns:

A possible warning.

Type: 
string | undefined

create(dataElements, pixelBuffer) → {Image}

Get an Image object from the read DICOM file.

Parameters:
NameTypeDescription
dataElementsObject.<string, DataElement>

The DICOM tags.

pixelBufferUint8Array | Int8Array | Uint16Array | Int16Array | Uint32Array | Int32Array

The pixel buffer.

Returns:

A new Image.

Type: 
Image

getWarning() → {string|undefined}

Get a warning string if elements are not as expected. Created by checkElements.

Returns:

The warning.

Type: 
string | undefined

toDicom(image, segments, sourceImage, extraTagsopt) → {Object.<string, DataElement>}

Convert a mask image into a DICOM segmentation object.

Parameters:
NameTypeAttributesDescription
imageImage

The mask image.

segmentsArray.<MaskSegment>

The mask segments.

sourceImageImage

The source image.

extraTagsObject.<string, any><optional>

Optional list of extra tags.

Returns:

A list of dicom elements.

Type: 
Object.<string, DataElement>