Hi all, I hope you are all doing good
My application workflow when any new instance is added to Orthanc, Lua script is revoked and sent the instance id and numpy representation of the pixel data of the DICOM file to my fast API server which is interface with my AI model so I can eventually create a mask of this DICOM file.
I am now having a problem that the return value from the numpy API call inside lua is string and equal to “\u04ceUMPY\u0001” which you can find printed inside the attached Orthanc log, this is incorrect as I use the same API call using python and the content of the body of the request was of type which I can easily convert to normal image format, but now I don’t know how to convert this string format to an image format when I received in my server, so any proposed solutions are really appreciated
I am calling numpy API inside lua because when I use it inside my fast API server and lua only sends the instance id, the whole operation was done in 1 minute which is very expensive.
I tried to test which part is time-consuming so I stopped lua and sent the instance id manually to my fast API endpoint, and the whole process takes max 4 sec.
So I conclude that when I call Orthanc rest API inside an endpoint that communicates with lua I got this delay like mentioned in Orthanc lua concurrency-and-deadlocks.
I am open to any solutions that can fit my workflow and I can effectively send the numpy representation of the pixel data of the DICOM file to my AI Model.
Thanks in Advance.
Orthanc log (3.06 KB)
Lua Script (468 Bytes)