Skip to content

Integration with Xant Research PACS

AHarouni edited this page Feb 24, 2025 · 1 revision

1. Xnat

1.1 What is Xnat

According to Xnat main site, XNAT is an open source imaging informatics platform developed by the Neuroinformatics Research Group at Washington University. XNAT was originally developed at Washington University in the Buckner Lab, which is now located at Harvard University. It facilitates common management, productivity, and quality assurance tasks for imaging and associated data. Thanks to its extensibility, XNAT can be used to support a wide range of imaging-based projects.

xnat_intro

Xnat provides the following features: 1- Full DICOM Integration and Anonymization: Get image data in, and keep PHI out 2- Secure Access & Permission Control: You decide who does what with your data. 3- Integrated Search & Reporting: Report on your image and clinical data together. 4- Pipeline Processing: Use the power of high-performance computing on your data. 5- Modular Extensibility: Expand the capabilities of your XNAT to meet your needs. 6- Developer Community: Benefit from an active and engaged set of XNAT power users.

1.2 Get to xnat site

Simplest way to get xnat up is using their docker compose to start xnat. You should follow instructions here https://github.com/NrgXnat/xnat-docker-compose xnat_login

1.3 setup xnat

Frist time to log in to xnat you will setup some general information. You should create a project and push some dicom data to it. Xnat comes with a dicom receiver defaults to port 8104.

2. Setup XNAT-OHIF

Next we need to set the address of monai label server in the xnat ohif plugin

USER_PASS="admin:admin"
AIAASERVERPORT="http://"+HOST_NAME+":8000"
ROOTURL=HOST_NAME+":81"
!curl -u $USER_PASS -X PUT "$ROOTURL/xapi/ohifaiaa/servers" \
        -H "accept: */*" -H "Content-Type: application/json" \
        -d "[ \"$AIAASERVERPORT\"]"

2.1 Start monai label with xnat datastore

Monai label is able to use multiple data stores including cloud. Here we will point it to xnat datastore monailabel_arch_xnat

export MONAI_LABEL_DATASTORE=xnat
export MONAI_LABEL_DATASTORE_USERNAME=admin
export MONAI_LABEL_DATASTORE_PASSWORD=admin

export MONAI_LABEL_DATASTORE_ASSET_PATH=$XNAT_DATA_ARCHIVE

# export MONAI_LABEL_DATASTORE_PROJECT=
# export MONAI_LABEL_DATASTORE_CACHE_PATH=
export MONAI_LABEL_DICOMWEB_CONVERT_TO_NIFTI=false

monailabel start_server --app apps/radiology --studies http://$HOST_NAME:80 --conf models segmentation_spleen

3. Auto Segmentation with Xnat OHIF

3.1 MONAI Label Plugin

Go to xnat then go to

  1. Click project1
  2. Select any subject
  3. Click "view Images" on the right hand side xnat_viewimage
  4. From right hand side, Click on options --> preferences xnat_ohif_preference
  5. Select monai label from the experimental tab xnat_ohif_experimental
  6. After step above, a new button monai label should appear in the mask toolbar xnat_ohif_select_ml

3.2 Run Auto Segmentation

Similar OHIF you will connect to monai label server and see all the models. You should select a model and run inference to trigger a call to monai label to run inference. After couple of minutes you would see the segmentation result in the OHIF viewer.