Class DicomDirectory
- Namespace
- FellowOakDicom.Media
- Assembly
- fo-dicom.core.dll
Class for managing DICOM directory objects.
public class DicomDirectory : DicomFile
- Inheritance
-
DicomDirectory
- Inherited Members
- Extension Methods
Constructors
DicomDirectory(bool)
Initializes a new instance of the DicomDirectory class.
public DicomDirectory(bool explicitVr = true)
Parameters
explicitVr
boolIndicates whether or not Value Representation of the DICOM directory should be explicit.
Properties
AutoValidate
Gets or sets if the content of DicomItems shall be validated as soon as they are added to the DicomDataset
[Obsolete("Use this property with care. You can suppress validation, but be aware you might create invalid Datasets if you need to set this property.", false)]
public bool AutoValidate { get; set; }
Property Value
FileSetID
Gets or sets the file set ID.
public string FileSetID { get; set; }
Property Value
Exceptions
- ArgumentException
If applied file set ID is null or empty.
MediaStorageSOPInstanceUID
Gets or sets the media storage SOP instance UID.
public DicomUID MediaStorageSOPInstanceUID { get; set; }
Property Value
RootDirectoryRecord
Gets the root directory record.
public DicomDirectoryRecord RootDirectoryRecord { get; }
Property Value
RootDirectoryRecordCollection
Gets the root directory record collection.
public DicomDirectoryRecordCollection RootDirectoryRecordCollection { get; }
Property Value
SourceApplicationEntityTitle
Gets or sets the source application entity title.
public string SourceApplicationEntityTitle { get; set; }
Property Value
Methods
AddFile(DicomFile, string)
Add new file to DICOM directory.
public DicomDirectoryEntry AddFile(DicomFile dicomFile, string referencedFileId = "")
Parameters
Returns
OnSave()
Method to call before performing the actual saving.
protected override void OnSave()
Open(Stream)
Read DICOM Directory.
public static DicomDirectory Open(Stream stream)
Parameters
stream
StreamStream to read.
Returns
- DicomDirectory
DicomDirectory instance.
Open(Stream, Encoding, Func<ParseState, bool>, FileReadOption, int)
Read DICOM Directory from stream.
public static DicomDirectory Open(Stream stream, Encoding fallbackEncoding, Func<ParseState, bool> stop = null, FileReadOption readOption = FileReadOption.Default, int largeObjectSize = 0)
Parameters
stream
StreamStream to read.
fallbackEncoding
EncodingEncoding to apply if it cannot be identified from DICOM directory.
stop
Func<ParseState, bool>Stop criterion in dataset.
readOption
FileReadOptionThe option how to deal with large DICOM tags like pixel data.
largeObjectSize
intCustom limit of what are large values and what are not. If 0 is passend, then the default of 64k is used.
Returns
- DicomDirectory
DicomDirectory instance.
Open(string)
Read DICOM Directory.
public static DicomDirectory Open(string fileName)
Parameters
fileName
stringFile name.
Returns
- DicomDirectory
DicomDirectory instance.
Open(string, Encoding, Func<ParseState, bool>, FileReadOption, int)
Read DICOM Directory.
public static DicomDirectory Open(string fileName, Encoding fallbackEncoding, Func<ParseState, bool> stop = null, FileReadOption readOption = FileReadOption.Default, int largeObjectSize = 0)
Parameters
fileName
stringFile name.
fallbackEncoding
EncodingEncoding to apply if it cannot be identified from DICOM directory.
stop
Func<ParseState, bool>Stop criterion in dataset.
readOption
FileReadOptionThe option how to deal with large DICOM tags like pixel data.
largeObjectSize
intCustom limit of what are large values and what are not. If 0 is passend, then the default of 64k is used.
Returns
- DicomDirectory
DicomDirectory instance.
OpenAsync(Stream)
Asynchronously read DICOM Directory from stream.
public static Task<DicomDirectory> OpenAsync(Stream stream)
Parameters
stream
StreamStream to read.
Returns
- Task<DicomDirectory>
Awaitable DicomDirectory instance.
OpenAsync(Stream, Encoding, Func<ParseState, bool>, FileReadOption, int)
Asynchronously read DICOM Directory from stream.
public static Task<DicomDirectory> OpenAsync(Stream stream, Encoding fallbackEncoding, Func<ParseState, bool> stop = null, FileReadOption readOption = FileReadOption.Default, int largeObjectSize = 0)
Parameters
stream
StreamStream to read.
fallbackEncoding
EncodingEncoding to apply if it cannot be identified from DICOM directory.
stop
Func<ParseState, bool>Stop criterion in dataset.
readOption
FileReadOptionThe option how to deal with large DICOM tags like pixel data.
largeObjectSize
intCustom limit of what are large values and what are not. If 0 is passend, then the default of 64k is used.
Returns
- Task<DicomDirectory>
Awaitable DicomDirectory instance.
OpenAsync(string)
Asynchronously read DICOM Directory.
public static Task<DicomDirectory> OpenAsync(string fileName)
Parameters
fileName
stringFile name.
Returns
- Task<DicomDirectory>
Awaitable DicomDirectory instance.
OpenAsync(string, Encoding, Func<ParseState, bool>, FileReadOption, int)
Asynchronously read DICOM Directory.
public static Task<DicomDirectory> OpenAsync(string fileName, Encoding fallbackEncoding, Func<ParseState, bool> stop = null, FileReadOption readOption = FileReadOption.Default, int largeObjectSize = 0)
Parameters
fileName
stringFile name.
fallbackEncoding
EncodingEncoding to apply if it cannot be identified from DICOM directory.
stop
Func<ParseState, bool>Stop criterion in dataset.
readOption
FileReadOptionThe option how to deal with large DICOM tags like pixel data.
largeObjectSize
intCustom limit of what are large values and what are not. If 0 is passend, then the default of 64k is used.
Returns
- Task<DicomDirectory>
Awaitable DicomDirectory instance.