Hello from Yakutia, I have a question for you, is it possible to filter the reception of dicom files, I would like to receive only certain CR DX formats from the server.
Thanks in advance for your reply.
Hello,
You can do this using Lua scripting and the “ReceivedInstanceFilter(dicom, origin, info)” callback:
https://book.orthanc-server.com/users/lua.html#filtering-incoming-dicom-instances
Sébastien-
Thanks for filtering DX but not filtering CR, can you find an error in the code ??
function ReceivedInstanceFilter(dicom, origin, info)
– Only allow incoming MR images
if dicom.Modality == ‘CR’ or dicom.Modality ==‘DX’ then
return true
else
return false
end
end
среда, 24 февраля 2021 г. в 15:09:50 UTC+9, s.jo...@gmail.com:
This code should work. If this is not the case, please provide a sample DICOM file:
https://book.orthanc-server.com/users/support.html#discussing-a-minimal-working-example
I found out the error was, in my opinion, from the server that I was sending, I still have a question whether it is possible to immediately archive when receiving a zipped file I get such a file from the server, and that one, respectively, without an image on Radiant
четверг, 25 февраля 2021 г. в 22:27:48 UTC+9, s.jo...@gmail.com:
DX000000.dcm (5.04 MB)
If you need to automate tasks (e.g. create ZIP on the reception of a study), I highly recommend you to learn about Python plugins, that are much more flexible than Lua scripts:
https://book.orthanc-server.com/plugins/python.html
For instance, check out the example using “orthanc.ChangeType.STABLE_STUDY”. The REST API of Orthanc allows to create a ZIP archive, and can by called from Python plugins using “orthanc.RestApiPost()”:
https://book.orthanc-server.com/users/rest.html#downloading-studies