Skip to content

Case V: Bottlenose dolphin brain

Omer Faruk Gulban edited this page Dec 4, 2019 · 19 revisions

Segmentator can be used to remove most of the sulci from bottlenose dolphin brain segmentation instead of slice-by-slice manual removal.

Software

Package Used version
Segmentator 1.4.0
FSL-fslmaths 5.0.9
scikit-image 0.13.0

Data

  • A bottlenose dolphin brain from braincatalogue.org.

  • And a work-in-progress community brain segmentation acquired from brainbox [date: 2018/02/05].

Problem

Slice-by-slice manual removal of the sulci requires a lot of time considering the highly convoluted dolphin cortical structure and the amount of slices.

Solution

A significant chunk of manual slice-by-slice work can be replaced by using Segmentator and a few morphological operations. Please note that this is not to say the proposed solution completely replaces the slice-by-slice manual editing but gives a significant boost by providing a better starting point.

  1. The image homogeneity seems to be quite ok, therefore I did not perform any image inhomogeneity correction (see general preprocessing for further details on this).

  2. Position the red circular mask in the 2D Histogram (left panel) in a way to leave out the unwanted tissues (e.g sulci and ventricles) in the image browser (right panel) after calling Segmentator from the command line:

segmentator /path/to/dolphin_brain.nii.gz --percmin 0 --percmax 100 --scale 255

Note: The additional flags are needed to prevent the appearance of empty bins in the 2D histogram.

  1. Export the binary mask of the selected voxels by clicking the Export Nifti button. This step will create a new nifti file in the folder of the dolphin brain.

  2. Apply 1 step of morphological opening followed by closing to the nifti mask acquired in the previous step (see morphological operations page). This step is done to get rid of theresidual thin structures in sulci and to patch-up small holes in white matter.

  3. (optional) Apply fslmaths fill holes for further patching up:

fslmaths /path/to/mask_open_close.nii.gz -fillh /path/to/mask_open_close_fillh.nii.gz

Steps 2-4 are visualized:

  1. At this point I thought that the white matter came out too patchy, therefore I have decided to grab a bigger portion of the white matter to add it to the sulci-free brain mask later:
  1. Apply 1 step of morphological opening followed by closing (similar to step 3).

  2. Apply connected clusters thresholding to remove residual dust-like mislabelling that might still appear inside sulci.

python connected_clusters.py /path/to/mask_open_close_fillh.nii.gz -c 200

Note: This is a utility command that I have written but not included in Segmentator yet. Download the connected_cluster.py script in the link, cd to its location and execute the command python connected_clusters.py -h for further details of usage. TODO: Include connected_clusters.py in Segmentator and update this entry.

  1. One step dilation for filling in some more white matter.

  2. Patch up the initial mask with the later WM nifti using fslmaths

fslmaths /path/to/mask_1.nii.gz -add /path/to/mask_2.nii.gz -bin /path/to/merged.nii.gz
  1. Fill holes for further pathching up:
fslmaths /path/to/mask.nii.gz fillh26 /path/to/mask_fillh.nii.gz

Steps between 6-10 are visualized:

  1. Final 1 step dilation for thinner sulci.

Conclusion:

There is still quite some slice-by-slice manual work that needs to be done however I think that the total amount of effort required in the long run is significantly reduced. I would like to emphasize that the pipeline demonstrated here should not be considered as rigid. I have observed and reacted at each step according to the task at hand by using an arsenal of simple tools (Segmentator, morphology, connected clusters, hole filling).

Clone this wiki locally