Is there anyway to have Orthan store incoming DICOM via C-Store in DICOM format under a directory of the patients name and exam?
for exams I want the file structure when stored with Orthan to be exactly like if you downloaded the zip file.
Hello,
Depending on your programming skills, you have several possibilities:
- Create an external script (e.g. in Python) that monitors the “changes” API of Orthanc to copy each incoming DICOM file to the desired path [1].
- Create a Lua script that reacts to the “OnStoredInstance” event [2].
- Use the “Orthanc Plugin SDK” [3] to do the same, directly in C/C++ for best performance, using the “OrthancPluginRegisterOnStoredInstanceCallback()” function [4].
- If you are an advanced Linux developer, create a FUSE module that uses the “Orthanc Client SDK” or directly the REST API of Orthanc to present the content of Orthanc as a virtual filesystem [5]. This filesystem could subsequently shared to Windows hosts as a network drive using Samba.
HTH,
Sébastien-
[1] https://code.google.com/p/orthanc/source/browse/Resources/Samples/Python/ChangesLoop.py
[2] https://code.google.com/p/orthanc/source/browse/Resources/Samples/Lua/CallDcm2Xml.lua
[3] http://www.codeproject.com/Articles/797118/Implementing-a-WADO-Server-using-Orthanc
[4] https://code.google.com/p/orthanc/source/browse/Plugins/OrthancCPlugin/OrthancCPlugin.h?name=Orthanc-0.8.4#665
[5] http://en.wikipedia.org/wiki/Filesystem_in_Userspace
I have just added a Python sample to the Orthanc distribution, that should answer you request:
https://code.google.com/p/orthanc/source/browse/Resources/Samples/Python/AutoClassify.py
Type “python AutoClassify.py -h” to get the available parameters.
Sébastien-