Cross-Sectional Analysis with Lesions
The picture below shows the setup for assessing brain atrophy at a single time-point (cross-sectionally) when there are lesions present that are hyperintense on FLAIR images. For this, you need both a T1-weighted image and a FLAIR image, so set the number of image contrasts to 2.

-
Load the T1-weighted image in the first input image selection panel. In the example above, this is called "
T1Weighted.nii". The T1-weighted image should, ideally, have been acquired using a 3-D (not multi-slice) pulse sequence. Load the FLAIR image in the second input image selection panel. In the example above, this is called "FLAIR.nii". -
Leave the
slider at its default value of 5. This should not need to be changed. -
Select
. When selected, the Lesion probability threshold slider will become visible:
The output of the lesion segmentation is a lesion probability map. This is then contoured at a probability threshold to produce ROIs that outline the lesions. Setting a higher threshold will result in smaller lesions; a lower threshold gives larger lesion ROIs. A setting of 0.5 should be close to optimal for most images.
-
Set the base name and folder for the output images. The base name is used to construct the name of some of the output images (see below).
-
For:
,
see the processing options section.
Now press the
button to start the analysis, which will take some time. When the analysis is complete, you will see a pop-up message showing the results:

These results show:
- The total lesion volume.
- The white-matter (WM) lesion volume.
- The grey-matter (GM) lesion volume.
- The fractional whole-brain lesion load - the percentage of brain tissue volume that is lesion.
- The fractional WM lesion load - the percentage of WM volume that is lesion.
- The fractional GM lesion load - the percentage of GM volume that is lesion.
- The WM volume (including WM lesions).
- The GM volume (including GM lesions).
- The cerebro-spinal fluid (CSF) volume.
- The intra-cranial (IC) volume, which is the sum of the volumes of the 3 compartments above.
- The brain parenchymal fraction (BPF), which is: (GM Volume + WM Volume) / ICV.
- The white-matter fraction (WMF), which is: WM Volume / ICV.
- The grey-matter fraction (GMF), which is: GM Volume / ICV.
To make a permanent record of these results, you can:
- Write to a text file report. A File chooser will appear, for you to choose a log file name. The default file extension for log files is ".log". If the chosen file already exists, an entry will be appended to the log file.
- Write to a PDF file report. A File chooser will appear, for you to choose a PDF file name. If the chosen file already exists, an entry will be appended to the PDF file. A PDF report will also include an illustration the GM/WM/CSF/Lesion segmentation.
- Send a PDF report to a DICOM server. The DICOM server to which it will be sent must already have been set up, and is the current server selected in the DICOM Query/Retrieve tool. See these instructions for how to set up the connection to remote DICOM servers.
- Save PDF and Send to DICOM. Both save to disk and send to a DICOM server.
For an input T1-weighted image called "T1Weighted.nii", a FLAIR image called "FLAIR.nii", and a base name of "Test", these output images will be created in the selected folder:
TestWMPrior.nii- the white-matter prior probability image, registered to the cropped T1-weighted image.TestGMPrior.nii- the grey-matter prior probability image, registered to the cropped T1-weighted image.TestCSFPrior.nii- the CSF prior probability image, registered to the cropped T1-weighted image.TestLVPrior.nii- the lateral ventricles prior probability image, registered to the cropped T1-weighted image.rT1Weighted_pWM.nii- the white-matter posterior probability image.rT1Weighted_pGM.nii- the grey-matter posterior probability image.rT1Weighted_pCSF.nii- the CSF posterior probability image.rT1Weighted_pOTHER.nii- the other (non-tissue) class posterior probability image.rT1Weighted_Classes.nii- a colour image showing the final segmented tissue classes.rT1Weighted.nii- a cropped version of the T1-weighted input image andbcrT1Weighted.nii, a bias-corrected version of this.rFLAIR.nii- the FLAIR image registered to the cropped T1-weighted image andbcrFLAIR.nii, a bias-corrected version of this.rFLAIR_pLesion.nii- a lesion probability map.
Lesion review
Also produced is an ROI file called (in this example) "rFLAIR.roi", where the ROIs outline the segmented lesions on every image slice. These ROIs should be reviewed by loading them onto either rFLAIR.nii or bcrFLAIR.nii, to ensure that the outlining of lesions is satisfactory. Common errors in automatic lesion segmentation include:
-
Small regions in the cortical ribbon may be mis-identified as lesions if the cortex is very bright on the FLAIR image.
-
Small lesions near the cortex may be missed.
-
Infratentorial (cerebellar) lesions may be missed entirely, especially when they are in or abut the grey matter.
-
Lesions that are very hypointense on the T1-weighted image (black holes), may be under-segmented.
If the outlining is not satisfactory, you can either:
-
Delete the segmented lesion outline ROI file, make an adjustment to the lesion probability threshold setting and repeat the analysis.
Note: if you do not delete the lesion ROI file, Jim will not re-segment the lesions, and the change in threshold will have no effect.
-
Edit the ROIs, deleting any false lesions, adding any lesions missed, or correcting their outlines. Then save any changes to the ROIs (overwriting the automatically-produced ROIs), and repeat the analysis. Jim will then not re-segment the lesions, but will just use the edited ROIs.
Note: when the analysis is repeated like this, as long as the output images initially produced are not removed, and the output images Basename is not changed, then the analysis will run in a much shorter time, since intermediate registration steps can be skipped.
You can, if you wish, also do the whole of the lesion segmentation manually by outlining the lesions with ROIs on the original (unregistered) FLAIR image(s). These lesion ROIs will be automatically transformed into the space of the registered FLAIR image during registration.
The procedure for cross-sectional atrophy assessment when hyperintense lesions are present (after the registration steps), is summarised in the flow-chart below.
Lesions are segmented using a convolutional neural network. Then the the E-M classifier is run after excluding lesion pixels. The location of the lesions (WM or GM) is determined by examining their position relative to the prior tissue class probabilities. The WM and GM lesion volumes are added to the E-M segmented GM and WM volumes when reporting the final tissue volumes.