XNAT OHIF Viewer 2.0 Plugin Released

After a long time, the second major version of the OHIF Viewer plugin is officially out of beta.

Major features over 1.0.X:

  • Store contour-based (RTSTRUCT, AIM ) and mask-based (DICOM SEG) ROI Collections to XNAT. 
  • Edit ROI Collections and save them back as new assessors.
  • Create new ROI Collections using the browser-based tools and archive these straight to XNAT.
  • Navigate to different project/subjects/sessions without leaving the viewer.
  • Import and visualize these within OHIF.

Distributions for 1.7.4.1/1.7.5.X compatible versions are available here.

(This branch also has versions built around the 1.7.6 distribution, working at the time of writing. But are not yet officially supported as XNAT 1.7.6 isn't finalized.)

Full patch notes are available here

The plugin has a hard dependency on the ROI plugin by James D'Arcy, which deals with storage and conversion between data types on the backend. At the time of writing the relevant version of the ROI plugin is contained within the distribution.


Accessing The Viewer

Once both plugins are installed you may access the viewer from the "View Session" button on a session page to view a session, or the "View Subject" button on the subject page to view all sessions for that subject. E.g.:

Screen Shot 2019-08-01 at 11.11.45.png

Creating Contour Based ROI Collections

You can create contour-based ROIs by clicking on the ROI -> Draw, and giving the ROI a name:


You can then start drawing your ROI with the left mouse button/touch. Drag around your region and back to the origin. Interpolation of contours between slices is on by default, but can be toggled via the Contours sidebar.


You can make corrections to your contour with the Sculpt tool:


The Contours menu lets you add more ROI Contours and switch which one is actively being drawn:


Clicking Export in the Contour menu will bring up a prompt selecting which ROIs to export (all by default), as well as give the collection a name:


After exporting, the ROI Collection will be archived in XNAT as an ROI Collection assessor in the appropriate session:


Importing Contour Based ROI Collections

Another user with read access to the session can click the Import button in the Contours menu and may import the collection to view:


Editing Contour Based ROI Collections

ROI Collections are imported as "locked", to avoid accidentally editing the author's ROI when reviewing it. If you want to edit an ROI Collection, click the Unlock button next to the collection name:


The ROIs will be moved to the "New ROI Contour Collection" and unlocked. You may then edit these as desired and save them back as a new collection.

Overwriting collections is not possible at the time of writing.


Creating Mask-based ROI Collections

You can create mask-based ROIs by clicking on Segment, choosing a brush type and filling in a metadata form:


There are three types of brushes: Manual, Smart CT and Auto:

Manual

Paints to the canvas based on brush size

Smart CT

Paints tissue of a particular type on CT images, gated by Hounsfield units.

Auto

Paints only voxels within the gate defined by the min and max voxel values within the brush radius at the start of the brush stroke

 


The Smart CT and Auto brushes can be configured using the menu at the bottom of the Segments menu. The desired CT gate can be chosen, or a custom one defined.

Both the Smart CT and Auto brushes have hole-filling and island-removal functionality, which generally means less cleanup is needed compared to just a simple threshold.


You can manage your segments in the Segment menu and export them similarly to Contour-based ROI Collections:

Importing Mask Based ROI Collections

Due to technical limitations you may only import one mask-based segmentation (Which may still contain up to 20 segments) over each scan at a time.

Note

Multiple segmentation layers, as well as better support for segmentations with up to 65535 segments is coming to cornerstone 4.0, and can later be integrated into the XNAT-OHIF viewer.

You may choose which to import in the Segments -> Import menu:


Editing Mask Based ROI Collections

Segmentations don't "lock" on import, as they aren't interactable without explicitly using a brush, unlike Contours. You may edit a mask-based segmentation immediately after import, and simply use Segments -> Export to export it as a different collection.


Navigating to Different Projects/Subjects/Sessions

Clicking on the XNAT Nav button will bring up a sidebar which allows you to navigate to other XNAT views. You will be presented with all projects available to you. The blue buttons at subject level will open a subject-level view, whereas the buttons next to a particular session will open up that session. 

If ROI Collections are available for a particular session, this is indicated by a couple of icons and a count of the number of collections.

$label.name