uid

package
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PatientRootQRFind = standardUID("1.2.840.10008.5.1.4.1.2.1.1")
	StudyRootQRFind   = standardUID("1.2.840.10008.5.1.4.1.2.2.1")
	PatientRootQRGet  = standardUID("1.2.840.10008.5.1.4.1.2.1.3")
	StudyRootQRGet    = standardUID("1.2.840.10008.5.1.4.1.2.2.3")
	PatientRootQRMove = standardUID("1.2.840.10008.5.1.4.1.2.1.2")
	StudyRootQRMove   = standardUID("1.2.840.10008.5.1.4.1.2.2.2")

	ModalityWorklistInformationFind = standardUID("1.2.840.10008.5.1.4.31")
	VerificationSOPClass            = standardUID("1.2.840.10008.1.1")

	// https://www.dicomlibrary.com/dicom/transfer-syntax/
	ImplicitVRLittleEndian         = standardUID("1.2.840.10008.1.2")
	ExplicitVRLittleEndian         = standardUID("1.2.840.10008.1.2.1")
	ExplicitVRBigEndian            = standardUID("1.2.840.10008.1.2.2")
	DeflatedExplicitVRLittleEndian = standardUID("1.2.840.10008.1.2.1.99")
)

Commonly used UID constants.

Standard list of transfer syntaxes.

Functions

func CanonicalTransferSyntaxUID

func CanonicalTransferSyntaxUID(uid string) (string, error)

CanonicalTransferSyntaxUID return the canonical transfer syntax UID (e.g., dicomuid.ExplicitVRLittleEndian or dicomuid.ImplicitVRLittleEndian), given an UID that represents any transfer syntax. Returns an error if the uid is not defined in DICOM standard, or if the uid does not represent a transfer syntax.

TODO(saito) Check the standard to see if we need to accept unknown UIDS as explicit little endian.

func ParseTransferSyntaxUID

func ParseTransferSyntaxUID(uid string) (bo binary.ByteOrder, implicit bool, err error)

ParseTransferSyntaxUID parses a transfer syntax uid and returns its byteorder and implicitVR/explicitVR type. TrasnferSyntaxUID can be any UID that refers to a transfer syntax. It can be, e.g., 1.2.840.10008.1.2 (it will return LittleEndian, ImplicitVR) or 1.2.840.10008.1.2.4.54 (it will return (LittleEndian, ExplicitVR).

func UIDString

func UIDString(uid string) string

UIDString returns a human-readable diagnostic string for a DICOM UID.

Types

type Info

type Info struct {
	UID    string // "1.2.840.10008.x.y.z"
	Name   string // The UID string, e.g.,"1.2.840.10008.1.2.1".
	Type   Type   // "SOP Class", "Transfer Syntax", etc.
	Part   string // Not used.
	Status string // "" if active. "Retired", if retired.
}

Info holds detailed information about a DICOM UID

func Lookup

func Lookup(uid string) (Info, error)

Lookup finds information about the given uid (string starting with 1.2.840). Returns an error unless uid is the one defined in the DICOM standard, P3.6.

func MustLookup

func MustLookup(uid string) Info

MustLookup is similar to LookupUID, but crashes the process on error.

type Type

type Type string
const (
	TypeSOPClass                  Type = "SOP Class"
	TypeTransferSyntax            Type = "Transfer Syntax"
	TypeWellKnownFrameOfReference Type = "Well-known frame of reference"
	TypeWellKnownSOPInstance      Type = "Well-known SOP instance"
	TypeCodingScheme              Type = "Coding Scheme"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL