Hello
We start StoreSCP DICOM service using the following script. The output directory is C:\Output. The studies get sorted into subdirectories using patient name within the output directory, e.g. C:\Output\TestPatient1.
"%SCPProgDir%\SCP.exe" +v --log-config "%SCPProgDir%\SCP.cfg" -aet %SCPAET% -od %SCPOutputDir% -fe .dcm %SCPPort% -sp""
If a patient directory, e.g. C:\Output\TestPatient1, is deleted and we try to resend the same (deleted) patient study from our PACS then it fails. The StoreSCP log displays the following entry:
2017-10-19 16:16:38.505 INFO: Received Store Request: MsgID 1, (CT)
2017-10-19 16:16:38.511 INFO: storing DICOM file: <filename>.dcm
2017-10-19 16:16:38.512 ERROR: cannot write DICOM file: <filename>.dcm: No such file or directory
If the patient directory is not deleted then "move to" works successfully. Even if the files within the patient directory are deleted the "move to" works.
The problem is when the patient directory is deleted from within the output directory, the study fails and above error appears in the log.
I've been unsuccessful to find a parameter, which re-creates the patient directory if it doesn't exist.
Could someone please help me with this. Which parameter do I use?
Thanks
Idil
StoreSCP Deleting Output Directory
Moderator: Moderator Team
-
- DCMTK Developer
- Posts: 2503
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: StoreSCP Deleting Output Directory
I checked the source code of "storescp": If the directory is deleted while storescp is running, it is not re-created (unless a different patient is sent in between).
-
- Posts: 3
- Joined: Thu, 2017-10-19, 16:54
Re: StoreSCP Deleting Output Directory
Thanks Riesmeir. You are right that's exactly what's happening.
Is there anyway to re-create the deleted directory without sending a different patient first?
Or are there any workarounds?
Thanks
Is there anyway to re-create the deleted directory without sending a different patient first?
Or are there any workarounds?
Thanks
-
- DCMTK Developer
- Posts: 2503
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: StoreSCP Deleting Output Directory
The only "workaround" I can see would be to modify the source code of storescp accordingly (check whether the corresponding directory already exists and recreate it if needed each time a new DICOM object is received).
-
- Posts: 3
- Joined: Thu, 2017-10-19, 16:54
Re: StoreSCP Deleting Output Directory
Thanks Riesmeier!
-
- DCMTK Developer
- Posts: 2049
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Re: StoreSCP Deleting Output Directory
Just something that instantly came to my mind: Some tool of yours is deleting the patient directories frequently, do I get this right? Could you modify this tool that it checks whether there is a patient with a newer modification date than the one that is to be deleted? If so, delete it, otherwise wait. Just an idea.
Best,
Michael
Best,
Michael
Who is online
Users browsing this forum: Ahrefs [Bot], Baidu [Spider], Google [Bot] and 1 guest