Class DicomDatasetExtensions
- Namespace
- FellowOakDicom
- Assembly
- fo-dicom.core.dll
DicomDataset extension methods.
public static class DicomDatasetExtensions
- Inheritance
-
DicomDatasetExtensions
- Inherited Members
Methods
Clone(DicomDataset)
Clone a dataset.
public static DicomDataset Clone(this DicomDataset dataset)
Parameters
datasetDicomDatasetDataset to be cloned.
Returns
- DicomDataset
Clone of dataset.
EnumerateGroup(DicomDataset, ushort)
Enumerates DICOM items for specified group.
public static IEnumerable<DicomItem> EnumerateGroup(this DicomDataset dataset, ushort group)
Parameters
datasetDicomDatasetDataset from which group items should be retrieved.
groupushortRequested group.
Returns
- IEnumerable<DicomItem>
Enumeration of DICOM items for specified
group.
EnumerateMasked(DicomDataset, DicomMaskedTag)
Enumerates DICOM items matching mask.
public static IEnumerable<DicomItem> EnumerateMasked(this DicomDataset dataset, DicomMaskedTag mask)
Parameters
datasetDicomDatasetDataset from which masked items should be retrieved.
maskDicomMaskedTagRequested mask.
Returns
- IEnumerable<DicomItem>
Enumeration of masked DICOM items.
GetDateTime(DicomDataset, DicomTag, DicomTag)
Get a composite DateTime instance based on date and time values.
public static DateTime GetDateTime(this DicomDataset dataset, DicomTag date, DicomTag time)
Parameters
datasetDicomDatasetDataset from which data should be retrieved.
dateDicomTagTag associated with date value.
timeDicomTagTag associated with time value.
Returns
GetDateTimeOffset(DicomDataset, DicomTag, DicomTag, DicomDataset)
Get a composite DateTimeOffset instance based on date and time values.
This will take any time zone information specified in the dataset into account.
If the dataset is a child sequence item, the topLevelDataset must be specified to find time zone information.
public static DateTimeOffset GetDateTimeOffset(this DicomDataset dataset, DicomTag date, DicomTag time, DicomDataset topLevelDataset = null)
Parameters
datasetDicomDatasetDataset from which data should be retrieved.
dateDicomTagTag associated with date value.
timeDicomTagTag associated with time value.
topLevelDatasetDicomDatasetThe top-level dataset (if different from the current dataset). This is where the time zone information will be located
Returns
- DateTimeOffset
Composite DateTimeOffset.
NotValidated(DicomDataset)
Turns off validation on the passed DicomDataset and returns this Dataset
public static DicomDataset NotValidated(this DicomDataset dataset)
Parameters
datasetDicomDataset
Returns
TryGetDateTime(DicomDataset, DicomTag, DicomTag, out DateTime)
Tries to get a composite DateTime instance based on date and time values.
public static bool TryGetDateTime(this DicomDataset dataset, DicomTag date, DicomTag time, out DateTime dateTime)
Parameters
datasetDicomDatasetDataset from which data should be retrieved.
dateDicomTagTag associated with date value.
timeDicomTagTag associated with time value.
dateTimeDateTimeComposite DateTime.
Returns
- bool
Boolean if the composite DateTime could be extracted.
TryGetDateTimeOffset(DicomDataset, DicomTag, DicomTag, out DateTimeOffset, DicomDataset)
Tries to get a composite DateTimeOffset instance based on date and time values.
This will take any time zone information specified in the dataset into account.
If the dataset is a child sequence item, the topLevelDataset must be specified to find time zone information.
public static bool TryGetDateTimeOffset(this DicomDataset dataset, DicomTag date, DicomTag time, out DateTimeOffset datetimeoffset, DicomDataset topLevelDataset = null)
Parameters
datasetDicomDatasetDataset from which data should be retrieved.
dateDicomTagTag associated with date value.
timeDicomTagTag associated with time value.
datetimeoffsetDateTimeOffsetComposite DateTimeOffset.
topLevelDatasetDicomDatasetThe top-level dataset (if different from the current dataset). This is where the time zone information will be located
Returns
- bool
Boolean if the composite DateTimeOffset could be extracted.
Validated(DicomDataset)
Turns on validation on the passed DicomDataset and returns this Dataset
public static DicomDataset Validated(this DicomDataset dataset)
Parameters
datasetDicomDataset