Fellow Oak DICOM
Search Results for

    Show / Hide Table of Contents

    Class DicomEncoding

    Support methods for DICOM encoding.

    Inheritance
    System.Object
    DicomEncoding
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: FellowOakDicom
    Assembly: fo-dicom.core.dll
    Syntax
    public static class DicomEncoding

    Fields

    Default

    Default encoding used in DICOM.

    Declaration
    public static readonly Encoding Default
    Field Value
    Type Description
    System.Text.Encoding

    DefaultArray

    Declaration
    public static readonly Encoding[] DefaultArray
    Field Value
    Type Description
    System.Text.Encoding[]

    Methods

    GetCharset(Encoding, Boolean)

    Get DICOM character set from encoding.

    Declaration
    public static string GetCharset(Encoding encoding, bool extended = false)
    Parameters
    Type Name Description
    System.Text.Encoding encoding

    Encoding.

    System.Boolean extended

    If true, the extended version of the character set is returned.

    Returns
    Type Description
    System.String

    The Specific Character Set as defined in DICOM.

    Exceptions
    Type Condition
    System.ArgumentException

    No character set found for the encoding.

    GetEncoding(String)

    Get encoding from Specific Character Set attribute value. Tolerates some common misspellings.

    Declaration
    public static Encoding GetEncoding(string charset)
    Parameters
    Type Name Description
    System.String charset

    DICOM character set.

    Returns
    Type Description
    System.Text.Encoding

    String encoding.

    GetEncodings(String[])

    Get multiple encodings from Specific Character Set attribute values.

    Declaration
    public static Encoding[] GetEncodings(string[] charsets)
    Parameters
    Type Name Description
    System.String[] charsets

    List of character sets.

    Returns
    Type Description
    System.Text.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.

    Declaration
    public static void RegisterEncoding(string charset, string encoding)
    Parameters
    Type Name Description
    System.String charset

    The name of the character set as given in the Specific Character Set DICOM attribute.

    System.String encoding

    The name of the character encoding used to decode the DICOM tag values as defined in the .NET framework.

    In This Article
    Back to top Copyright (c) 2012-2025 fo-dicom contributors