Class DicomEncoding
- Namespace
- FellowOakDicom
- Assembly
- fo-dicom.core.dll
Support methods for DICOM encoding.
public static class DicomEncoding
- Inheritance
-
DicomEncoding
- Inherited Members
Fields
Default
Default encoding used in DICOM.
public static readonly Encoding Default
Field Value
DefaultArray
public static readonly Encoding[] DefaultArray
Field Value
- Encoding[]
Methods
GetCharset(Encoding, bool)
Get DICOM character set from encoding.
public static string GetCharset(Encoding encoding, bool extended = false)
Parameters
encoding
EncodingEncoding.
extended
boolIf true, the extended version of the character set is returned.
Returns
- string
The Specific Character Set as defined in DICOM.
Exceptions
- ArgumentException
No character set found for the encoding.
GetEncoding(string)
Get encoding from Specific Character Set attribute value. Tolerates some common misspellings.
public static Encoding GetEncoding(string charset)
Parameters
charset
stringDICOM character set.
Returns
- Encoding
String encoding.
GetEncodings(string[])
Get multiple encodings from Specific Character Set attribute values.
public static Encoding[] GetEncodings(string[] charsets)
Parameters
charsets
string[]List of character sets.
Returns
- Encoding[]
String encodings.
RegisterEncoding(string, string)
Register an encoding for a specific character set value. Can be used to add an encoding that is not handled by the library, or a private encoding. Can also be used to map an existing character set to another encoding.
public static void RegisterEncoding(string charset, string encoding)