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
DicomDatasetDICOM dataset
group
ushortDICOM tag group
createIfMissing
boolIf set to
true
, the group length element will be created if missing. If set tofalse
, 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
DicomDatasetDICOM dataset
createIfMissing
boolIf set to
true
, group length elements will be created if missing. If set tofalse
, 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
DicomDatasetDICOM dataset
firstLevelOnly
boolIf set to
true
, group length elements will only be removed from the first level of the dataset. If set tofalse
, 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.