MONAILabel icon indicating copy to clipboard operation
MONAILabel copied to clipboard

XNAT Integration

Open SachidanandAlle opened this issue 4 years ago • 13 comments

Integrate monai label server with XNAT

SachidanandAlle avatar Jul 26 '21 14:07 SachidanandAlle

I would be very keen to have this integration working. Do we know if there are particular hurdles or challenges with XNAT integration?

hshuaib90 avatar Feb 22 '22 09:02 hshuaib90

We need some xnat community to help on developing this plugin.. otherwise MONAILabel server has all the rest apis (ingredients) to support any viewers.. we took an extra step of providing such 2 reference implementations (3Dslicer and vanilla OHIF) to showcase the same.. these python/js based examples should be enough for others to follow.

SachidanandAlle avatar Feb 22 '22 10:02 SachidanandAlle

I would be very keen to have this integration working. Do we know if there are particular hurdles or challenges with XNAT integration?

This will be a great use case, @hshuaib90. MONAI Label + OHIF + XNAT Happy to chat more about this. As @SachidanandAlle said, MONAI Label is ready to be integrated with XNAT. It has DICOMWeb support and there are several apps that can be used to facilitate medical image annotation. There is also interest in supporting the new OHIF v3. See here https://github.com/Project-MONAI/MONAILabel/issues/603

diazandr3s avatar Feb 22 '22 11:02 diazandr3s

We have XNAT server set up at my hospital and I'd be happy to support early testing. I'm afraid I don't know XNAT well enough to contribute to the development - at least not yet.

hshuaib90 avatar Feb 22 '22 20:02 hshuaib90

Thanks, @hshuaib90. This is a great idea. Pinging @mjorgecardoso who can also contribute to this conversation :)

diazandr3s avatar Feb 23 '22 14:02 diazandr3s

I have got MONAI label running at KCH, using the DGX as server and data store, and a standard NHS PC with Slicer as client. Long term, I expect we will want to use XNAT and OHIF too.

pwrightkcl avatar Feb 23 '22 14:02 pwrightkcl

I have got MONAI label running at KCH, using the DGX as server and data store, and a standard NHS PC with Slicer as client. Long term, I expect we will want to use XNAT and OHIF too.

That's good.. lets c on XNAT+OHIF if something can happen in near future.. MONAILabel is an opensource project.. so lets hope to get some more developers from XNAT community pitching in to develop the required plugin at XNAT side to interact with MONAI Label server.

SachidanandAlle avatar Feb 23 '22 16:02 SachidanandAlle

I understand the current implementation is to use DICOM web. How does that handle labels?

  1. How do you feed it existing labels?
  2. Where does it put labels that you submit?

pwrightkcl avatar Feb 23 '22 16:02 pwrightkcl

DICOM Seg is created and pushed via DICOM Web server (given all permissions are there to read/write for MONAILabel server)

SachidanandAlle avatar Feb 23 '22 16:02 SachidanandAlle

For some additional knowledge on this topic, 3D Slicer + XNAT has existed with https://github.com/NrgXnat/XNATSlicer however it had become unmaintained and was recently disabled from the Slicer extensions catalog after some cleaning up of old extensions in preparation for the Slicer 5.0 release. It could be enabled again if there are developers interested in supporting it again. ~~See https://github.com/Slicer/ExtensionsIndex/blob/master/ARCHIVE/XNATSlicer.s4ext~~

Update: It has been reenabled https://github.com/Slicer/ExtensionsIndex/blob/5f5ac42bab1ca7b57f25b78b12d39a4c6d9cc1ee/XNATSlicer.s4ext

jamesobutler avatar Apr 03 '22 04:04 jamesobutler

Hi. We have xnat ml set up on aws. We were confused about deploying AIAA Or using monai label. Monai label looks more promising however needs more clarity about how data is trained which more straightforward in XNAT ML. We are more interested in inference tools. Can you please guide us how to deploy inference tool.

Regards Dr Akshaykumar

DrRadiohead2 avatar May 20 '22 18:05 DrRadiohead2

Hi @DrAkshaykumar,

Thanks for your comment.

MONAI Label / XNAT integration is in the roadmap. This integration will allow both inference and training and user authentication should permit specific users to trigger training.

Are you using the DICOM Web protocol? or do you fetch images from XNAT directly when using AIAA?

diazandr3s avatar May 23 '22 12:05 diazandr3s

Currently we have xnat deployed on AWS. We don't have AIAA set up now. That's why we were thinking how to go about which one to go with.

On Mon, 23 May, 2022, 1:10 pm Andres Diaz-Pinto, @.***> wrote:

Hi @DrAkshaykumar https://github.com/DrAkshaykumar,

Thanks for your comment.

MONAI Label / XNAT integration is in the roadmap. This integration will allow both inference and training and user authentication should permit specific users to trigger training.

Are you using the DICOM Web protocol? or do you fetch images from XNAT directly when using AIAA?

— Reply to this email directly, view it on GitHub https://github.com/Project-MONAI/MONAILabel/issues/223#issuecomment-1134592815, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQRVYUSYH7CWCTNR7KHNUI3VLNYTFANCNFSM5BAJAGNA . You are receiving this because you were mentioned.Message ID: @.***>

DrRadiohead2 avatar May 23 '22 12:05 DrRadiohead2

Any update ?

amrshadid avatar Oct 19 '22 18:10 amrshadid

I would also like to know.

Regards

On Wed, 19 Oct, 2022, 7:34 pm Amr Shadid, @.***> wrote:

Any update ?

— Reply to this email directly, view it on GitHub https://github.com/Project-MONAI/MONAILabel/issues/223#issuecomment-1284418804, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQRVYUVKVP6CD44EUKEINQLWEA5L3ANCNFSM5BAJAGNA . You are receiving this because you were mentioned.Message ID: @.***>

DrRadiohead2 avatar Oct 19 '22 18:10 DrRadiohead2

Some of the development and integration is completed on XNAT side.
And there must be an early version of the plugin available. https://wiki.xnat.org/documentation/xnat-ohif-viewer/release-notes-126157097.html

Please follow more on the XNAT development forum.

SachidanandAlle avatar Dec 14 '22 01:12 SachidanandAlle

Some of the development and integration is completed on XNAT side. And there must be an early version of the plugin available. https://wiki.xnat.org/documentation/xnat-ohif-viewer/release-notes-126157097.html

Please follow more on the XNAT development forum.

@danieltudosiu

diazandr3s avatar Dec 14 '22 01:12 diazandr3s

Hi, We are trying to integrate XNAT with monai label, so that the models can be trained and deployed in the same pipeline. Can someone please prepare a detailed step by step guide to help us integrate it. We have currently hosted XNAT on AWS. @diazandr3s please discuss in meeting next year. Regards

DrRadiohead2 avatar Dec 18 '22 21:12 DrRadiohead2

Hi @DrAkshaykumar,

If it is ok with you I will join as well the meeting as I am working closely with @diazandr3s and MONAI Label's integration with XNAT is party of my PostDoc's JD.

I think I will be one of the main points of contact on this issue in the next year.

Best regards,

Dan

danieltudosiu avatar Dec 18 '22 21:12 danieltudosiu

Adding @AHarouni who has helped and lead this xnat + monailabel integration in many ways

SachidanandAlle avatar Dec 19 '22 08:12 SachidanandAlle

Hi All

Currently the xnat datastore in monai label along with xnat=ohif viewer V3.4 enables the user to run inference of images in the project very efficiently as monai label can directly access xnat data. I did send code to xnat-ohif developer to allowing saving of dicom seg back to xnat. once this code is merged you would be able to run batch inference from monai-label api to run inference on all patients in a project convert o dicom seg and push this segmentation to xnat so user can load this seg Another addition that might be useful is using Rapid reader in xnat. This is unrelated to monai label but you can create a new worklist of all the patients which just finished batch infer for a quick way for radiologist to review and add comments to the quality of the AI.

There is a minor issue of unifying the AI dicom seg name and who user can name the dicom seg they create so monai-label + xnat datastore can figure out what is unlabeled vs labeled by a radiologist vs labeled by the batch infer. One issue here is each series can have multiple annotations one for liver tumor, kidney tumor etc

For end to end you should be able to use the xnat jupyter hub feature to launch monai jupyter container where you have access to the data of a given project. I successfully integrated this after modifying monai container and adhere to Xnat jupyter expectations

Open items I have on my list:

  • Moving series selector logic from monia deploy to either monai label or monai core. This will allow you to reject series that don't match your dicom tags criteria as running only on modality = CT etc
  • Utilize xnat-ohif new measurements feature by creating measurements on the center slice where the tumor / organ exist. This requires a new transformation to locate the organ / tumor central slice get teh UUID of that slice and create the measurements object expected by Xnat.
  • Creating a pdf report with findings and pushing it back to xnat ohif. This is a big item with multiple blocker. first xnat-ohif doesn't yet support showing encapsulated pdf. Need a new monai transform to calculate organ/ tumorsize and place them nicely in a report. Need to include key image of coronal/sagital /axial of the tumor.

Hope that helps clarifies current status and next steps.

AHarouni avatar Dec 19 '22 22:12 AHarouni

Hi All

Currently the xnat datastore in monai label along with xnat=ohif viewer V3.4 enables the user to run inference of images in the project very efficiently as monai label can directly access xnat data. I did send code to xnat-ohif developer to allowing saving of dicom seg back to xnat. once this code is merged you would be able to run batch inference from monai-label api to run inference on all patients in a project convert o dicom seg and push this segmentation to xnat so user can load this seg Another addition that might be useful is using Rapid reader in xnat. This is unrelated to monai label but you can create a new worklist of all the patients which just finished batch infer for a quick way for radiologist to review and add comments to the quality of the AI.

There is a minor issue of unifying the AI dicom seg name and who user can name the dicom seg they create so monai-label + xnat datastore can figure out what is unlabeled vs labeled by a radiologist vs labeled by the batch infer. One issue here is each series can have multiple annotations one for liver tumor, kidney tumor etc

For end to end you should be able to use the xnat jupyter hub feature to launch monai jupyter container where you have access to the data of a given project. I successfully integrated this after modifying monai container and adhere to Xnat jupyter expectations

Open items I have on my list:

  • Moving series selector logic from monia deploy to either monai label or monai core. This will allow you to reject series that don't match your dicom tags criteria as running only on modality = CT etc
  • Utilize xnat-ohif new measurements feature by creating measurements on the center slice where the tumor / organ exist. This requires a new transformation to locate the organ / tumor central slice get teh UUID of that slice and create the measurements object expected by Xnat.
  • Creating a pdf report with findings and pushing it back to xnat ohif. This is a big item with multiple blocker. first xnat-ohif doesn't yet support showing encapsulated pdf. Need a new monai transform to calculate organ/ tumorsize and place them nicely in a report. Need to include key image of coronal/sagital /axial of the tumor.

Hope that helps clarifies current status and next steps.

AHarouni avatar Dec 19 '22 22:12 AHarouni