I can't download a study using a python script

Hi,

I have configured a a Python script as DICOM modality (orthanc.json). However, when trying to configure the SOPClassUID in the orthanc.json file, I couldn’t find a specific group or setting related to SOPClassUID to define the types of studies allowed for download. Also, I tried to accomplish a C-FIND request showing the Accession Number, StudyInstanceUID, PatientName and StudyDate, and as a result only shows the PatientName.

The expected behavior is to download a specific study to a given path, but when I check the server terminal, I see the following error message (several times):

Error in the network protocol: DicomAssociation - connecting to AET “myAET”: TCP Initialization Error: The operation completed successfully. (Timeout)
E0925 12:37:20.680832 DICOM-1 OrthancGetRequestHandler.cpp:375] C-GET SCP: Store Failed: Response Status: Refused: SOPClassNotSupported

I’m using Orthanc version 1.12.4 on a Windows 10 server.

I would appreciate any guidance on how to resolve this issue.

Hello,

Please provide a minimal working example for other people to reproduce your issue, otherwise nobody will be able to help you.

BTW, there is no option SOPClassUID in orthanc.json.

Regards,
Sébastien-

So… there is no solution for this issue?

Not as long as you don’t provide a full minimal working example. Where is the DICOM file?

I cannot provide a DICOM file because the website does not allow me to upload it. There are some screenshots to show that the DICOM file I’m trying to upload is really a DICOM file.


![the image is DICOM|690x367]
(upload://79JmcnXAJuFvFjuXpa5p5KAR2lU.jpeg)
the study is uploaded

As I mentioned in my previous response, it would be great if it works with any type of study (CT, PT, MR, MG, US, …). I’m particularly interested in ensuring that it works with MG and US studies.

Let me know if you need any more information and if is absolutely necessary how to upload a DICOM file to make the example.

You have not provided more information in response to my previous post, so yes, we need more information.

In my first post I send the json configuration file (which you have to change only the path of your orthanc server storage file (“StorageDirectory” : “path\to\costum\storage\file\OrthancSTORAGE”, and “IndexDirectory” : “path\to\costum\storage\file\OrthancSTORAGE”), set the DicomModality which is set like this ‘“PythonClient” : [ “python_AET”, “modality_ip”, 104 ]’ and the same configuration must be set in the python script which, I think, is well marked:

pacs_ip = ‘your_pacs_ip’
pacs_port = int(“your pacs port”)
pacs_aet = ‘ORTHANC’

Configuraciones del cliente (modalidad Python)

ip_local = “your_modality_ip”
python_aet = ‘your_modality_aet’
python_port = 104

study_instance_uid = “put your own study_instance_uid”

output_directory = r’path\where\the\study\should\be\downloaded’

And that’s all. It seems to me that I have provided all the necessary information, except for one DICOM study (which I cannot upload).

Indeed, you haven’t not provided this mandatory information. Just find a way to share your files.

Okey, don’t worry I’ll try myself.