dwv.dicom. DicomElementsWrapper

new DicomElementsWrapper(dicomElements)

DicomElements wrapper.

Parameters:
NameTypeDescription
dicomElementsArray

The elements to wrap.

Methods

dump() → {string}

Dump the DICOM tags to a string.

Returns:

The dumped file.

Type: 
string

dumpToObject() → {object}

Dump the DICOM tags to an object.

Returns:

The DICOM tags as an object.

Type: 
object

getDEFromKey(groupElementKey) → {object}

Get a DICOM Element value from a group/element key.

Parameters:
NameTypeDescription
groupElementKeystring

The key to retrieve.

Returns:

The DICOM element.

Type: 
object

getElementAsObject(dicomElement) → {object}

Get a DICOM element as a simple object.

Parameters:
NameTypeDescription
dicomElementobject

The DICOM element.

Returns:

The element as a simple object.

Type: 
object

getElementAsString(dicomElement, prefix) → {string}

Get a data element as a string.

Parameters:
NameTypeDescription
dicomElementobject

The DICOM element.

prefixstring

A string to prepend this one.

Returns:

The element as a string.

Type: 
string

getElementValueAsString(dicomElement, pretty) → {string}

Get a data element value as a string.

Parameters:
NameTypeDescription
dicomElementobject

The DICOM element.

prettyboolean

When set to true, returns a 'pretified' content.

Returns:

A string representation of the DICOM element.

Type: 
string

getElementValueAsStringFromKey(groupElementKey) → {string}

Get a data element value as a string.

Parameters:
NameTypeDescription
groupElementKeystring

The key to retrieve.

Returns:

The element as a string.

Type: 
string

getFromGroupElement(group, element) → {object}

Get a DICOM Element value from a group and an element.

Parameters:
NameTypeDescription
groupnumber

The group.

elementnumber

The element.

Returns:

The DICOM element value.

Type: 
object

getFromKey(groupElementKey, asArray) → {object}

Get a DICOM Element value from a group/element key.

Parameters:
NameTypeDescription
groupElementKeystring

The key to retrieve.

asArrayboolean

Get the value as an Array.

Returns:

The DICOM element value.

Type: 
object

getFromName(name) → {object}

Get a DICOM Element value from a tag name. Uses the DICOM dictionary.

Parameters:
NameTypeDescription
namestring

The tag name.

Returns:

The DICOM element value.

Type: 
object

getImageSize() → {object}

Extract a size from dicom elements.

Returns:

The size.

Type: 
object

getPixelSpacing() → {object}

Get the pixel spacing from the different spacing tags.

Returns:

The read spacing or the default [1,1].

Type: 
object

getPixelUnit() → {string|null}

Get the pixel data unit.

Returns:

The unit value if available.

Type: 
string | null

getTagName(tag) → {string}

Get a tag string name from the dictionary.

Parameters:
NameTypeDescription
tagobject

The DICOM tag object.

Returns:

The tag name.

Type: 
string

getTime() → {number|undefined}

Get the time.

Returns:

The time value if available.

Type: 
number | undefined