Skip to content

problem in retrieving images from DICOM server #1056

@alireza-alv

Description

@alireza-alv

for making a dicom client, i used c-move and permenant storage scp with diifferent AET and port. but i still can't retrieve images from CONQUEST dicom server.
these are the related parts:

STORAGE_SCP_AET = "MYCLIENT_SCP"
def start_storage_scp(config):
    global storage_scp_running, storage_scp_instance
  
    try:
        handlers = [(evt.EVT_C_STORE, lambda e: handle_store_event(e, config))]
        ae = AE(ae_title=STORAGE_SCP_AET)
   
 
        def run_scp():
            global storage_scp_running
            try:
                ae.start_server(
                    ("0.0.0.0", 11113),
                    block=True,
                    evt_handlers=handlers
                )
            except Exception as e:
                LOGGER.error(f"SCP server error: {e}")
            finally:
                storage_scp_running = False

def retrieve_study(config, study_uid, patient_id, patient_name=""):
    try:
        query_ae = build_ae(config["ClientAET"], config)
        assoc = assoc_retry(
            query_ae,
            config["ServerIP"], 
            config["ServerPORT"], 
            config["ServerAET"],
            retries=config.get("move_retries", 3),
            delay=2
        )

        ds = Dataset()
        ds.QueryRetrieveLevel = "STUDY"
        ds.StudyInstanceUID = study_uid

        responses = assoc.send_c_move( 
            ds,
            move_aet=STORAGE_SCP_AET,
            query_model=StudyRootQueryRetrieveInformationModelMove
        )

        
        assoc.release()

Also this is my log:

INFO:pynetdicom.acse:Accepting Association
INFO:pynetdicom.association:Move SCP Response: 1 - 0xFF00 (Pending)
INFO:pynetdicom.association:Association Released
INFO:pynetdicom.association:Sub-Operations Remaining: 0, Completed: 1, Failed: 1, Warning: 0
INFO:phoenix_client:C-MOVE status: 0xFF00
INFO:pynetdicom.association:Move SCP Result: 0x0000 (Success)
INFO:pynetdicom.association:Sub-Operations Remaining: 0, Completed: 1, Failed: 1, Warning: 0
INFO:phoenix_client:C-MOVE status: 0x0000
INFO:pynetdicom.association:Releasing Association
INFO:phoenix_client:C-MOVE completed with final status

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions