Documentation ¶
Index ¶
Constants ¶
const CommandDataSetTypeNonNull uint16 = 1
CommandDataSetTypeNonNull indicates that the DIMSE message has a data payload, when set in dicom.TagCommandDataSetType.
const CommandDataSetTypeNull uint16 = 0x101
CommandDataSetTypeNull indicates that the DIMSE message has no data payload, when set in dicom.TagCommandDataSetType. Any other value indicates the existence of a payload.
const CommandFieldCEchoRq = 48
const CommandFieldCEchoRsp = 32816
const CommandFieldCFindRq = 32
const CommandFieldCFindRsp = 32800
const CommandFieldCGetRq = 16
const CommandFieldCGetRsp = 32784
const CommandFieldCMoveRq = 33
const CommandFieldCMoveRsp = 32801
const CommandFieldCStoreRq = 1
const CommandFieldCStoreRsp = 32769
Variables ¶
var Success = Status{Status: StatusSuccess}
Success is an OK status for a call.
Functions ¶
func EncodeMessage ¶
EncodeMessage serializes the given message. Errors are reported through e.Error()
Types ¶
type CEchoRq ¶
type CEchoRq struct { MessageID MessageID CommandDataSetType uint16 Extra []*dicom.Element // Unparsed elements }
func (*CEchoRq) CommandField ¶
func (*CEchoRq) GetMessageID ¶
type CEchoRsp ¶
type CEchoRsp struct { MessageIDBeingRespondedTo MessageID CommandDataSetType uint16 Status Status Extra []*dicom.Element // Unparsed elements }
func (*CEchoRsp) CommandField ¶
func (*CEchoRsp) GetMessageID ¶
type CFindRq ¶
type CFindRq struct { AffectedSOPClassUID string MessageID MessageID Priority uint16 CommandDataSetType uint16 Extra []*dicom.Element // Unparsed elements }
func (*CFindRq) CommandField ¶
func (*CFindRq) GetMessageID ¶
type CFindRsp ¶
type CFindRsp struct { AffectedSOPClassUID string MessageIDBeingRespondedTo MessageID CommandDataSetType uint16 Status Status Extra []*dicom.Element // Unparsed elements }
func (*CFindRsp) CommandField ¶
func (*CFindRsp) GetMessageID ¶
type CGetRq ¶
type CGetRq struct { AffectedSOPClassUID string MessageID MessageID Priority uint16 CommandDataSetType uint16 Extra []*dicom.Element // Unparsed elements }
func (*CGetRq) CommandField ¶
func (*CGetRq) GetMessageID ¶
type CGetRsp ¶
type CGetRsp struct { AffectedSOPClassUID string MessageIDBeingRespondedTo MessageID CommandDataSetType uint16 NumberOfRemainingSuboperations uint16 NumberOfCompletedSuboperations uint16 NumberOfFailedSuboperations uint16 NumberOfWarningSuboperations uint16 Status Status Extra []*dicom.Element // Unparsed elements }
func (*CGetRsp) CommandField ¶
func (*CGetRsp) GetMessageID ¶
type CMoveRq ¶
type CMoveRq struct { AffectedSOPClassUID string MessageID MessageID Priority uint16 MoveDestination string CommandDataSetType uint16 Extra []*dicom.Element // Unparsed elements }
func (*CMoveRq) CommandField ¶
func (*CMoveRq) GetMessageID ¶
type CMoveRsp ¶
type CMoveRsp struct { AffectedSOPClassUID string MessageIDBeingRespondedTo MessageID CommandDataSetType uint16 NumberOfRemainingSuboperations uint16 NumberOfCompletedSuboperations uint16 NumberOfFailedSuboperations uint16 NumberOfWarningSuboperations uint16 Status Status Extra []*dicom.Element // Unparsed elements }
func (*CMoveRsp) CommandField ¶
func (*CMoveRsp) GetMessageID ¶
type CStoreRq ¶
type CStoreRq struct { AffectedSOPClassUID string MessageID MessageID Priority uint16 CommandDataSetType uint16 AffectedSOPInstanceUID string MoveOriginatorApplicationEntityTitle string MoveOriginatorMessageID MessageID Extra []*dicom.Element // Unparsed elements }
func (*CStoreRq) CommandField ¶
func (*CStoreRq) GetMessageID ¶
type CStoreRsp ¶
type CStoreRsp struct { AffectedSOPClassUID string MessageIDBeingRespondedTo MessageID CommandDataSetType uint16 AffectedSOPInstanceUID string Status Status Extra []*dicom.Element // Unparsed elements }
func (*CStoreRsp) CommandField ¶
func (*CStoreRsp) GetMessageID ¶
type CommandAssembler ¶
type CommandAssembler struct {
// contains filtered or unexported fields
}
CommandAssembler is a helper that assembles a DIMSE command message and data payload from a sequence of P_DATA_TF PDUs.
func (*CommandAssembler) AddDataPDU ¶
AddDataPDU is to be called for each P_DATA_TF PDU received from the network. If the fragment is marked as the last one, AddDataPDU returns <SOPUID, TransferSyntaxUID, payload, nil>. If it needs more fragments, it returns <"", "", nil, nil>. On error, it returns a non-nil error.
type Message ¶
type Message interface { fmt.Stringer // Print human-readable description for debugging. Encode(*dicomio.Encoder) // GetMessageID extracts the message ID field. GetMessageID() MessageID // CommandField returns the command field value of this message. CommandField() int // GetStatus returns the the response status value. It is nil for request message // types, and non-nil for response message types. GetStatus() *Status // HasData is true if we expect P_DATA_TF packets after the command packets. HasData() bool }
Message defines the common interface for all DIMSE message types.
func ReadMessage ¶
ReadMessage constructs a typed dimse.Message object, given a set of dicom.Elements,
type Status ¶
type Status struct { // Status==StatusSuccess on success. A non-zero value on error. Status StatusCode // Optional error payloads. ErrorComment string // Encoded as (0000,0902) }
Status represents a result of a DIMSE call. P3.7 C defines list of status codes and error payloads.
type StatusCode ¶
type StatusCode uint16
StatusCode represents a DIMSE service response code, as defined in P3.7
const ( StatusSuccess StatusCode = 0 StatusCancel StatusCode = 0xFE00 StatusSOPClassNotSupported StatusCode = 0x0112 StatusInvalidArgumentValue StatusCode = 0x0115 StatusInvalidAttributeValue StatusCode = 0x0106 StatusInvalidObjectInstance StatusCode = 0x0117 StatusUnrecognizedOperation StatusCode = 0x0211 StatusNotAuthorized StatusCode = 0x0124 StatusPending StatusCode = 0xff00 // C-STORE-specific status codes. P3.4 GG4-1 CStoreOutOfResources StatusCode = 0xa700 CStoreCannotUnderstand StatusCode = 0xc000 CStoreDataSetDoesNotMatchSOPClass StatusCode = 0xa900 // C-FIND-specific status codes. CFindUnableToProcess StatusCode = 0xc000 // C-MOVE/C-GET-specific status codes. CMoveOutOfResourcesUnableToCalculateNumberOfMatches StatusCode = 0xa701 CMoveOutOfResourcesUnableToPerformSubOperations StatusCode = 0xa702 CMoveMoveDestinationUnknown StatusCode = 0xa801 CMoveDataSetDoesNotMatchSOPClass StatusCode = 0xa900 // Warning codes. StatusAttributeValueOutOfRange StatusCode = 0x0116 StatusAttributeListError StatusCode = 0x0107 )
func (StatusCode) String ¶
func (i StatusCode) String() string