I'm using PyNetDicom to download (C-MOVE) images from a PACS server. I've implemented a SCU that sends C-MOVE requests to PACS, and a SCP that receives the C-STORE requests.
I download entire studies, meaning a few thousand DICOM images at a time. For some reason, I fail to receive some of them. The responses I get from the C-MOVE requests shows how many images were sent successfully and how many failed (as well as how many are in progress, plus any warnings).
I'd like to know not only how many failed, but also which ones failed, meaning I want to get the Failed SOP Instance UID List. This is the relevant part of my code:
# Not shown: Implementation of association (assoc) and making a dataset to query PACS (query_dataset)
responses = assoc.send_c_move(query_dataset, b'NAME_OF_STORAGE_SCP', StudyRootQueryRetrieveInformationModelMove)
for (status, identifier) in responses:
# This works
remaining_operations = status.NumberOfRemainingOperations
completed_operations = status.NumberOfCompletedOperations
failed_operations = status.NumberOfFailedOperations
warning_operations = status.NumberOfWarningOperations
if identifier:
failed_UID_list = identifier.FailedSOPInstanceUIDList # This does not work
This does not work, the identifier is always None
, even when status.Status
shows that the operation failed. Am I doing something wrong, or is the PACS I'm associating with not DICOM-compliant?