DIMSE classes

Introduction

This chapter describes the classes and methods responsible for constructing and parsing DIMSE commands.

The following classes are described in this chapter:

C++ class Objective-C/Swift class Description
imebra::DimseService ImebraDimseService Sends and receives DIMSE commands and responses
imebra::DimseCommandBase ImebraDimseCommandBase Base class for DIMSE commands and responses
imebra::DimseCommand ImebraDimseCommand Base class for DIMSE commands
imebra::DimseResponse ImebraDimseResponse Base class for DIMSE responses
imebra::CStoreCommand ImebraCStoreCommand DIMSE C-STORE command
imebra::CGetCommand ImebraCGetCommand DIMSE C-GET command
imebra::CFindCommand ImebraCFindCommand DIMSE C-FIND command
imebra::CMoveCommand ImebraCMoveCommand DIMSE C-MOVE command
imebra::CEchoCommand ImebraCEchoCommand DIMSE C-ECHO command
imebra::CCancelCommand ImebraCCancelCommand DIMSE C-CANCEL command
imebra::CPartialResponse ImebraCPartialResponse Base clas for DIMSE partial responses
imebra::CStoreResponse ImebraCStoreResponse DIMSE C-STORE response
imebra::CGetResponse ImebraCGetResponse DIMSE C-GET response
imebra::CFindResponse ImebraCFindResponse DIMSE C-FIND response
imebra::CMoveResponse ImebraCMoveResponse DIMSE C-MOVE response
imebra::CEchoResponse ImebraCEchoResponse DIMSE C-ECHO response
imebra::NEventReportCommand ImebraNEventReportCommand DIMSE N-EVENT-REPORT command
imebra::NSetCommand ImebraNSetCommand DIMSE N-SET command
imebra::NGetCommand ImebraNGetCommand DIMSE N-GET command
imebra::NActionCommand ImebraNActionCommand DIMSE N-ACTION command
imebra::NCreateCommand ImebraNCreateCommand DIMSE N-CREATE command
imebra::NDeleteCommand ImebraNDeleteCommand DIMSE N-DELETE command
imebra::NEventReportResponse ImebraNEventReportResponse DIMSE N-EVENT-REPORT response
imebra::NSetResponse ImebraNSetResponse DIMSE N-SET response
imebra::NGetCommand ImebraNGetCommand DIMSE N-GET response
imebra::NActionResponse ImebraNActionResponse DIMSE N-ACTION response
imebra::NCreateResponse ImebraNCreateResponse DIMSE N-CREATE response
imebra::NDeleteResponse ImebraNDeleteResponse DIMSE N-DELETE response
DIMSE related classes

Class diagram of the DIMSE related classes

The DIMSE classes (DICOM Service) take care of transmitting and receiving DICOM commands through a DICOM association (a AssociationBase derived class).

The main DIMSE class is DimseService, through which all the DICOM commands and responses are sent and received.

Dimse

Commands and responses transmission and reception

DimseService

C++

class DimseService

Sends and receives DICOM commands and responses through a AssociationSCU or an AssociationSCP.

The DimseService supplies getNextCommandID() in order to obtain the ID for the commands sent through the DimseService object.

Parameters
  • association: the AssociationBase derived class through which the DICOM commands and responses are sent and received

Public Functions

DimseService(AssociationBase &association)

Constructor.

Parameters
  • association: the AssociationBase derived class through which the DICOM commands and responses are sent and received

std::string getTransferSyntax(const std::string &abstractSyntax) const

Returns the negotiated transfer syntax for a specific abstract syntax.

This method is multithread safe.

Return
the negotiated transfer syntax for the specified abstract syntax
Parameters
  • abstractSyntax: the abstract syntax for which the transfer syntax is needed

std::uint16_t getNextCommandID()

Retrieves an ID that can be used on the next command sent through this DimseService object.

This method is multithread safe.

Return
an ID that can be used as command ID on a command sent through this DimseService object

DimseCommand *getCommand()

Retrieves the next incoming DICOM command.

The command blocks until the command is available or until the association is closed, either by the connected peer or by other means (e.g because of the DIMSE timeout), in which case the exception StreamEOFError is thrown.

Other threads can wait for other commands or responses from the same DIMSE service. All the commands and responses are received by a secondary thread and distributed to all the listener waiting for a command or a response.

This method can be called by several threads at once: each thread will receive a DIMSE command and can reply to the command via sendCommandOrResponse().

The underlying AssociationBase object will take care of limiting the number of incoming command according to the maximum number of performed operation negotiated for the association.

Throws StreamEOFError if the association is closed while the method is waiting for an incoming command.

Return
the next incoming DICOM command

void sendCommandOrResponse(const DimseCommandBase &command)

Sends a DICOM command or response through the association.

This method is multithread safe.

Parameters
  • command: the command or response to send

CStoreResponse *getCStoreResponse(const CStoreCommand &command)

Wait for the response for the specified C-STORE command and returns it.

Other threads can wait for other commands or responses from the same DIMSE service. All the commands and responses are received by a secondary thread and distributed to all the listener waiting for a command or a response.

Return
the response for the specified command
Parameters
  • command: the sent C-CSTORE command for which to wait for a response

CGetResponse *getCGetResponse(const CGetCommand &command)

Wait for the response for the specified C-GET command and returns it.

Other threads can wait for other commands or responses from the same DIMSE service. All the commands and responses are received by a secondary thread and distributed to all the listener waiting for a command or a response.

Return
the response for the specified command
Parameters
  • command: the sent C-GET command for which to wait for a response

CFindResponse *getCFindResponse(const CFindCommand &command)

Wait for the response for the specified C-FIND command and returns it.

Other threads can wait for other commands or responses from the same DIMSE service. All the commands and responses are received by a secondary thread and distributed to all the listener waiting for a command or a response.

Return
the response for the specified command
Parameters
  • command: the sent C-FIND command for which to wait for a response

CMoveResponse *getCMoveResponse(const CMoveCommand &command)

Wait for the response for the specified C-MOVE command and returns it.

Other threads can wait for other commands or responses from the same DIMSE service. All the commands and responses are received by a secondary thread and distributed to all the listener waiting for a command or a response.

Return
the response for the specified command
Parameters
  • command: the sent C-MOVE command for which to wait for a response

CEchoResponse *getCEchoResponse(const CEchoCommand &command)

Wait for the response for the specified C-ECHO command and returns it.

Other threads can wait for other commands or responses from the same DIMSE service. All the commands and responses are received by a secondary thread and distributed to all the listener waiting for a command or a response.

Return
the response for the specified command
Parameters
  • command: the sent C-ECHO command for which to wait for a response

NEventReportResponse *getNEventReportResponse(const NEventReportCommand &command)

Wait for the response for the specified N-EVENT-REPORT command and returns it.

Other threads can wait for other commands or responses from the same DIMSE service. All the commands and responses are received by a secondary thread and distributed to all the listener waiting for a command or a response.

Return
the response for the specified command
Parameters
  • command: the sent N-EVENT-REPORT command for which to wait for a response

NGetResponse *getNGetResponse(const NGetCommand &command)

Wait for the response for the specified N-GET command and returns it.

Other threads can wait for other commands or responses from the same DIMSE service. All the commands and responses are received by a secondary thread and distributed to all the listener waiting for a command or a response.

Return
the response for the specified command
Parameters
  • command: the sent N-GET command for which to wait for a response

NSetResponse *getNSetResponse(const NSetCommand &command)

Wait for the response for the specified N-SET command and returns it.

Other threads can wait for other commands or responses from the same DIMSE service. All the commands and responses are received by a secondary thread and distributed to all the listener waiting for a command or a response.

Return
the response for the specified command
Parameters
  • command: the sent N-SET command for which to wait for a response

NActionResponse *getNActionResponse(const NActionCommand &command)

Wait for the response for the specified N-ACTION command and returns it.

Other threads can wait for other commands or responses from the same DIMSE service. All the commands and responses are received by a secondary thread and distributed to all the listener waiting for a command or a response.

Return
the response for the specified command
Parameters
  • command: the sent N-ACTION command for which to wait for a response

NCreateResponse *getNCreateResponse(const NCreateCommand &command)

Wait for the response for the specified N-CREATE command and returns it.

Other threads can wait for other commands or responses from the same DIMSE service. All the commands and responses are received by a secondary thread and distributed to all the listener waiting for a command or a response.

Return
the response for the specified command
Parameters
  • command: the sent N-CREATE command for which to wait for a response

NDeleteResponse *getNDeleteResponse(const NDeleteCommand &command)

Wait for the response for the specified N-DELETE command and returns it.

Other threads can wait for other commands or responses from the same DIMSE service. All the commands and responses are received by a secondary thread and distributed to all the listener waiting for a command or a response.

Return
the response for the specified command
Parameters
  • command: the sent N-DELETE command for which to wait for a response

Objective-C/Swift

class ImebraDimseService : public NSObject

Sends and receives DICOM commands and responses through an ImebraAssociationSCU or an ImebraAssociationSCP.

ImebraDimseService supplies getNextCommandID (ImebraDimseService) in order to obtain the ID for the commands sent through the ImebraDimseService object.

Public Functions

id ImebraDimseService::initWithAssociation:(ImebraAssociationBase * pAssociation)

Initializer.

Parameters
  • pAssociation: the AssociationBase derived class through which the DICOM commands and responses are sent and received

NSString* ImebraDimseService::getTransferSyntax:error:(NSString * abstractSyntax, NSError ** pError)

Returns the negotiated transfer syntax for a specific abstract syntax.

This method is multithread safe.

Return
the negotiated transfer syntax for the specified abstract syntax
Parameters
  • abstractSyntax: the abstract syntax for which the transfer syntax is needed

unsigned short getNextCommandID()

Retrieves an ID that can be used on the next command sent through this DimseService object.

This method is multithread safe.

Return
an ID that can be used as command ID on a command sent through this DimseService object

ImebraDimseCommand* ImebraDimseService::getCommand:(NSError ** pError)

Retrieves the next incoming DICOM command.

The method blocks until the command is available or until the association is closed, either by the connected peer or by other means (e.g because of the DIMSE timeout), in which case the exception ImebraStreamEOFError is set in pError.

Other threads can wait for other commands or responses from the same DIMSE service. All the commands and responses are received by a secondary thread and distributed to all the listener waiting for a command or a response.

This method can be called by several threads at once: each thread will receive a DIMSE command and can reply to the command via sendCommandOrResponse().

The underlying AssociationBase object will take care of limiting the number of incoming command according to the maximum number of performed operation negotiated for the association.

Set pError to StreamEOFError if the association is closed while the method is waiting for an incoming command or response.

Return
the next incoming DICOM command
Parameters
  • pError: set to a NSError derived class in case of error

void ImebraDimseService::sendCommandOrResponse:error:(ImebraDimseCommandBase * pCommand, (swift_error(nonnull_error)) __attribute__)

Sends a DICOM command or response through the association.

This method is multithread safe.

Parameters
  • pCommand: the command or response to send
  • pError: set to a NSError derived class in case of error

ImebraCStoreResponse* ImebraDimseService::getCStoreResponse:error:(ImebraCStoreCommand * pCommand, NSError ** pError)

Wait for the response for the specified C-STORE command and returns it.

Other threads can wait for other commands or responses from the same DIMSE service. All the commands and responses are received by a secondary thread and distributed to all the listener waiting for a command or a response.

Set pError to StreamEOFError if the association is closed while the method is waiting for an incoming command or response.

Return
the response for the specified command
Parameters
  • pCommand: the sent C-CSTORE command for which to wait for a response
  • pError: set to a NSError derived class in case of error

ImebraCGetResponse* ImebraDimseService::getCGetResponse:error:(ImebraCGetCommand * pCommand, NSError ** pError)

Wait for the response for the specified C-GET command and returns it.

Other threads can wait for other commands or responses from the same DIMSE service. All the commands and responses are received by a secondary thread and distributed to all the listener waiting for a command or a response.

Set pError to StreamEOFError if the association is closed while the method is waiting for an incoming command or response.

Return
the response for the specified command
Parameters
  • pCommand: the sent C-GET command for which to wait for a response
  • pError: set to a NSError derived class in case of error

ImebraCFindResponse* ImebraDimseService::getCFindResponse:error:(ImebraCFindCommand * pCommand, NSError ** pError)

Wait for the response for the specified C-FIND command and returns it.

Other threads can wait for other commands or responses from the same DIMSE service. All the commands and responses are received by a secondary thread and distributed to all the listener waiting for a command or a response.

Set pError to StreamEOFError if the association is closed while the method is waiting for an incoming command or response.

Return
the response for the specified command
Parameters
  • pCommand: the sent C-FIND command for which to wait for a response
  • pError: set to a NSError derived class in case of error

ImebraCMoveResponse* ImebraDimseService::getCMoveResponse:error:(ImebraCMoveCommand * pCommand, NSError ** pError)

Wait for the response for the specified C-MOVE command and returns it.

Other threads can wait for other commands or responses from the same DIMSE service. All the commands and responses are received by a secondary thread and distributed to all the listener waiting for a command or a response.

Set pError to StreamEOFError if the association is closed while the method is waiting for an incoming command or response.

Return
the response for the specified command
Parameters
  • pCommand: the sent C-MOVE command for which to wait for a response
  • pError: set to a NSError derived class in case of error

ImebraCEchoResponse* ImebraDimseService::getCEchoResponse:error:(ImebraCEchoCommand * pCommand, NSError ** pError)

Wait for the response for the specified C-ECHO command and returns it.

Other threads can wait for other commands or responses from the same DIMSE service. All the commands and responses are received by a secondary thread and distributed to all the listener waiting for a command or a response.

Set pError to StreamEOFError if the association is closed while the method is waiting for an incoming command or response.

Return
the response for the specified command
Parameters
  • pCommand: the sent C-ECHO command for which to wait for a response
  • pError: set to a NSError derived class in case of error

ImebraNEventReportResponse* ImebraDimseService::getNEventReportResponse:error:(ImebraNEventReportCommand * pCommand, NSError ** pError)

Wait for the response for the specified N-EVENT-REPORT command and returns it.

Other threads can wait for other commands or responses from the same DIMSE service. All the commands and responses are received by a secondary thread and distributed to all the listener waiting for a command or a response.

Set pError to StreamEOFError if the association is closed while the method is waiting for an incoming command or response.

Return
the response for the specified command
Parameters
  • pCommand: the sent N-EVENT-REPORT command for which to wait for a response
  • pError: set to a NSError derived class in case of error

ImebraNGetResponse* ImebraDimseService::getNGetResponse:error:(ImebraNGetCommand * pCommand, NSError ** pError)

Wait for the response for the specified N-GET command and returns it.

Other threads can wait for other commands or responses from the same DIMSE service. All the commands and responses are received by a secondary thread and distributed to all the listener waiting for a command or a response.

Set pError to StreamEOFError if the association is closed while the method is waiting for an incoming command or response.

Return
the response for the specified command
Parameters
  • pCommand: the sent N-GET command for which to wait for a response
  • pError: set to a NSError derived class in case of error

ImebraNSetResponse* ImebraDimseService::getNSetResponse:error:(ImebraNSetCommand * pCommand, NSError ** pError)

Wait for the response for the specified N-SET command and returns it.

Other threads can wait for other commands or responses from the same DIMSE service. All the commands and responses are received by a secondary thread and distributed to all the listener waiting for a command or a response.

Set pError to StreamEOFError if the association is closed while the method is waiting for an incoming command or response.

Return
the response for the specified command
Parameters
  • pCommand: the sent N-SET command for which to wait for a response
  • pError: set to a NSError derived class in case of error

ImebraNActionResponse* ImebraDimseService::getNActionResponse:error:(ImebraNActionCommand * pCommand, NSError ** pError)

Wait for the response for the specified N-ACTION command and returns it.

Other threads can wait for other commands or responses from the same DIMSE service. All the commands and responses are received by a secondary thread and distributed to all the listener waiting for a command or a response.

Set pError to StreamEOFError if the association is closed while the method is waiting for an incoming command or response.

Return
the response for the specified command
Parameters
  • pCommand: the sent N-ACTION command for which to wait for a response
  • pError: set to a NSError derived class in case of error

ImebraNCreateResponse* ImebraDimseService::getNCreateResponse:error:(ImebraNCreateCommand * pCommand, NSError ** pError)

Wait for the response for the specified N-CREATE command and returns it.

Other threads can wait for other commands or responses from the same DIMSE service. All the commands and responses are received by a secondary thread and distributed to all the listener waiting for a command or a response.

Set pError to StreamEOFError if the association is closed while the method is waiting for an incoming command or response.

Return
the response for the specified command
Parameters
  • pCommand: the sent N-CREATE command for which to wait for a response
  • pError: set to a NSError derived class in case of error

ImebraNDeleteResponse* ImebraDimseService::getNDeleteResponse:error:(ImebraNDeleteCommand * pCommand, NSError ** pError)

Wait for the response for the specified N-DELETE command and returns it.

Other threads can wait for other commands or responses from the same DIMSE service. All the commands and responses are received by a secondary thread and distributed to all the listener waiting for a command or a response.

Set pError to StreamEOFError if the association is closed while the method is waiting for an incoming command or response.

Return
the response for the specified command
Parameters
  • pCommand: the sent N-DELETE command for which to wait for a response
  • pError: set to a NSError derived class in case of error

Commands and response classes

All the DIMSE commands are identified by an unique ID, which can be retrieved via the DimseService class.

DIMSE responses are built from the DIMSE command and have the same ID of the command they are related to.

After receiving a command, use imebra::DimseCommand::getCommandType to retrieve the command type, then cast the received command to the proper type (imebra::CStoreCommand, imebra::CMoveCommand, imebra::CGetCommand, imebra::CFindCommand, imebra::CEchoCommand, imebra::CCancelCommand, imebra::NActionCommand, imebra::NEventReportCommand, imebra::NCreateCommand, imebra::NDeleteCommand, imebra::NSetCommand, imebra::NGetCommand). Instead of casting (e.g. when using the Golang wrapper) you can also call one of the following functions:

DimseCommandBase

C++

class DimseCommandBase

Base class for the DICOM commands and responses.

Subclassed by imebra::DimseCommand, imebra::DimseResponse

Public Functions

std::string getAffectedSopInstanceUid() const

Returns the affected SOP instance UID.

Return
the affected SOP instance UID

std::string getAffectedSopClassUid() const

Returns the affected SOP Class UID.

Return
the affected SOP Class UID

std::string getRequestedSopInstanceUid() const

Returns the requested SOP instance UID.

Return
requested SOP instance UID

std::string getRequestedSopClassUid() const

Returns the requested SOP class UID.

Return
requested SOP class UID

Objective-C/Swift

class ImebraDimseCommandBase : public NSObject

Base class for the DICOM commands and responses.

Subclassed by ImebraDimseCommand, ImebraDimseResponse

Public Functions

ImebraDataSet* ImebraDimseCommandBase::getCommandDataSet:(NSError ** pError)

Returns the ImebraDataSet containing the command data.

Return
the ImebraDataSet containing the command data
Parameters
  • pError: set to a NSError derived class in case of error

ImebraDataSet* ImebraDimseCommandBase::getPayloadDataSet:(NSError ** pError)

Returns the ImebraDataSet containing the payload data.

Return
the ImebraDataSet containing the payload data
Parameters
  • pError: set to a NSError derived class in case of error

NSString *getAbstractSyntax()

Returns the message abstract syntax.

Return
the message abstract syntax

NSString* ImebraDimseCommandBase::getAffectedSopInstanceUid:(NSError ** pError)

Returns the affected SOP instance UID.

Return
the affected SOP instance UID
Parameters
  • pError: set to a NSError derived class in case of error

NSString* ImebraDimseCommandBase::getAffectedSopClassUid:(NSError ** pError)

Returns the affected SOP Class UID.

Return
the affected SOP Class UID
Parameters
  • pError: set to a NSError derived class in case of error

NSString* ImebraDimseCommandBase::getRequestedSopInstanceUid:(NSError ** pError)

Returns the requested SOP instance UID.

Return
requested SOP instance UID
Parameters
  • pError: set to a NSError derived class in case of error

NSString* ImebraDimseCommandBase::getRequestedSopClassUid:(NSError ** pError)

Returns the requested SOP class UID.

Return
requested SOP class UID
Parameters
  • pError: set to a NSError derived class in case of error

DimseCommand

C++

class DimseCommand : public imebra::DimseCommandBase

Base class for the DICOM commands.

Subclassed by imebra::CCancelCommand, imebra::CEchoCommand, imebra::CFindCommand, imebra::CGetCommand, imebra::CMoveCommand, imebra::CStoreCommand, imebra::NActionCommand, imebra::NCreateCommand, imebra::NDeleteCommand, imebra::NEventReportCommand, imebra::NGetCommand, imebra::NSetCommand

Public Functions

std::uint16_t getID() const

Returns the command ID.

Return
the command ID

dimseCommandType_t getCommandType() const

Returns the command type.

Return
the command type

const CStoreCommand *getAsCStoreCommand() const

Downcast the DimseCommand to a CStoreCommand, unless the command cannot be casted in which case a std::bad_cast exception is thrown.

This method can be used with wrapper languages that don’t support downcast (e.g. Golang). Other languages can still use the downcast functionalities embedded into the language.

Return
the DimseCommand downcasted to a CStoreCommand

const CMoveCommand *getAsCMoveCommand() const

Downcast the DimseCommand to a CMoveCommand, unless the command cannot be casted in which case a std::bad_cast exception is thrown.

This method can be used with wrapper languages that don’t support downcast (e.g. Golang). Other languages can still use the downcast functionalities embedded into the language.

Return
the DimseCommand downcasted to a CMoveCommand

const CGetCommand *getAsCGetCommand() const

Downcast the DimseCommand to a CGetCommand, unless the command cannot be casted in which case a std::bad_cast exception is thrown.

This method can be used with wrapper languages that don’t support downcast (e.g. Golang). Other languages can still use the downcast functionalities embedded into the language.

Return
the DimseCommand downcasted to a CGetCommand

const CFindCommand *getAsCFindCommand() const

Downcast the DimseCommand to a CFindCommand, unless the command cannot be casted in which case a std::bad_cast exception is thrown.

This method can be used with wrapper languages that don’t support downcast (e.g. Golang). Other languages can still use the downcast functionalities embedded into the language.

Return
the DimseCommand downcasted to a CFindCommand

const CEchoCommand *getAsCEchoCommand() const

Downcast the DimseCommand to a CEchoCommand, unless the command cannot be casted in which case a std::bad_cast exception is thrown.

This method can be used with wrapper languages that don’t support downcast (e.g. Golang). Other languages can still use the downcast functionalities embedded into the language.

Return
the DimseCommand downcasted to a CEchoCommand

const CCancelCommand *getAsCCancelCommand() const

Downcast the DimseCommand to a CCancelCommand, unless the command cannot be casted in which case a std::bad_cast exception is thrown.

This method can be used with wrapper languages that don’t support downcast (e.g. Golang). Other languages can still use the downcast functionalities embedded into the language.

Return
the DimseCommand downcasted to a CCancelCommand

const NActionCommand *getAsNActionCommand() const

Downcast the DimseCommand to a NActionCommand, unless the command cannot be casted in which case a std::bad_cast exception is thrown.

This method can be used with wrapper languages that don’t support downcast (e.g. Golang). Other languages can still use the downcast functionalities embedded into the language.

Return
the DimseCommand downcasted to a NActionCommand

const NEventReportCommand *getAsNEventReportCommand() const

Downcast the DimseCommand to a NEventReportCommand, unless the command cannot be casted in which case a std::bad_cast exception is thrown.

This method can be used with wrapper languages that don’t support downcast (e.g. Golang). Other languages can still use the downcast functionalities embedded into the language.

Return
the DimseCommand downcasted to a NEventReportCommand

const NCreateCommand *getAsNCreateCommand() const

Downcast the DimseCommand to a NCreateCommand, unless the command cannot be casted in which case a std::bad_cast exception is thrown.

This method can be used with wrapper languages that don’t support downcast (e.g. Golang). Other languages can still use the downcast functionalities embedded into the language.

Return
the DimseCommand downcasted to a NCreateCommand

const NDeleteCommand *getAsNDeleteCommand() const

Downcast the DimseCommand to a NDeleteCommand, unless the command cannot be casted in which case a std::bad_cast exception is thrown.

This method can be used with wrapper languages that don’t support downcast (e.g. Golang). Other languages can still use the downcast functionalities embedded into the language.

Return
the DimseCommand downcasted to a NDeleteCommand

const NSetCommand *getAsNSetCommand() const

Downcast the DimseCommand to a NSetCommand, unless the command cannot be casted in which case a std::bad_cast exception is thrown.

This method can be used with wrapper languages that don’t support downcast (e.g. Golang). Other languages can still use the downcast functionalities embedded into the language.

Return
the DimseCommand downcasted to a NSetCommand

const NGetCommand *getAsNGetCommand() const

Downcast the DimseCommand to a NGetCommand, unless the command cannot be casted in which case a std::bad_cast exception is thrown.

This method can be used with wrapper languages that don’t support downcast (e.g. Golang). Other languages can still use the downcast functionalities embedded into the language.

Return
the DimseCommand downcasted to a NGetCommand

Objective-C/Swift

class ImebraDimseCommand : public ImebraDimseCommandBase

Base class for the DICOM commands.

Subclassed by ImebraCCancelCommand, ImebraCEchoCommand, ImebraCFindCommand, ImebraCGetCommand, ImebraCMoveCommand, ImebraCStoreCommand, ImebraNActionCommand, ImebraNCreateCommand, ImebraNDeleteCommand, ImebraNEventReportCommand, ImebraNGetCommand, ImebraNSetCommand

Property

property ImebraDimseCommand::ID

Returns the command ID.

property ImebraDimseCommand::commandType

Returns the command type.

DimseResponse

Objective-C/Swift

class ImebraDimseResponse : public ImebraDimseCommandBase

Base class for the DICOM responses.

Subclassed by ImebraCEchoResponse, ImebraCFindResponse, ImebraCPartialResponse, ImebraCStoreResponse, ImebraNActionResponse, ImebraNCreateResponse, ImebraNDeleteResponse, ImebraNEventReportResponse, ImebraNGetResponse, ImebraNSetResponse

Property

property ImebraDimseResponse::status

Returns the response status.

property ImebraDimseResponse::statusCode

Returns the response status code.

C-Commands and responses

DIMSE C-Commands classes

Class diagram of the DIMSE C commands classes

CStoreCommand

C++

class CStoreCommand : public imebra::DimseCommand

Represents a C-STORE request.

Public Functions

CStoreCommand(const std::string &abstractSyntax, std::uint16_t messageID, dimseCommandPriority_t priority, const std::string &affectedSopClassUid, const std::string &affectedSopInstanceUid, const std::string &originatorAET, std::uint16_t originatorMessageID, const DataSet &payload)

Constructor.

Parameters
  • abstractSyntax: the message’s abstract syntax (previously negotiated via the PresentationContexts parameter of the AssociationSCP or AssociationSCU constructors)
  • messageID: message ID (can be retrieved with DimseService::getNextCommandID()
  • priority: message priority
  • affectedSopClassUid: affected SOP instance UID
  • affectedSopInstanceUid: affected SOP instance UID
  • originatorAET: originator AET (issuer of the C-MOVE or C-GET command)
  • originatorMessageID: message ID of the C-MOVE or C-GET that triggered the C-STORE
  • payload: C-STORE payload

std::string getOriginatorAET() const

Returns the AET of the entity that triggered this C-STORE request either via a C-MOVE or a C-GET request.

Return
the AET for the entity that triggered this C-STORE request via a C-MOVE or a C-GET request. Can be empty.

std::uint16_t getOriginatorMessageID() const

Returns the message ID of the C-MOVE or C-GET request that triggered this C-STORE request.

Return
the message ID of the C-MOVE or C-GET request that triggered this C-STORE request. It is zero if it wasn’t set

Objective-C/Swift

class ImebraCStoreCommand : public ImebraDimseCommand

Represents a C-STORE request.

Public Functions

id ImebraCStoreCommand::initWithAbstractSyntax:messageID:priority:affectedSopClassUid:affectedSopInstanceUid:originatorAET:originatorMessageID:payload:(NSString * abstractSyntax, unsigned short messageID, ImebraDimseCommandPriority_t priority, NSString * affectedSopClassUid, NSString * affectedSopInstanceUid, NSString * originatorAET, unsigned short originatorMessageID, ImebraDataSet * pPayload)

Initializer.

Parameters
  • abstractSyntax: the message’s abstract syntax (previously negotiated via the ImebraPresentationContexts parameter of the ImebraAssociationSCP or ImebraAssociationSCU initializers)
  • messageID: message ID (can be retrieved with getNextCommandID (ImebraDimseService)
  • priority: message priority
  • affectedSopClassUid: affected SOP instance UID
  • affectedSopInstanceUid: affected SOP instance UID
  • originatorAET: originator AET (issuer of the C-MOVE or C-GET command)
  • originatorMessageID: message ID of the C-MOVE or C-GET that triggered the C-STORE
  • pPayload: C-STORE payload

Property

property ImebraCStoreCommand::originatorAET

Returns the AET of the entity that triggered this C-STORE request either via a C-MOVE or a C-GET request.

property ImebraCStoreCommand::originatorMessageID

Returns the message ID of the C-MOVE or C-GET request that triggered this C-STORE request.

CGetCommand

C++

class CGetCommand : public imebra::DimseCommand

Represents a C-GET command.

C-GET triggers a C-STORE command that is issued through the same association used for the C-GET, therefore the SCU must have negotiated the SCP role for the abstract syntax (see PresentationContexts and AssociationSCU).

Public Functions

CGetCommand(const std::string &abstractSyntax, std::uint16_t messageID, dimseCommandPriority_t priority, const std::string &affectedSopClassUid, const DataSet &identifier)

Constructor.

Parameters

Objective-C/Swift

class ImebraCGetCommand : public ImebraDimseCommand

Represents a C-GET command.

C-GET triggers a C-STORE command that is issued through the same association used for the C-GET, therefore the SCU must have negotiated the SCP role for the abstract syntax (see ImebraPresentationContexts and ImebraAssociationSCU).

Public Functions

id ImebraCGetCommand::initWithAbstractSyntax:messageID:priority:affectedSopClassUid:identifier:(NSString * abstractSyntax, unsigned short messageID, ImebraDimseCommandPriority_t priority, NSString * affectedSopClassUid, ImebraDataSet * pIdentifier)

Initializer.

Parameters

CFindCommand

C++

class CFindCommand : public imebra::DimseCommand

Represents a C-FIND command.

Public Functions

CFindCommand(const std::string &abstractSyntax, std::uint16_t messageID, dimseCommandPriority_t priority, const std::string &affectedSopClassUid, const DataSet &identifier)

Constructor.

Parameters
  • abstractSyntax: the message’s abstract syntax (previously negotiated via the PresentationContexts parameter of the AssociationSCP or AssociationSCU constructors)
  • messageID: message ID (can be retrieved with DimseService::getNextCommandID()
  • priority: the message priority
  • affectedSopClassUid: the affected SOP class UID
  • identifier: the dataset with the identifier (list of tags to match and their requested values)

Objective-C/Swift

class ImebraCFindCommand : public ImebraDimseCommand

Represents a C-FIND command.

Public Functions

id ImebraCFindCommand::initWithAbstractSyntax:messageID:priority:affectedSopClassUid:identifier:(NSString * abstractSyntax, unsigned short messageID, ImebraDimseCommandPriority_t priority, NSString * affectedSopClassUid, ImebraDataSet * pIdentifier)

Initializer.

Parameters

CMoveCommand

C++

class CMoveCommand : public imebra::DimseCommand

Represents a C-MOVE command.

Public Functions

CMoveCommand(const std::string &abstractSyntax, std::uint16_t messageID, dimseCommandPriority_t priority, const std::string &affectedSopClassUid, const std::string &destinationAET, const DataSet &identifier)

Constructor.

Parameters
  • abstractSyntax: the message’s abstract syntax (previously negotiated via the PresentationContexts parameter of the AssociationSCP or AssociationSCU constructors)
  • messageID: message ID (can be retrieved with DimseService::getNextCommandID()
  • priority: the message priority
  • affectedSopClassUid: affected SOP class UID
  • destinationAET: the destination AET
  • identifier: the dataset with the identifier (list of tags to match and their requested values)

std::string getDestinationAET() const

Returns the destination AET.

Return
the destination AET

Objective-C/Swift

class ImebraCMoveCommand : public ImebraDimseCommand

Represents a C-MOVE command.

Public Functions

id ImebraCMoveCommand::initWithAbstractSyntax:messageID:priority:affectedSopClassUid:destinationAET:identifier:(NSString * abstractSyntax, unsigned short messageID, ImebraDimseCommandPriority_t priority, NSString * affectedSopClassUid, NSString * destinationAET, ImebraDataSet * pIdentifier)

Initializer.

Parameters

NSString* ImebraCMoveCommand::getDestinationAET:((swift_error(nonnull_error)) __attribute__)

Returns the destination AET.

Return
the destination AET
Parameters
  • pError: set to ImebraMissingDataElementError if the data is missing

CEchoCommand

C++

class CEchoCommand : public imebra::DimseCommand

Represents a C-ECHO command.

Public Functions

CEchoCommand(const std::string &abstractSyntax, std::uint16_t messageID, dimseCommandPriority_t priority, const std::string &affectedSopClassUid)

Constructor.

Parameters

Objective-C/Swift

class ImebraCEchoCommand : public ImebraDimseCommand

Represents a C-ECHO command.

Public Functions

id ImebraCEchoCommand::initWithAbstractSyntax:messageID:priority:affectedSopClassUid:(NSString * abstractSyntax, unsigned short messageID, ImebraDimseCommandPriority_t priority, NSString * affectedSopClassUid)

Initializer.

Parameters

CCancelCommand

C++

class CCancelCommand : public imebra::DimseCommand

Represents the C-CANCEL command.

Public Functions

CCancelCommand(const std::string &abstractSyntax, std::uint16_t messageID, dimseCommandPriority_t priority, std::uint16_t cancelMessageID)

Constructor.

Parameters

std::uint16_t getCancelMessageID() const

Returns the ID of the message to cancel.

Return
the ID of the message to cancel

Objective-C/Swift

class ImebraCCancelCommand : public ImebraDimseCommand

Represents the C-CANCEL command.

Public Functions

id ImebraCCancelCommand::initWithAbstractSyntax:messageID:priority:cancelMessageID:(NSString * abstractSyntax, unsigned short messageID, ImebraDimseCommandPriority_t priority, unsigned short cancelMessageID)

Initializer.

Parameters

Property

property ImebraCCancelCommand::cancelMessageID

Returns the ID of the message to cancel.

CPartialResponse

C++

class CPartialResponse : public imebra::DimseResponse

Base class for all the partial responses (responses to C-GET, C-MOVE and C-FIND).

Subclassed by imebra::CGetResponse, imebra::CMoveResponse

Public Functions

std::uint32_t getRemainingSubOperations() const

Returns the number of remaining C-STORE sub operations.

Return
number of remaining C-STORE sub operations

std::uint32_t getCompletedSubOperations() const

Returns the number of completed C-STORE sub operations.

Return
number of completed C-STORE sub operations

std::uint32_t getFailedSubOperations() const

Returns the number of failed C-STORE sub operations.

Return
number of failed C-STORE sub operations

std::uint32_t getWarningSubOperations() const

Returns the number of C-STORE sub operations completed with warnings.

Return
number of C-STORE sub operations completed with warnings

Objective-C/Swift

class ImebraCPartialResponse : public ImebraDimseResponse

Base class for all the partial responses (responses to C-GET, C-MOVE and C-FIND).

Subclassed by ImebraCGetResponse, ImebraCMoveResponse

Public Functions

unsigned int ImebraCPartialResponse::getRemainingSubOperations:((swift_error(nonnull_error)) __attribute__)

Returns the number of remaining C-STORE sub operations.

Return
number of remaining C-STORE sub operations
Parameters
  • pError: set to ImebraMissingDataElementError if the data is missing

unsigned int ImebraCPartialResponse::getCompletedSubOperations:((swift_error(nonnull_error)) __attribute__)

Returns the number of completed C-STORE sub operations.

Return
number of completed C-STORE sub operations
Parameters
  • pError: set to ImebraMissingDataElementError if the data is missing

unsigned int ImebraCPartialResponse::getFailedSubOperations:((swift_error(nonnull_error)) __attribute__)

Returns the number of failed C-STORE sub operations.

Return
number of failed C-STORE sub operations
Parameters
  • pError: set to ImebraMissingDataElementError if the data is missing

unsigned int ImebraCPartialResponse::getWarningSubOperations:((swift_error(nonnull_error)) __attribute__)

Returns the number of C-STORE sub operations completed with warnings.

Return
number of C-STORE sub operations completed with warnings
Parameters
  • pError: set to ImebraMissingDataElementError if the data is missing

CStoreResponse

C++

class CStoreResponse : public imebra::DimseResponse

Represents a C-STORE response.

Public Functions

CStoreResponse(const CStoreCommand &command, dimseStatusCode_t responseCode)

Constructor.

Parameters
  • command: the C-STORE command for which this response is being constructed
  • responseCode: the response code.

Objective-C/Swift

class ImebraCStoreResponse : public ImebraDimseResponse

Represents a C-STORE response.

Public Functions

id ImebraCStoreResponse::initWithcommand:responseCode:(ImebraCStoreCommand * pReceivedCommand, ImebraDimseStatusCode_t responseCode)

Initializer.

Parameters
  • pReceivedCommand: the C-STORE command for which this response is being constructed
  • responseCode: the response code.

CGetResponse

C++

class CGetResponse : public imebra::CPartialResponse

Represents a C-GET response.

Public Functions

CGetResponse(const CGetCommand &receivedCommand, dimseStatusCode_t responseCode, std::uint32_t remainingSubOperations, std::uint32_t completedSubOperations, std::uint32_t failedSubOperations, std::uint32_t warningSubOperations, const DataSet &identifier)

Constructor to use when failed C-STORE operations are present.

This constructor should be used when the response code identifies a canceled operation, a failure, a refused operation or a warning.

Parameters
  • receivedCommand: the C-GET command for which this response is being constructed
  • responseCode: the response code.
  • remainingSubOperations: number of remaining C-STORE operations
  • completedSubOperations: number of completed C-STORE operations
  • failedSubOperations: number of failed C-STORE operations
  • warningSubOperations: number of C-STORE operations completed with warnings
  • identifier: DataSet with the list of failed instance UIDs in the tag FailedSOPInstanceUIDList (0008,0058)

CGetResponse(const CGetCommand &receivedCommand, dimseStatusCode_t responseCode, std::uint32_t remainingSubOperations, std::uint32_t completedSubOperations, std::uint32_t failedSubOperations, std::uint32_t warningSubOperations)

Constructor to use when all the C-STORE operations succeeded.

Parameters
  • receivedCommand: the C-GET command for which this response is being constructed
  • responseCode: the response code.
  • remainingSubOperations: number of remaining C-STORE operations
  • completedSubOperations: number of completed C-STORE operations
  • failedSubOperations: number of failed C-STORE operations
  • warningSubOperations: number of C-STORE operations completed with warnings

Objective-C/Swift

class ImebraCGetResponse : public ImebraCPartialResponse

Represents a C-GET response.

Public Functions

id ImebraCGetResponse::initWithCommand:responseCode:remainingSubOperations:completedSubOperations:failedSubOperations:warningSubOperations:identifier:(ImebraCGetCommand * pReceivedCommand, ImebraDimseStatusCode_t responseCode, unsigned int remainingSubOperations, unsigned int completedSubOperations, unsigned int failedSubOperations, unsigned int warningSubOperations, ImebraDataSet * pIdentifier)

Initializer to use when failed C-STORE operations are present.

This constructor should be used when the response code identifies a canceled operation, a failure, a refused operation or a warning.

Parameters
  • pReceivedCommand: the C-GET command for which this response is being constructed
  • responseCode: the response code.
  • remainingSubOperations: number of remaining C-STORE operations
  • completedSubOperations: number of completed C-STORE operations
  • failedSubOperations: number of failed C-STORE operations
  • warningSubOperations: number of C-STORE operations completed with warnings
  • pIdentifier: DataSet with the list of failed instance UIDs in the tag FailedSOPInstanceUIDList (0008,0058)

id ImebraCGetResponse::initWithcommand:responseCode:remainingSubOperations:completedSubOperations:failedSubOperations:warningSubOperations:(ImebraCGetCommand * pReceivedCommand, ImebraDimseStatusCode_t responseCode, unsigned int remainingSubOperations, unsigned int completedSubOperations, unsigned int failedSubOperations, unsigned int warningSubOperations)

Initializer.

Parameters
  • pReceivedCommand: the C-GET command for which this response is being constructed
  • responseCode: the response code.
  • remainingSubOperations: number of remaining C-STORE operations
  • completedSubOperations: number of completed C-STORE operations
  • failedSubOperations: number of failed C-STORE operations
  • warningSubOperations: number of C-STORE operations completed with warnings

CFindResponse

C++

class CFindResponse : public imebra::DimseResponse

Represents a C-FIND response.

Public Functions

CFindResponse(const CFindCommand &receivedCommand, const DataSet &identifier)

Constructor for responses with pending status.

Responses with pending status carry a DataSet with a single item from the C-FIND query results.

Parameters
  • receivedCommand: command for which the reponse is being constructed
  • identifier: one item from the C-FIND query results

CFindResponse(const CFindCommand &receivedCommand, dimseStatusCode_t responseCode)

Constructor for final C-FIND response (success or failure).

Parameters
  • receivedCommand: command for which the response is being constructed
  • responseCode: response code

Objective-C/Swift

class ImebraCFindResponse : public ImebraDimseResponse

Represents a C-FIND response.

Public Functions

id ImebraCFindResponse::initWithCommand:identifier:(ImebraCFindCommand * pReceivedCommand, ImebraDataSet * pIdentifier)

Initializer for responses with pending status.

Responses with pending status carry a ImebraDataSet with a single item from the C-FIND query results.

Parameters
  • receivedCommand: command for which the reponse is being constructed
  • identifier: one item from the C-FIND query results

id ImebraCFindResponse::initWithcommand:responseCode:(ImebraCFindCommand * pReceivedCommand, ImebraDimseStatusCode_t responseCode)

Initializer for final C-FIND response (success or failure).

Parameters
  • pReceivedCommand: command for which the response is being constructed
  • responseCode: response code

CMoveResponse

C++

class CMoveResponse : public imebra::CPartialResponse

Represents the C-MOVE response.

Public Functions

CMoveResponse(const CMoveCommand &receivedCommand, dimseStatusCode_t responseCode, std::uint32_t remainingSubOperations, std::uint32_t completedSubOperations, std::uint32_t failedSubOperations, std::uint32_t warningSubOperations, const DataSet &identifier)

Constructor to use when failed C-STORE operations are present.

This constructor should be used when the response code identifies a canceled operation, a failure, a refused operation or a warning.

Parameters
  • receivedCommand: the C-GET command for which this response is being constructed
  • responseCode: the response code.
  • remainingSubOperations: number of remaining C-STORE operations
  • completedSubOperations: number of completed C-STORE operations
  • failedSubOperations: number of failed C-STORE operations
  • warningSubOperations: number of C-STORE operations completed with warnings
  • identifier: DataSet with the list of failed instance UIDs in the tag FailedSOPInstanceUIDList (0008,0058)

CMoveResponse(const CMoveCommand &receivedCommand, dimseStatusCode_t responseCode, std::uint32_t remainingSubOperations, std::uint32_t completedSubOperations, std::uint32_t failedSubOperations, std::uint32_t warningSubOperations)

Constructor to use when all the C-STORE operations succeeded.

Parameters
  • receivedCommand: the C-GET command for which this response is being constructed
  • responseCode: the response code.
  • remainingSubOperations: number of remaining C-STORE operations
  • completedSubOperations: number of completed C-STORE operations
  • failedSubOperations: number of failed C-STORE operations
  • warningSubOperations: number of C-STORE operations completed with warnings

Objective-C/Swift

class ImebraCMoveResponse : public ImebraCPartialResponse

Represents the C-MOVE response.

Public Functions

id ImebraCMoveResponse::initWithCommand:responseCode:remainingSubOperations:completedSubOperations:failedSubOperations:warningSubOperations:identifier:(ImebraCMoveCommand * pReceivedCommand, ImebraDimseStatusCode_t responseCode, unsigned int remainingSubOperations, unsigned int completedSubOperations, unsigned int failedSubOperations, unsigned int warningSubOperations, ImebraDataSet * pIdentifier)

Initializer for failed C-STORE operations.

This constructor should be used when the response code identifies a canceled operation, a failure, a refused operation or a warning.

Parameters
  • pReceivedCommand: the C-GET command for which this response is being constructed
  • responseCode: the response code.
  • remainingSubOperations: number of remaining C-STORE operations
  • completedSubOperations: number of completed C-STORE operations
  • failedSubOperations: number of failed C-STORE operations
  • warningSubOperations: number of C-STORE operations completed with warnings
  • identifier: ImebraDataSet with the list of failed instance UIDs in the tag FailedSOPInstanceUIDList (0008,0058)

id ImebraCMoveResponse::initWithcommand:responseCode:remainingSubOperations:completedSubOperations:failedSubOperations:warningSubOperations:(ImebraCMoveCommand * pReceivedCommand, ImebraDimseStatusCode_t responseCode, unsigned int remainingSubOperations, unsigned int completedSubOperations, unsigned int failedSubOperations, unsigned int warningSubOperations)

Initializer.

Parameters
  • pReceivedCommand: the C-GET command for which this response is being constructed
  • responseCode: the response code.
  • remainingSubOperations: number of remaining C-STORE operations
  • completedSubOperations: number of completed C-STORE operations
  • failedSubOperations: number of failed C-STORE operations
  • warningSubOperations: number of C-STORE operations completed with warnings

CEchoResponse

C++

class CEchoResponse : public imebra::DimseResponse

Represents a C-ECHO response.

Public Functions

CEchoResponse(const CEchoCommand &receivedCommand, dimseStatusCode_t responseCode)

Constructor.

Parameters
  • receivedCommand: command for which the response is being constructed
  • responseCode: the response code

Objective-C/Swift

class ImebraCEchoResponse : public ImebraDimseResponse

Represents a C-ECHO response.

Public Functions

id ImebraCEchoResponse::initWithcommand:responseCode:(ImebraCEchoCommand * pReceivedCommand, ImebraDimseStatusCode_t responseCode)

Initializer.

Parameters
  • pReceivedCommand: command for which the response is being constructed
  • responseCode: the response code

N-Commands and responses

DIMSE C-Commands classes

Class diagram of the DIMSE N commands classes

NEventReportCommand

C++

class NEventReportCommand : public imebra::DimseCommand

Represents a N-EVENT-REPORT command.

Public Functions

NEventReportCommand(const std::string &abstractSyntax, std::uint16_t messageID, const std::string &affectedSopClassUid, const std::string &affectedSopInstanceUid, std::uint16_t eventID)

Constructor.

Parameters

NEventReportCommand(const std::string &abstractSyntax, std::uint16_t messageID, const std::string &affectedSopClassUid, const std::string &affectedSopInstanceUid, std::uint16_t eventID, const DataSet &eventInformation)

Constructor.

Parameters
  • abstractSyntax: the message’s abstract syntax (previously negotiated via the PresentationContexts parameter of the AssociationSCP or AssociationSCU constructors)
  • messageID: message ID (can be retrieved with DimseService::getNextCommandID()
  • affectedSopClassUid: the affected SOP class UID
  • affectedSopInstanceUid: the affected SOP instance UID
  • eventID: the event ID
  • pEventInformation: the dataset with event information

std::uint16_t getEventID() const

Returns the event ID.

Return
the event ID

Objective-C/Swift

class ImebraNEventReportCommand : public ImebraDimseCommand

Represents a N-EVENT-REPORT command.

Public Functions

id ImebraNEventReportCommand::initWithAbstractSyntax:messageID:affectedSopClassUid:affectedSopInstanceUid:eventID:(NSString * abstractSyntax, unsigned short messageID, NSString * affectedSopClassUid, NSString * affectedSopInstanceUid, unsigned short eventID)

Initializer.

Parameters

id ImebraNEventReportCommand::initWithAbstractSyntax:messageID:affectedSopClassUid:affectedSopInstanceUid:eventID:eventInformation:(NSString * abstractSyntax, unsigned short messageID, NSString * affectedSopClassUid, NSString * affectedSopInstanceUid, unsigned short eventID, ImebraDataSet * pEventInformation)

Initializer.

Parameters
  • abstractSyntax: the message’s abstract syntax (previously negotiated via the ImebraPresentationContexts parameter of the ImebraAssociationSCP or ImebraAssociationSCU initializers)
  • messageID: message ID (can be retrieved with DimseService::getNextCommandID()
  • affectedSopClassUid: the affected SOP class UID
  • affectedSopInstanceUid: the affected SOP instance UID
  • eventID: the event ID
  • pEventInformation: the dataset with event information

Property

property ImebraNEventReportCommand::eventID

Returns the event ID.

NSetCommand

C++

class NSetCommand : public imebra::DimseCommand

Represents the N-SET command.

Public Functions

NSetCommand(const std::string &abstractSyntax, std::uint16_t messageID, const std::string &requestedSopClassUid, const std::string &requestedSopInstanceUid, const DataSet &modificationList)

Constructor.

Parameters
  • abstractSyntax: the message’s abstract syntax (previously negotiated via the PresentationContexts parameter of the AssociationSCP or AssociationSCU constructors)
  • messageID: message ID (can be retrieved with DimseService::getNextCommandID()
  • requestedSopClassUid: the requested SOP class UID
  • requestedSopInstanceUid: the requested SOP instance UID
  • modificationList: dataset containing the new attributes values

Objective-C/Swift

class ImebraNSetCommand : public ImebraDimseCommand

Represents the N-SET command.

Public Functions

id ImebraNSetCommand::initWithAbstractSyntax:messageID:requestedSopClassUid:requestedSopInstanceUid:modificationList:(NSString * abstractSyntax, unsigned short messageID, NSString * requestedSopClassUid, NSString * requestedSopInstanceUid, ImebraDataSet * pModificationList)

Initializer.

Parameters

NGetCommand

C++

class NGetCommand : public imebra::DimseCommand

Represents a N-GET command.

Public Functions

NGetCommand(const std::string &abstractSyntax, std::uint16_t messageID, const std::string &requestedSopClassUid, const std::string &requestedSopInstanceUid, const attributeIdentifierList_t &attributeIdentifierList)

Constructor.

Parameters
  • abstractSyntax: the message’s abstract syntax (previously negotiated via the PresentationContexts parameter of the AssociationSCP or AssociationSCU constructors)
  • messageID: message ID (can be retrieved with DimseService::getNextCommandID()
  • requestedSopClassUid: the requested SOP class UID
  • requestedSopInstanceUid: the requested SOP instance UID
  • attributeIdentifierList:

    the list of identifier tags. An empty list means “all the

    tags”

attributeIdentifierList_t getAttributeList() const

Return the list of attributes to retrieve. an empty list means all.

Return
the list of attributes to retrieve. An empty list means “all the attributes”

Objective-C/Swift

class ImebraNGetCommand : public ImebraDimseCommand

Represents a N-GET command.

Public Functions

id ImebraNGetCommand::initWithAbstractSyntax:messageID:requestedSopClassUid:requestedSopInstanceUid:attributeIdentifierList:(NSString * abstractSyntax, unsigned short messageID, NSString * requestedSopClassUid, NSString * requestedSopInstanceUid, NSArray * attributeIdentifierList)

Initializes the N-GET command.

Parameters

Property

property ImebraNGetCommand::attributeList

Return the list of tags to retrieve. an empty list means all the tags.

The returned NSArray object is filled with ImebraTagId objects.

NActionCommand

C++

class NActionCommand : public imebra::DimseCommand

Represents the N-ACTION command.

Public Functions

NActionCommand(const std::string &abstractSyntax, std::uint16_t messageID, const std::string &requestedSopClassUid, const std::string &requestedSopInstanceUid, std::uint16_t actionID, const DataSet &actionInformation)

Constructor.

Parameters
  • abstractSyntax: the message’s abstract syntax (previously negotiated via the PresentationContexts parameter of the AssociationSCP or AssociationSCU constructors)
  • messageID: message ID (can be retrieved with DimseService::getNextCommandID()
  • requestedSopClassUid: the requested SOP class UID
  • requestedSopInstanceUid: the requested SOP instance UID
  • actionID: action ID
  • actionInformation: dataset containing information about the action

NActionCommand(const std::string &abstractSyntax, std::uint16_t messageID, const std::string &requestedSopClassUid, const std::string &requestedSopInstanceUid, std::uint16_t actionID)

Constructor.

Parameters

std::uint16_t getActionID() const

Returns the action’s ID.

Return
the action’s ID

Objective-C/Swift

class ImebraNActionCommand : public ImebraDimseCommand

Represents the N-ACTION command.

Public Functions

id ImebraNActionCommand::initWithAbstractSyntax:messageID:requestedSopClassUid:requestedSopInstanceUid:actionID:actionInformation:(NSString * abstractSyntax, unsigned short messageID, NSString * requestedSopClassUid, NSString * requestedSopInstanceUid, unsigned short actionID, ImebraDataSet * pActionInformation)

Initializer.

Parameters

id ImebraNActionCommand::initWithAbstractSyntax:messageID:requestedSopClassUid:requestedSopInstanceUid:actionID:(NSString * abstractSyntax, unsigned short messageID, NSString * requestedSopClassUid, NSString * requestedSopInstanceUid, unsigned short actionID)

Initializer.

Parameters

Property

property ImebraNActionCommand::actionID

Returns the action’s ID.

NCreateCommand

C++

class NCreateCommand : public imebra::DimseCommand

The N-CREATE command.

Public Functions

NCreateCommand(const std::string &abstractSyntax, std::uint16_t messageID, const std::string &affectedSopClassUid, const std::string &affectedSopInstanceUid, const DataSet &attributeList)

Constructor.

Parameters
  • abstractSyntax: the message’s abstract syntax (previously negotiated via the PresentationContexts parameter of the AssociationSCP or AssociationSCU constructors)
  • messageID: message ID (can be retrieved with DimseService::getNextCommandID()
  • affectedSopClassUid: the affected SOP class UID
  • affectedSopInstanceUid: the affected SOP instance UID
  • attributeList: the dataset containing the attributes and values

NCreateCommand(const std::string &abstractSyntax, std::uint16_t messageID, const std::string &affectedSopClassUid, const std::string &affectedSopInstanceUid)

Constructor.

Parameters

Objective-C/Swift

class ImebraNCreateCommand : public ImebraDimseCommand

The N-CREATE command.

Public Functions

id ImebraNCreateCommand::initWithAbstractSyntax:messageID:affectedSopClassUid:affectedSopInstanceUid:attributeList:(NSString * abstractSyntax, unsigned short messageID, NSString * affectedSopClassUid, NSString * affectedSopInstanceUid, ImebraDataSet * pAttributeList)

Initializer.

Parameters

id ImebraNCreateCommand::initWithAbstractSyntax:messageID:affectedSopClassUid:affectedSopInstanceUid:(NSString * abstractSyntax, unsigned short messageID, NSString * affectedSopClassUid, NSString * affectedSopInstanceUid)

Initializer.

Parameters

NDeleteCommand

C++

class NDeleteCommand : public imebra::DimseCommand

The N-DELETE command.

Public Functions

NDeleteCommand(const std::string &abstractSyntax, std::uint16_t messageID, const std::string &requestedSopClassUid, const std::string &requestedSopInstanceUid)

Constructor.

Parameters

Objective-C/Swift

class ImebraNDeleteCommand : public ImebraDimseCommand

The N-DELETE command.

Public Functions

id ImebraNDeleteCommand::initWithAbstractSyntax:messageID:requestedSopClassUid:requestedSopInstanceUid:(NSString * abstractSyntax, unsigned short messageID, NSString * requestedSopClassUid, NSString * requestedSopInstanceUid)

Initializer.

Parameters

NEventReportResponse

C++

class NEventReportResponse : public imebra::DimseResponse

N-EVENT-REPORT response.

Public Functions

NEventReportResponse(const NEventReportCommand &receivedCommand, const DataSet &eventReply)

Constructor which includes a payload. This implies a successful operation.

Parameters
  • receivedCommand: the N-EVENT request command for which the response is being constructed
  • eventReply: the response payload

NEventReportResponse(const NEventReportCommand &receivedCommand, dimseStatusCode_t responseCode)

Constructor.

Parameters
  • receivedCommand: the N-EVENT request command for which the response is being constructed
  • responseCode: the response code

std::uint16_t getEventID() const

Get the event ID. The response may omit this information.

Return
the event ID

Objective-C/Swift

class ImebraNEventReportResponse : public ImebraDimseResponse

N-EVENT-REPORT response.

Public Functions

id ImebraNEventReportResponse::initWithCommand:eventReply:(ImebraNEventReportCommand * pReceivedCommand, ImebraDataSet * pEventReply)

Initializer which includes a payload. This implies a successful operation.

Parameters
  • pReceivedCommand: the N-EVENT request command for which the response is being constructed
  • pEventReply: the response payload

id ImebraNEventReportResponse::initWithcommand:responseCode:(ImebraNEventReportCommand * pReceivedCommand, ImebraDimseStatusCode_t responseCode)

Initializer.

Parameters
  • pReceivedCommand: the N-EVENT request command for which the response is being constructed
  • responseCode: the response code

Property

property ImebraNEventReportResponse::eventID

Get the event ID. The response may omit this information.

NSetResponse

C++

class NSetResponse : public imebra::DimseResponse

Represents the N-SET response.

Public Functions

NSetResponse(const NSetCommand &receivedCommand, attributeIdentifierList_t modifiedAttributes)

Constructor of a successful response.

Parameters
  • receivedCommand: the command for which this response is being constructed
  • modifiedAttributes: list of modified attributes

NSetResponse(const NSetCommand &receivedCommand, dimseStatusCode_t responseCode)

Constructor.

Parameters
  • receivedCommand: the command for which this response is being constructed
  • responseCode: response code

attributeIdentifierList_t getModifiedAttributes() const

Returns the list of modified attributes.

Return
list of modified attributes

Objective-C/Swift

class ImebraNSetResponse : public ImebraDimseResponse

Represents the N-SET response.

Public Functions

id ImebraNSetResponse::initWithCommand:modifiedAttributes:(ImebraNSetCommand * pReceivedCommand, NSArray * pModifiedAttributes)

Initializer of a successful response.

Parameters
  • pReceivedCommand: the command for which this response is being constructed
  • pModifiedAttributes: list of modified attributes. A NSArray of ImebraTagId objects

id ImebraNSetResponse::initWithcommand:responseCode:(ImebraNSetCommand * pReceivedCommand, ImebraDimseStatusCode_t responseCode)

Initializer.

Parameters
  • pReceivedCommand: the command for which this response is being constructed
  • responseCode: response code

Property

property ImebraNSetResponse::modifiedAttributes

Returns the list of modified attributes. A NSArray of ImebraTagId objects.

NGetResponse

C++

class NGetResponse : public imebra::DimseResponse

Represents a N-GET response.

Public Functions

NGetResponse(const NGetCommand &receivedCommand, dimseStatusCode_t responseCode, const DataSet &attributeList)

Constructor.

Parameters
  • receivedCommand: command for which the response is being constructed
  • responseCode: response code
  • attributeList: dataset containing the list of attribute identifiers

NGetResponse(const NGetCommand &receivedCommand, dimseStatusCode_t responseCode)

Constructor.

Parameters
  • receivedCommand: command for which the response is being constructed
  • responseCode: response code

Objective-C/Swift

class ImebraNGetResponse : public ImebraDimseResponse

Represents a N-GET response.

Public Functions

id ImebraNGetResponse::initWithCommand:responseCode:attributeList:(ImebraNGetCommand * pReceivedCommand, ImebraDimseStatusCode_t responseCode, ImebraDataSet * pAttributeList)

Initializer.

Parameters
  • pReceivedCommand: command for which the response is being constructed
  • responseCode: response code
  • pAttributeList: dataset containing the list of attribute identifiers

id ImebraNGetResponse::initWithcommand:responseCode:(ImebraNGetCommand * pReceivedCommand, ImebraDimseStatusCode_t responseCode)

Initializer.

Parameters
  • pReceivedCommand: command for which the response is being constructed
  • responseCode: response code

NActionResponse

C++

class NActionResponse : public imebra::DimseResponse

Represents the N-ACTION response.

Public Functions

NActionResponse(const NActionCommand &receivedCommand, const DataSet &actionReply)

Constructor for a successful reply.

Parameters
  • receivedCommand: the command for which this response is being constructed
  • actionReply: dataSet with information about the action reply

NActionResponse(const NActionCommand &receivedCommand, dimseStatusCode_t responseCode)

Constructor for a successful reply.

Parameters
  • receivedCommand: the command for which this response is being constructed
  • responseCode: the response code

std::uint16_t getActionID() const

Returns the action’s ID.

Return
the action’s ID

Objective-C/Swift

class ImebraNActionResponse : public ImebraDimseResponse

Represents the N-ACTION response.

Public Functions

id ImebraNActionResponse::initWithCommand:actionReply:(ImebraNActionCommand * pReceivedCommand, ImebraDataSet * pActionReply)

Initializer for a successful reply.

Parameters
  • pReceivedCommand: the command for which this response is being constructed
  • pActionReply: dataSet with information about the action reply

id ImebraNActionResponse::initWithcommand:responseCode:(ImebraNActionCommand * pReceivedCommand, ImebraDimseStatusCode_t responseCode)

Initializer.

Parameters
  • pReceivedCommand: the command for which this response is being constructed
  • responseCode: the response code

Property

property ImebraNActionResponse::actionID

Returns the action’s ID.

NCreateResponse

C++

class NCreateResponse : public imebra::DimseResponse

Represents the N-CREATE response.

Public Functions

NCreateResponse(const NCreateCommand &receivedCommand, const DataSet &attributeList)

Constructor.

Parameters
  • receivedCommand: command for which the response is being constructed
  • attributeList: dataset containing the attributes list

NCreateResponse(const NCreateCommand &receivedCommand, const std::string &affectedSopInstanceUid, const DataSet &attributeList)

Constructor.

Parameters
  • receivedCommand: command for which the response is being constructed
  • affectedSopInstanceUid: affected SOP instance UID
  • attributeList: dataset containing the attributes list

NCreateResponse(const NCreateCommand &receivedCommand, dimseStatusCode_t responseCode)

Constructor.

Parameters
  • receivedCommand: command for which the response is being constructed
  • responseCode: the response code

NCreateResponse(const NCreateCommand &receivedCommand, const std::string &affectedSopInstanceUid)

Constructor.

Parameters
  • receivedCommand: command for which the response is being constructed
  • affectedSopInstanceUid: created SOP instance UID

Objective-C/Swift

class ImebraNCreateResponse : public ImebraDimseResponse

Represents the N-CREATE response.

Public Functions

id ImebraNCreateResponse::initWithCommand:attributeList:(ImebraNCreateCommand * pReceivedCommand, ImebraDataSet * pAttributeList)

Initializer.

Parameters
  • pReceivedCommand: command for which the response is being constructed
  • pAttributeList: dataset containing the attributes list

id ImebraNCreateResponse::initWithCommand:affectedSopInstanceUid:attributeList:(ImebraNCreateCommand * pReceivedCommand, NSString * affectedSopInstanceUid, ImebraDataSet * pAttributeList)

Initializer.

Parameters
  • pReceivedCommand: command for which the response is being constructed
  • affectedSopInstanceUid: affected SOP instance UID
  • pAttributeList: dataset containing the attributes list

id ImebraNCreateResponse::initWithCommand:affectedSopInstanceUid:(ImebraNCreateCommand * pReceivedCommand, NSString * affectedSopInstanceUid)

Constructor.

Parameters
  • pReceivedCommand: command for which the response is being constructed
  • affectedSopInstanceUid: created SOP instance UID

id ImebraNCreateResponse::initWithcommand:responseCode:(ImebraNCreateCommand * pReceivedCommand, ImebraDimseStatusCode_t responseCode)

Constructor.

Parameters
  • pReceivedCommand: command for which the response is being constructed
  • responseCode: the response code

NDeleteResponse

C++

class NDeleteResponse : public imebra::DimseResponse

The N-DELETE response.

Public Functions

NDeleteResponse(NDeleteCommand &receivedCommand, dimseStatusCode_t responseCode)

Constructor.

Parameters
  • receivedCommand: command for which the response is being constructed
  • responseCode: response code

Objective-C/Swift

class ImebraNDeleteResponse : public ImebraDimseResponse

The N-DELETE response.

Public Functions

id ImebraNDeleteResponse::initWithcommand:responseCode:(ImebraNDeleteCommand * pReceivedCommand, ImebraDimseStatusCode_t responseCode)

Initializer.

Parameters
  • pReceivedCommand: command for which the response is being constructed
  • responseCode: response code