Drawing regions of interest and segments§
You can use the built-in OHIF Viewer to create and modify regions of interest and segments for your images and store them in XNAT. ˜
- ROI contours are regions you create by drawing one or more contours around the region boundaries using the ROI Draw and ROI Sculpt tools
- Segments are label maps which you define using the Brush tool to select voxels to form part of the segment
Please refer to the XNAT OHIF Viewer documentation for more information.
Launching the OHIF Viewer§
You can launch the OHIF Viewer from any subject or session in XNAT by choosing
View Subject
or View Session
from the Actions
menu. If the OHIF Viewer is
already running, you can navigate to a different subject or session using the
XNAT Nav
menu on the left.
- See Visualising data for more details on launching and using the OHIF Viewer.
Contours§
A region of interest (ROI) is created by drawing contours on one or more 2D image slices. An ROI contour collection contains all the contours which describe a single region of interest. For a 3D image, this will generally include contours on multiple slices which combine to define a 3D region of interest.
- Select the
Contours
button on the right of the OHIF Viewer to show theROI Contour Collections
panel
Create a new Region of Interest§
- Select the
Contours
button on the right of the OHIF Viewer to show theROI Contour Collections
panel - Click
+ ROI Contour
to create a new Region of Interest - Enter a name for this new Region of Interest (e.g. 'Right lung')
- Navigate to the first image slice where you want to start drawing the ROI boundary.
- Select the
ROI > Draw
tool
-
Define your first ROI boundary contour as follows:
-
Click a point on the boundary to start drawing a boundary contour
- Then you can either draw the boundary contour freehand by holding down the mouse button and dragging, or you can click on boundary points to draw straight lines from the last point.
- Click back on the starting point to complete the contour.
- Repeat if you need to add more contours on the same image slice.
- Navigate to the next image slice and add more contours as required. Note: you can use Interpolation (see below) to speed up the process when defining a 3D region of interest
Use the Sculpt tool to refine a Region of Interest§
You can use the Sculpt tool to refine a contour.
- Select
ROI > Sculpt
- The sculpt tool is shown as a circle which changes size automatically as you move it around the image
- Click inside the contour to add all points in the circle to the region. This works by shifting the contour away from the circle
- Click outside the contour to remove all points in the circle from the region. This works by shifting the contour away from the circle
Interpolation§
Drawing 2D contours over many image slices can be time consuming. To speed up
the process you can enable Interpolation
under Settings
at the bottom of the
ROI Contour Collections panel.
When interpolation is enabled, you need only define contours every few slices. Additional contours will be added in between the slices you have defined using interpolation. When using interpolation you should visually check and correct the resulting contours to ensure accuracy. Interpolation is a simple geometric process and will be less accurate than a human operator.
ROI Statistics§
Enable Stats
under Settings
at the bottom of the ROI Contour Collections
panel to show statistics for the voxels within the region you have defined.
Modifying a Region of Interest§
- Select the
Contours
button on the right of the OHIF Viewer to show theROI Contour Collections
panel - Under
Draw
, check the Region of Interest you wish to modify - Use the
ROI > Draw
andROI > Sculpt
tools described above to add or modify contours
Saving Regions of Interest§
You must save your ROI Contour Collections to preserve them before you exit the OHIF Viewer.
- In the
ROI Contour Collections
panel, click theExport
button to save your ROI contour collections to XNAT. - Enter a name under which the Regions of Interest will be stored
- The Regions of Interest will be saved as an ROI Collection Assessment under the corresponding image session.
Loading Regions of Interest§
When restarting the OHIF Viewer you will need to reload the Regions of Interest
- In the
ROI Contour Collections
panel, click theImport
button to load previously saved Regions of Interest from XNAT. - Select the Regions of Interest to reload from the drop-down menu and click the XNAT icon
Segments§
A segment is created by using the Brush tool to select voxels on one or more 2D image slices to include within the segment
- Select the
Segments
button on the right of the OHIF Viewer to show theSegments
panel
Create a new Segment§
- Select the
Segments
button on the right of the OHIF Viewer to show theSegments
panel - Click
+ Segment
to create a new Segment - Enter a name for this new Segment and select appropriate labels for the feature you are defining.
- Navigate to the first image slice where you want to start drawing the ROI boundary.
- Select the
Brush
tool - Draw the mouse to add voxels to the Segment
- Hold down
control
when dragging to remove voxels - Repeat if you need to add more voxels on the same image slice.
- Navigate to the next image slice and add more voxels as required.
Modifying a Segment§
- Select the
Segments
button on the right of the OHIF Viewer to show theSegments
panel - Under
Paint
, check the Segment you wish to modify - Click on the segment name if you wish to rename the segment or change its type
- Use the
Brush
tool to modify the segment as described above - You can also delete segments or hide them from view
Saving Segments§
You must save your Segments to preserve them before you exit the OHIF Viewer.
- In the
Segments
panel, click theExport
button to save your segments to XNAT. - Enter a name under which the segments will be stored
- The segments will be saved as an ROI Collection Assessment under the corresponding image session.
Loading Segments§
When restarting the OHIF Viewer you will need to reload segments
- In the
Segments
panel, click theImport
button to load previously saved Segments from XNAT. - Select the segment to reload from the drop-down menu and click the XNAT icon