Dear Girder expert.
I found Girder quite impressive and easy to set up. I would like to use it to deploy image processing methods to in a research lab. I’m investigating the use of girder for two applications:
- short job (<10s typically applying ML weights) using a simple plugging
- long job (> 1h-6h ) using the job system described in girder-worker.
For both jobs, the scenario is the following, the user upload a dataset (a Nifti file) as input. The job run (typically a threshold using sitk) and saved the corresponding label to the database.
So far, I’ve succeed to :
- install girder,
- use the Python Client and Girder CLI to create the database & upload or download data
- create a plugin that triggers when a file is uploaded.
Disclaim, most of the concept of Girder are far away from my background
Using the plugin mecanism, I haven’t been able to read the uploaded nifti file. For instance:
def handler(event): # get file file = event.info['file'] # get path path=file['path'] # get itemId itemId=file['itemId'] # create Item item = Item().load(file['itemId'], force=True) # download file download_file=File().download( file, offset=0, headers=True, endByte=None, contentDisposition=None, extraParameters=None) that return <function File.download.<locals>.downloadGenerator at 0x7fe0a1f5b8b0>
Could you comment what is a downloadGenerator and how to access to the data for instance using sitk. Or what would you advise for I/O in regard to the girder database inside a plugin.
While I succeed to get the concept associated with the creation of “custom Celery task for Girder Worker” , the transition between Girder and the Girder worker is not easy to catch. In case, if existing, could you recommend a complete example available on the web that include the link between i) the detection of an event in a plugin, ii) the creation of girder job and the task, iii) the I/O part (GirderFileId/GirderUploadToItem).
Thanks in advance,