Having trouble running the AIAA-OHIF interagtion with clara train v4.1. Is it possible?

Hi!

I’m following the tutorial in clara-train-examples and I managed to get it to work with Ohif and clara train v4.0.
My objective now is to make it work with a custom Tensorflow algorithm, that should be possible as per this forum topic. Following the Clara Train SDK documentation I should approach this from the v4.1 model, as from this version on the custom models must follow the MONAI Label App template.
My problem arises when using this version of the SDK as backend for the OHIF-AIAA integration in clara-train-examples, even with the models already available in the NGC registry. I load the model clara_pt_spleen_ct_segmentation, I click the “Run Segmentation” button and in OHIF’s frontend I get the following events:

  • Please wait while creating new AIAA Session! → AIAA Data preparation complete → Failed to Create AIAA Session… Reason: undefined

I’ve tried to debug the issue using Chrome’s Developer tools and found out that OHIF receives a “422 Unprocessable Entity” when sending the following call to the SDK: curl -X ‘PUT’ ‘http://MY_SERVER:5000/session/?expiry=0&save_as=.nii’. I’ve checked if the same call is also sent when using the v4.0 SDK and it seems to be exactly the same. In my opinion the OHIF-AIAA integration is not able to process back the response from the API, that changes between versions. Here two responses I get doing by myself calls to that endpoint in the SDK:

  • v4.0: {“session_id”: “dacc097c-e266-11ec-a4aa-0242ac160003”}
  • v4.1: {“session_id”:“5558a0de-e266-11ec-93c5-0242ac150003”,“session_info”:{“name”:“5558a0de-e266-11ec-93c5-0242ac150003”,“path”:“/root/.cache/monailabel/sessions/5558a0de-e266-11ec-93c5-0242ac150003”,“image”:“/root/.cache/monailabel/sessions/5558a0de-e266-11ec-93c5-0242ac150003/my_dicom.dcm”,“meta”:{},“create_ts”:1654168968,“last_access_ts”:1654168968,“expiry”:3600}

Could you please confirm if the problem comes indeed from a version mismatch between the OHIF-AIAA extension and Clara Train SDK v4.1?
If so, do you have any plans to update the extension so it works with the newest SDK versions?

Thanks for your time,

Javier

Hi
Thanks for your interest in Clara Train SDK. There has been couple of updates in the v4.1 release:
1- Training moved to use monai 0.8 which requires some changes in the training configs
2- AIAA moved to use monai label which is a major change
Yesterday, We updated some of the clara examples github.

To your issue there is now 2 sets of session apis. one for monailabel and the other for aiaa backward compatible.
In theory you should be able to use the ohif integration by adding monailabel to the url as we showed in the example for 3d slicer

http://myserver:5000/monailabel 

If that doesn’t work, we would recommend you try using monailabel with ohif by following steps here

Hope this helps

Hi @aharouni,

Thank you very much for your reply and sorry for my silence, but I had to put aside this project for a while.

I’m exploring the second solution you explained, using Monailabel with Ohif. Regarding the first one, I have tried to set http://myserver:5000/monailabel as the “AIAA server URL” in the OHIF-AIAA integration, but I get the exact same error. I’ve tried to look for the 3d slicer example you mentioned that implements this approach but I can’t find it. While I make the second solution work, could you please explain further the first option?

Thanks,

Javier

Hi

It seems there is a port mapping issue. How are you starting the docker image ? Are you using the startDocker.sh clara-train-examples/startDocker.sh at master · NVIDIA/clara-train-examples · GitHub ? if so then port 5000 is mapped to port 3031 of the host so you should try

http://ip:3031/monailabel

you should try this from your browser and see if you get the monailabel apis

Hi,

No. I’m using the following script: clara-train-examples/PyTorch/NoteBooks/AIAA/OHIF-Orthanc/restart.sh. The models get recognized correctly within OHIF and I can see the MONAILabel API as shown in the following screenshot when I access http://myserver:5000:

However, even if I introduce http://myserver:5000/monailabel as the “AIAA server URL” in the OHIF-AIAA integration, the call that fails is still the same: http://myserver:5000/session/?expiry=0&save_as=.nii. I assume you proposed a way to change that call and send it to http://myserver:5000/monailabel/session/?expiry=0&save_as=.nii, but I don’t understand how. Is this the solution you proposed in your first reply? Could you please clarify it?

Thanks a lot,

Javier

Hi

http://ip:5000 shows monailabel site and all the api you can use. Monailabel is an open source code from all the learnings we had in AIAA. We didn’t test the old ohif integration since monailabel already integrated with ohif and more pathology clients. Also coming soon Xnat integration.

For AIAA backward compatible you need to be able to use the old apis. Please scroll down on the monailabel page till you see aiaa apis that is the url you need to use.
You may also need to change how nginx reverse proxy is mapped in

I know this is a bit messy, that is why we would recommend you migrate to using native monai label as soon as possible.