Skip to content

Legacy Segmentation Tool (fetal_brain_seg)

Michael Ebner edited this page Jan 30, 2021 · 1 revision

Using the legacy segmentation tool in NiftyMIC

NiftyMIC releases before v0.8 relied on fetal_brain_seg as automated fetal brain segmentation tool. If required, this can still be used instead of the default monaifbs segmentation tool.

Requirements and Dependencies

Installation

  1. Install NiftyMIC and all its dependencies

  2. Check fetal_brain_seg installation:

    • add export FETAL_BRAIN_SEG="absolute-path-to-fetal_brain_seg to your .bashrc (or equivalent)
    • run python -m nose tests/installation_test_fetal_brain_seg.py and verify the fetal_brain_seg tool is used.

Using fetal_brain_seg

The NiftyMIC command needed to generate the automated brain masks with fetal_brain_seg is:

niftymic_segment_fetal_brains \
--filenames \
nifti/name-of-stack-1.nii.gz \
nifti/name-of-stack-2.nii.gz \
nifti/name-of-stack-N.nii.gz \
--filenames-masks \
seg/name-of-stack-1.nii.gz \
seg/name-of-stack-2.nii.gz \
seg/name-of-stack-N.nii.gz \
--neuroimage-legacy-seg 1

The subsequent reconstruction pipeline command is unchanged (more information here).