Skip to content

Case IV: Post processing existing segmentations

Omer Faruk Gulban edited this page Sep 1, 2017 · 8 revisions

Segmentator can be used for post-processing of existing segmentations, making use of the spatial frequency spectrum of the segmentation image.

Software

Package Tested version
FSL-fslmaths 5.0.9
FSL-fslview 4.0.1
scikit-image 0.12.3
Segmentator 1.2.0

Data:

  • Existing white-matter segmentation (binary mask).

Problem:

A segmentation is overestimating the extent of a tissue type in some parts of the images, but underestimating the extent of the same tissue type in another region.

For instance, a white-matter mask is generally overestimating the extent of white matter:

Globally eroding the image (using, for example, morphology.binary_erosion() from skimage) moves the white-matter boundary inwards. However, this may completely remove fine stretches of white matter (e.g. in a Gyral crown), where the extent of white matter was not overestimated.

The fact that the white-matter border is overestimated in some locations while it is underestimated in other locations can be due to various smoothing methods used during creation of the segmentation. Typically, thin stretches of white matter are underestimated.

Solution:

Because thin stretches of white matter have a high spatial frequency, Segmentator can be used to identify and restore such erroneously eroded white matter regions:

  1. Slightly smooth the white matter binary mask (applying a Gaussian filter with FWHM of 0.3 mm two times in succession on data with a resolution of 0.35 mm isotropic in this example - the optimal smoothing kernel depends on the resolution of your data): fslmaths /path/to/file.nii -s 0.3 -s 0.3 /path/to/filtered_file.nii

  2. Load the data to Segmentator: segmentator /path/to/filtered_file.nii

  3. Use the "Lasso" tool to select a region under the arc in the 2D histogram:

  1. Save the mask (red voxels in the image browser) using Export Nifti button.

  2. Open the eroded white matter mask and the newly created Segmentator mask in fslview: fslview /path/to/eroded_wm_mask.nii /path/to/new_image.nii

The eroded white matter mask is shown in red in the above image & the newly Segmentator mask in yellow. As you can see, the new mask selectively captures thin white matter regions. After the Gaussian smoothing of the white matter mask, thin stretches of white matter are characterised by low intensity and gradient magnitude (below the main arc). Therefore, they can be separated, and the resulting mask can be used to restore erroneously eroded white matter: fslmaths /path/to/eroded_wm_mask.nii -add /path/to/new_image.nii -bin /path/to/corrected_wm_mask.nii

Clone this wiki locally