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

You can analyse more than 2 time-points by increasing
. The settings will be the same as for cross-sectional analysis with lesions, but the analysis will take commensurately longer because of the increased number of registration and segmentation steps involved.
Now press the
button to start the analysis. When the analysis is complete, you will see a pop-up message asking which type of report you want to create:

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 include an illustration the GM/WM/CSF/Lesion segmentation at each time-point, together with a colour-coded picture showing changes in the lesion distribution between each pair of successive time-points.
- 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.
The report will show, for each time-point:
- 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.
Also shown for each pair of time-points:
- The percentage change in grey-matter volume assessed using the Jacobian integration method.
For input T1-weighted images called "BaselineT1.nii" and FollowUpT1.nii, FLAIR images called "BaselineFLAIR.nii" and "FollowUpFLAIR.nii", and a base name of "Longitudinal", these output images will be created in the selected folder:
LongitudinalWMPrior.nii- the white-matter prior probability image, registered to an average of the the cropped T1-weighted input images.LongitudinalGMPrior.nii- the grey-matter prior probability image, registered to an average of the cropped T1-weighted images.LongitudinalCSFPrior.nii- the CSF prior probability image, registered to an average of the cropped T1-weighted images.LongitudinalLVPrior.nii- the lateral ventricles prior probability image, registered an average of to the cropped T1-weighted images.LongitudinalD1_2.nii- difference image between the two time-points for the FLAIR images.LongitudinalPLesionD1_2.nii- difference image between the two time-points for the lesion probability maps. This is a colour image, where stable lesions are yellow, new lesions are red and resolved lesions are green.-
Longitudinal_Det1_2.nii- an image of the Jacobian determinant showing changes in tissue volume between the two time-points. -
rBaselineT1_pWM.niiandrFollowUpT1_pWM.nii- the white-matter posterior probability images at each time-point. rBaselineT1_pGM.niiandrFollowUpT1_pGM.nii- the grey-matter posterior probability images at each time-point.rBaselineT1_pCSF.niiandrFollowUpT1_pCSF.nii- the CSF posterior probability images at each time-point.rBaselineT1_pOTHER.niiandrFollowUpT1_pOTHER.nii- the other (non-tissue) class probability images at each time-point.rBaselineT1_Classes.niiandrFollowUpT1_Classes.nii- colour images showing the final segmented tissue classes at each time-point.rBaselineT1.niiandrFollowUpT1.nii- the T1-weighted input images co-registered to an average space.bcrBaselineT1.niiandbcrFollowUpT1.nii- bias-corrected version of the above.rBaselineFLAIR.niiandrFollowUpFLAIR.nii- the FLAIR input images co-registered to the T1-weighted in the average space.bcrBaselineFLAIR.niiandbcrFollowUpFLAIR.nii- bias-corrected version of the above.rBaselineFLAIR_pLesion.niiandrFollowUpFLAIR_pLesion.nii- lesion probability maps for the 2 time-points.
Lesion review
Also produced are ROI files called (in this example) "rBaselineFLAIR.roi" and "rFollowUpFLAIR.roi", where the ROIs outline the segmented lesions on every image slice. These ROIs should be reviewed by loading them onto either rXXXFLAIR.nii or bcrXXXFLAIR.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.