Exemplo n.º 1
0
 def __init__(self, folder):
     super(FindSCP, self).__init__(supported_abstract_syntaxes = [
                                     get_uid("Patient Root Query/Retrieve Information Model - FIND"),
                                     get_uid("Study Root Query/Retrieve Information Model - FIND"),
                                     get_uid("Patient/Study Only Query/Retrieve Information Model  - FIND"),
                                     get_uid("Modality Worklist Information Model - FIND"),
                                     get_uid("Verification SOP Class"),
                                   ])
     self.folder = folder
Exemplo n.º 2
0
 def __init__(self, folder, move_destinations):
     super(QRSCP, self).__init__(supported_abstract_syntaxes = [
                                     get_uid("Patient Root Query/Retrieve Information Model - FIND"),
                                     get_uid("Patient Root Query/Retrieve Information Model - MOVE"),
                                     get_uid("Study Root Query/Retrieve Information Model - FIND"),
                                     get_uid("Study Root Query/Retrieve Information Model - MOVE"),
                                     get_uid("Verification SOP Class")])
     self.folder = folder
     self.move_destinations = move_destinations
Exemplo n.º 3
0
 def __init__(self, folder):
     super(FindSCP, self).__init__(supported_abstract_syntaxes=[
         get_uid("Patient Root Query/Retrieve Information Model - FIND"),
         get_uid("Study Root Query/Retrieve Information Model - FIND"),
         get_uid(
             "Patient/Study Only Query/Retrieve Information Model  - FIND"),
         get_uid("Modality Worklist Information Model - FIND"),
         get_uid("Verification SOP Class"),
     ])
     self.folder = folder
Exemplo n.º 4
0
 def __init__(self, folder, move_destinations):
     super(QRSCP, self).__init__(supported_abstract_syntaxes=[
         get_uid("Patient Root Query/Retrieve Information Model - FIND"),
         get_uid("Patient Root Query/Retrieve Information Model - MOVE"),
         get_uid("Study Root Query/Retrieve Information Model - FIND"),
         get_uid("Study Root Query/Retrieve Information Model - MOVE"),
         get_uid("Verification SOP Class")
     ])
     self.folder = folder
     self.move_destinations = move_destinations
Exemplo n.º 5
0
 def A_ASSOCIATE_confirmation_accept_indicated(self, a_associate_ac):
     super(FindSCU, self).A_ASSOCIATE_confirmation_accept_indicated(a_associate_ac)
     log.msg("indicate_A_ASSOCIATE_confirmation_accept")
     log.msg("responding with C-FIND-RQ %s." % self.query)
     rq = dimsemessages.C_FIND_RQ(affected_sop_class_uid = get_uid("Patient Root Query/Retrieve Information Model - FIND"),
                                   message_id = 1)
     self.send_DIMSE_command(1, rq, self.query)
Exemplo n.º 6
0
 def __init__(self, tags):
     super(FindSCU, self).__init__(supported_abstract_syntaxes=[
         get_uid("Patient Root Query/Retrieve Information Model - FIND")
     ])
     self.query = dicom.dataset.Dataset()
     for key, value in tags.iteritems():
         setattr(self.query, key, value)
Exemplo n.º 7
0
 def pack(self):
     ds = dicom.dataset.Dataset()
     sop_class_uid = get_uid("Verification SOP Class")
     ds.AffectedSOPClassUID = sop_class_uid
     ds.CommandField = commands[C_ECHO_RQ]
     ds.MessageID = self.message_id
     ds.CommandDataSetType = 0x0101
     return pack_dataset_with_commandgrouplength(ds)
Exemplo n.º 8
0
 def pack(self):
     ds = dicom.dataset.Dataset()
     sop_class_uid = get_uid("Verification SOP Class")
     ds.AffectedSOPClassUID = sop_class_uid
     ds.CommandField = commands[C_ECHO_RQ]
     ds.MessageID = self.message_id
     ds.CommandDataSetType = 0x0101
     return pack_dataset_with_commandgrouplength(ds)
Exemplo n.º 9
0
 def pack(self):
     ds = dicom.dataset.Dataset()
     sop_class_uid = get_uid("Verification SOP Class")
     ds.AffectedSOPClassUID = sop_class_uid
     ds.CommandField = commands[C_ECHO_RSP]
     ds.MessageIDBeingRespondedTo = self.message_id_being_responded_to
     ds.CommandDataSetType = 0x0101
     ds.Status = self.status
     return pack_dataset_with_commandgrouplength(ds)
Exemplo n.º 10
0
 def pack(self):
     ds = dicom.dataset.Dataset()
     sop_class_uid = get_uid("Verification SOP Class")
     ds.AffectedSOPClassUID = sop_class_uid
     ds.CommandField = commands[C_ECHO_RSP]
     ds.MessageIDBeingRespondedTo = self.message_id_being_responded_to
     ds.CommandDataSetType = 0x0101
     ds.Status = self.status
     return pack_dataset_with_commandgrouplength(ds)
Exemplo n.º 11
0
 def A_ASSOCIATE_confirmation_accept_indicated(self, a_associate_ac):
     super(FindSCU,
           self).A_ASSOCIATE_confirmation_accept_indicated(a_associate_ac)
     log.msg("indicate_A_ASSOCIATE_confirmation_accept")
     log.msg("responding with C-FIND-RQ %s." % self.query)
     rq = dimsemessages.C_FIND_RQ(affected_sop_class_uid=get_uid(
         "Patient Root Query/Retrieve Information Model - FIND"),
                                  message_id=1)
     self.send_DIMSE_command(1, rq, self.query)
Exemplo n.º 12
0
 def __init__(self, tags):
     super(FindSCU, self).__init__(supported_abstract_syntaxes = [get_uid("Patient Root Query/Retrieve Information Model - FIND")])
     self.query = dicom.dataset.Dataset()
     for key, value in tags.iteritems():
         setattr(self.query, key, value)
Exemplo n.º 13
0
 def unpack(self, ds):
     assert ds.CommandField == commands[C_ECHO_RSP]
     assert ds.CommandDataSetType == 0x0101
     assert ds.AffectedSOPClassUID == get_uid("Verification SOP Class")
     self.status = ds.Status
     self.message_id_being_responded_to = ds.MessageIDBeingRespondedTo
Exemplo n.º 14
0
 def unpack(self, ds):
     assert ds.CommandField == commands[C_ECHO_RQ]
     assert ds.CommandDataSetType == 0x0101
     assert ds.AffectedSOPClassUID == get_uid("Verification SOP Class")
     self.message_id = ds.MessageID
Exemplo n.º 15
0
 def __init__(self):
     super(EchoSCP, self).__init__(supported_abstract_syntaxes = [get_uid("Verification SOP Class")])
Exemplo n.º 16
0
 def __init__(self):
     super(EchoSCU, self).__init__(supported_abstract_syntaxes = [get_uid("Verification SOP Class")])
     self.received_c_echo_rsp = False
Exemplo n.º 17
0
 def __init__(self):
     super(EchoSCP, self).__init__(
         supported_abstract_syntaxes=[get_uid("Verification SOP Class")])
Exemplo n.º 18
0
 def unpack(self, ds):
     assert ds.CommandField == commands[C_ECHO_RQ]
     assert ds.CommandDataSetType == 0x0101
     assert ds.AffectedSOPClassUID == get_uid("Verification SOP Class")
     self.message_id = ds.MessageID
Exemplo n.º 19
0
 def __init__(self):
     super(EchoSCU, self).__init__(
         supported_abstract_syntaxes=[get_uid("Verification SOP Class")])
     self.received_c_echo_rsp = False
Exemplo n.º 20
0
 def unpack(self, ds):
     assert ds.CommandField == commands[C_ECHO_RSP]
     assert ds.CommandDataSetType == 0x0101
     assert ds.AffectedSOPClassUID == get_uid("Verification SOP Class")
     self.status = ds.Status
     self.message_id_being_responded_to = ds.MessageIDBeingRespondedTo
Exemplo n.º 21
0
 def __init__(self):
     upper_layer.DICOMUpperLayerServiceProvider.__init__(self,
                                                         supported_abstract_syntaxes = [get_uid("RT Plan Storage")])
     self._called_methods = []
     self.transport = proto_helpers.StringTransport()
     self.called_ae_title = "hej"
     self.calling_ae_title = "bla"
     self.presentation_contexts_requested = self.get_presentation_contexts()
     self.presentation_contexts_accepted = self.validate_presentation_contexts(pdu.A_ASSOCIATE_RQ(presentation_context_items = self.get_presentation_contexts()))
     self.user_information_item_accepted = pdu.UserInformationItem(self.get_application_association_information())