Documentation ¶
Index ¶
- Constants
- func EncodePDU(pdu PDU) ([]byte, error)
- type AAbort
- type AAssociate
- type AAssociateRj
- type AReleaseRp
- type AReleaseRq
- type AbortReasonType
- type AbstractSyntaxSubItem
- type ApplicationContextItem
- type AsynchronousOperationsWindowSubItem
- type ImplementationClassUIDSubItem
- type ImplementationVersionNameSubItem
- type PDU
- type PDataTf
- type PresentationContextItem
- type PresentationContextResult
- type PresentationDataValueItem
- type RejectReasonType
- type RejectResultType
- type RoleSelectionSubItem
- type SourceType
- type SubItem
- type SubItemUnsupported
- type TransferSyntaxSubItem
- type Type
- type UserInformationItem
- type UserInformationMaximumLengthItem
Constants ¶
const ( TypeAAssociateRq Type = 1 // A_ASSOCIATE_RQ TypeAAssociateAc = 2 // A_ASSOCIATE_AC TypeAAssociateRj = 3 // A_ASSOCIATE_RJ TypePDataTf = 4 // P_DATA_TF TypeAReleaseRq = 5 // A_RELEASE_RQ TypeAReleaseRp = 6 // A_RELEASE_RP TypeAAbort = 7 // A_ABORT )
const ( ItemTypeApplicationContext = 0x10 ItemTypePresentationContextRequest = 0x20 ItemTypePresentationContextResponse = 0x21 ItemTypeAbstractSyntax = 0x30 ItemTypeTransferSyntax = 0x40 ItemTypeUserInformation = 0x50 ItemTypeUserInformationMaximumLength = 0x51 ItemTypeImplementationClassUID = 0x52 ItemTypeAsynchronousOperationsWindow = 0x53 ItemTypeRoleSelection = 0x54 ItemTypeImplementationVersionName = 0x55 )
Possible Type field values for SubItem.
const CurrentProtocolVersion uint16 = 1
const DICOMApplicationContextItemName = "1.2.840.10008.3.1.1.1"
The app context for DICOM. The first item in the A-ASSOCIATE-RQ
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AAbort ¶
type AAbort struct { Source SourceType Reason AbortReasonType }
func (*AAbort) WritePayload ¶
type AAssociate ¶
type AAssociate struct { Type Type // One of {TypeA_Associate_RQ,TypeA_Associate_AC} ProtocolVersion uint16 // Reserved uint16 CalledAETitle string // For .._AC, the value is copied from A_ASSOCIATE_RQ CallingAETitle string // For .._AC, the value is copied from A_ASSOCIATE_RQ Items []SubItem }
Defines A_ASSOCIATE_{RQ,AC}. P3.8 9.3.2 and 9.3.3
func (*AAssociate) String ¶
func (pdu *AAssociate) String() string
func (*AAssociate) WritePayload ¶
func (pdu *AAssociate) WritePayload(e *dicomio.Encoder)
type AAssociateRj ¶
type AAssociateRj struct { Result RejectResultType Source SourceType Reason RejectReasonType }
P3.8 9.3.4
func (*AAssociateRj) String ¶
func (pdu *AAssociateRj) String() string
func (*AAssociateRj) WritePayload ¶
func (pdu *AAssociateRj) WritePayload(e *dicomio.Encoder)
type AReleaseRp ¶
type AReleaseRp struct { }
func (*AReleaseRp) String ¶
func (pdu *AReleaseRp) String() string
func (*AReleaseRp) WritePayload ¶
func (pdu *AReleaseRp) WritePayload(e *dicomio.Encoder)
type AReleaseRq ¶
type AReleaseRq struct { }
func (*AReleaseRq) String ¶
func (pdu *AReleaseRq) String() string
func (*AReleaseRq) WritePayload ¶
func (pdu *AReleaseRq) WritePayload(e *dicomio.Encoder)
type AbortReasonType ¶
type AbortReasonType byte
const ( AbortReasonNotSpecified AbortReasonType = 0 AbortReasonUnexpectedPDU AbortReasonType = 2 AbortReasonUnrecognizedPDUParameter AbortReasonType = 3 AbortReasonUnexpectedPDUParameter AbortReasonType = 4 AbortReasonInvalidPDUParameterValue AbortReasonType = 5 )
func (AbortReasonType) String ¶
func (i AbortReasonType) String() string
type AbstractSyntaxSubItem ¶
type AbstractSyntaxSubItem subItemWithName
func (*AbstractSyntaxSubItem) String ¶
func (v *AbstractSyntaxSubItem) String() string
func (*AbstractSyntaxSubItem) Write ¶
func (v *AbstractSyntaxSubItem) Write(e *dicomio.Encoder)
type ApplicationContextItem ¶
type ApplicationContextItem subItemWithName
func (*ApplicationContextItem) String ¶
func (v *ApplicationContextItem) String() string
func (*ApplicationContextItem) Write ¶
func (v *ApplicationContextItem) Write(e *dicomio.Encoder)
type AsynchronousOperationsWindowSubItem ¶
PS3.7 Annex D.3.3.3.1
func (*AsynchronousOperationsWindowSubItem) String ¶
func (v *AsynchronousOperationsWindowSubItem) String() string
func (*AsynchronousOperationsWindowSubItem) Write ¶
func (v *AsynchronousOperationsWindowSubItem) Write(e *dicomio.Encoder)
type ImplementationClassUIDSubItem ¶
type ImplementationClassUIDSubItem subItemWithName
PS3.7 Annex D.3.3.2.1
func (*ImplementationClassUIDSubItem) String ¶
func (v *ImplementationClassUIDSubItem) String() string
func (*ImplementationClassUIDSubItem) Write ¶
func (v *ImplementationClassUIDSubItem) Write(e *dicomio.Encoder)
type ImplementationVersionNameSubItem ¶
type ImplementationVersionNameSubItem subItemWithName
PS3.7 Annex D.3.3.2.3
func (*ImplementationVersionNameSubItem) String ¶
func (v *ImplementationVersionNameSubItem) String() string
func (*ImplementationVersionNameSubItem) Write ¶
func (v *ImplementationVersionNameSubItem) Write(e *dicomio.Encoder)
type PDU ¶
type PDU interface { fmt.Stringer // WritePayload encodes the PDU payload. The "payload" here excludes the // first 6 bytes that are common to all PDU types - they are encoded in // EncodePDU separately. WritePayload(*dicomio.Encoder) }
PDU is the interface for DUL messages like A-ASSOCIATE-AC, P-DATA-TF.
type PDataTf ¶
type PDataTf struct {
Items []PresentationDataValueItem
}
func (*PDataTf) WritePayload ¶
type PresentationContextItem ¶
type PresentationContextItem struct { Type byte // ItemTypePresentationContext* ContextID byte // Result is meaningful iff Type=0x21, zero else. Result PresentationContextResult // 1 byte reserved Items []SubItem // List of {Abstract,Transfer}SyntaxSubItem }
P3.8 9.3.2.2, 9.3.3.2
func (*PresentationContextItem) String ¶
func (v *PresentationContextItem) String() string
func (*PresentationContextItem) Write ¶
func (v *PresentationContextItem) Write(e *dicomio.Encoder)
type PresentationContextResult ¶
type PresentationContextResult byte
Result of abstractsyntax/transfersyntax handshake during A-ACCEPT. P3.8, 90.3.3.2, table 9-18.
const ( PresentationContextAccepted PresentationContextResult = 0 PresentationContextUserRejection PresentationContextResult = 1 PresentationContextProviderRejectionNoReason PresentationContextResult = 2 PresentationContextProviderRejectionAbstractSyntaxNotSupported PresentationContextResult = 3 PresentationContextProviderRejectionTransferSyntaxNotSupported PresentationContextResult = 4 )
func (PresentationContextResult) String ¶
func (i PresentationContextResult) String() string
type PresentationDataValueItem ¶
type PresentationDataValueItem struct { // Length: 2 + len(Value) ContextID byte // P3.8, E.2: the following two fields encode a single byte. Command bool // Bit 7 (LSB): 1 means command 0 means data Last bool // Bit 6: 1 means last fragment. 0 means not last fragment. // Payload, either command or data Value []byte }
P3.8 9.3.2.2.1 & 9.3.2.2.2
func ReadPresentationDataValueItem ¶
func ReadPresentationDataValueItem(d *dicomio.Decoder) PresentationDataValueItem
func (*PresentationDataValueItem) String ¶
func (v *PresentationDataValueItem) String() string
func (*PresentationDataValueItem) Write ¶
func (v *PresentationDataValueItem) Write(e *dicomio.Encoder)
type RejectReasonType ¶
type RejectReasonType byte
Possible values for AAssociateRj.Reason
const ( RejectReasonNone RejectReasonType = 1 RejectReasonApplicationContextNameNotSupported RejectReasonType = 2 RejectReasonCallingAETitleNotRecognized RejectReasonType = 3 RejectReasonCalledAETitleNotRecognized RejectReasonType = 7 )
func (RejectReasonType) String ¶
func (i RejectReasonType) String() string
type RejectResultType ¶
type RejectResultType byte
Possible values for AAssociateRj.Result
const ( ResultRejectedPermanent RejectResultType = 1 ResultRejectedTransient RejectResultType = 2 )
func (RejectResultType) String ¶
func (i RejectResultType) String() string
type RoleSelectionSubItem ¶
PS3.7 Annex D.3.3.4
func (*RoleSelectionSubItem) String ¶
func (v *RoleSelectionSubItem) String() string
func (*RoleSelectionSubItem) Write ¶
func (v *RoleSelectionSubItem) Write(e *dicomio.Encoder)
type SourceType ¶
type SourceType byte
Possible values for AAssociateRj.Source
const ( SourceULServiceUser SourceType = 1 SourceULServiceProviderACSE SourceType = 2 SourceULServiceProviderPresentation SourceType = 3 )
func (SourceType) String ¶
func (i SourceType) String() string
type SubItem ¶
SubItem is the interface for DUL items, such as ApplicationContextItem and TransferSyntaxSubItem.
type SubItemUnsupported ¶
Container for subitems that this package doesnt' support
func (*SubItemUnsupported) String ¶
func (item *SubItemUnsupported) String() string
func (*SubItemUnsupported) Write ¶
func (item *SubItemUnsupported) Write(e *dicomio.Encoder)
type TransferSyntaxSubItem ¶
type TransferSyntaxSubItem subItemWithName
func (*TransferSyntaxSubItem) String ¶
func (v *TransferSyntaxSubItem) String() string
func (*TransferSyntaxSubItem) Write ¶
func (v *TransferSyntaxSubItem) Write(e *dicomio.Encoder)
type UserInformationItem ¶
type UserInformationItem struct {
Items []SubItem // P3.8, Annex D.
}
P3.8 9.3.2.3
func (*UserInformationItem) String ¶
func (v *UserInformationItem) String() string
func (*UserInformationItem) Write ¶
func (v *UserInformationItem) Write(e *dicomio.Encoder)
type UserInformationMaximumLengthItem ¶
type UserInformationMaximumLengthItem struct {
MaximumLengthReceived uint32
}
P3.8 D.1
func (*UserInformationMaximumLengthItem) String ¶
func (v *UserInformationMaximumLengthItem) String() string
func (*UserInformationMaximumLengthItem) Write ¶
func (v *UserInformationMaximumLengthItem) Write(e *dicomio.Encoder)