Hi,
I was wondering if it is possible to get the origin information (e.g. CalledAet
, RemoteIp
). when using the Python Plugin (I tried with orthanc.RegisterIncomingCStoreInstanceFilter()
).
An “equivalent” is possible in lua:
function ReceivedInstanceFilter(dicom, origin, info)
PrintRecursive(origin)
end
Result:
table
[RemoteAet], string, ORTHANC2
[CalledAet], string, MY_AET
[RequestOrigin], string, DicomProtocol
[RemoteIp], string, 127.0.0.1
However, it seems that the orthanc.GetInstanceOrigin()
only returns an enum.
Thanks!
Gabriel
Actually I think I found my answer here Filtering incoming dicom instances using metadata (with python plugin) - #2 by Alain_Mazy1
My understanding is that the information is accessible with GetInstanceMetadata()
after the instance has been stored, which is something I would like to avoid. I will stay with lua then.
Follow up question: do you think it would be possible to change the orthanc.InstanceOrigin
enum for an object similar to the origin
table in lua for the Python Plugin?
Thanks!
Gabriel
I have just added it in the list of possible improvements for the future.
Best regards,
Alain