Table of Contents

Class DicomDatasetExtensions

Namespace
FellowOakDicom.IO.Writer
Assembly
fo-dicom.core.dll
public static class DicomDatasetExtensions
Inheritance
DicomDatasetExtensions
Inherited Members

Methods

RecalculateGroupLength(DicomDataset, ushort, bool)

Recalculates the group length element for the specified group. Removes the group length element if no elements exist for the specified group.

public static void RecalculateGroupLength(this DicomDataset dataset, ushort group, bool createIfMissing = true)

Parameters

dataset DicomDataset

DICOM dataset

group ushort

DICOM tag group

createIfMissing bool

If set to true, the group length element will be created if missing. If set to false, the group length will only be calculated if the group length element exists.

Remarks

For most use cases, this method will be called by the library as needed and will not need to be called by the user.

RecalculateGroupLengths(DicomDataset, bool)

Recalculates the group lengths for all groups in the dataset. Removes any group lengths for groups with out elements.

public static void RecalculateGroupLengths(this DicomDataset dataset, bool createIfMissing = true)

Parameters

dataset DicomDataset

DICOM dataset

createIfMissing bool

If set to true, group length elements will be created if missing. If set to false, only groups with existing group lengths will be recalculated.

Remarks

For most use cases, this method will be called by the library as needed and will not need to be called by the user.

RemoveGroupLengths(DicomDataset, bool)

Removes group length elements from the DICOM dataset.

public static void RemoveGroupLengths(this DicomDataset dataset, bool firstLevelOnly = false)

Parameters

dataset DicomDataset

DICOM dataset

firstLevelOnly bool

If set to true, group length elements will only be removed from the first level of the dataset. If set to false, group lengths will also be removed from sequence items.

Remarks

For most use cases, this method will be called by the library as needed and will not need to be called by the user.