Class VRDictionary
General purpose class for working with VRs. It contains methods to convert ASCII string abbreviations into VR type, the reverse, and a few more useful methods when working with VR enums.
Inheritance
Inherited Members
Namespace:EvilDICOM.Core.Dictionaries
Assembly:EvilDICOM.dll
Syntax
public class VRDictionary
Methods
View SourceGetAbbreviationFromType(IDICOMElement)
Finds the VR enum from a specific DICOM element.
Declaration
public static string GetAbbreviationFromType(IDICOMElement el)
Parameters
| Type | Name | Description |
|---|---|---|
| IDICOMElement | el | the DICOM element |
Returns
| Type | Description |
|---|---|
| System.String | the VR abbreviation |
GetAbbreviationFromType(Type)
Finds the VR enum from a specific DICOM element.
Declaration
public static string GetAbbreviationFromType(Type t)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | t |
Returns
| Type | Description |
|---|---|
| System.String | the VR abbreviation |
GetAbbreviationFromVR(VR)
Creates the DICOM two letter abbreviation from a VR type.
Declaration
public static string GetAbbreviationFromVR(VR vr)
Parameters
| Type | Name | Description |
|---|---|---|
| VR | vr | the VR type |
Returns
| Type | Description |
|---|---|
| System.String | the DICOM two letter abbreviation |
GetDataTypeFromVR(VR)
Declaration
public static Type GetDataTypeFromVR(VR vr)
Parameters
| Type | Name | Description |
|---|---|---|
| VR | vr |
Returns
| Type | Description |
|---|---|
| System.Type |
GetEncodingFromVR(VR)
Determines the encoding, meaning how many bytes to write the VR and length parameters, from a VR type. Options are explicit long (8 bytes), explicit short (4 bytes), or implicit (4 bytes). In Evil DICOM, the null VR is used to represent an unknown VR (before dictionary lookup) that is implicitly encoded.
Declaration
public static VREncoding GetEncodingFromVR(VR vr)
Parameters
| Type | Name | Description |
|---|---|---|
| VR | vr | the VR type |
Returns
| Type | Description |
|---|---|
| VREncoding | the encoding method for this type |
GetVRFromAbbreviation(String)
Finds the VR type from an DICOM two letter abbreviation.
Declaration
public static VR GetVRFromAbbreviation(string vrAbbreviation)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | vrAbbreviation | an DICOM two letter abbreviation |
Returns
| Type | Description |
|---|---|
| VR | the VR type |
GetVRFromType(IDICOMElement)
Finds the VR enum from a specific DICOM element.
Declaration
public static VR GetVRFromType(IDICOMElement el)
Parameters
| Type | Name | Description |
|---|---|---|
| IDICOMElement | el | the DICOM element |
Returns
| Type | Description |
|---|---|
| VR | the VR type |
GetVRFromType(Type)
Finds the VR enum from a specific DICOM element type.
Declaration
public static VR GetVRFromType(Type t)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | t |
Returns
| Type | Description |
|---|---|
| VR | the VR type |