Atlas-based segmentation of the pituitary in MR images.
- Now supports multi-atlas segmentation. Check out
multi_atlas_example.pyfor more details. - Also provides a command-line tool for automatic pituitary segmentation without dependency on Python or ANTsPy.
- Python tools
- For segmentation using a single atlas, use
main.py. - For an example of how to leverage multiple atlases to give more robust segmentation, see
multi_atlas_example.py.
- For segmentation using a single atlas, use
- Bash tool (recommended)
- For the command-line tool written bash that supprots multiple atlases, use
pituitary_segmentation.sh.
- For the command-line tool written bash that supprots multiple atlases, use
Check out ANTs' official repository for instructions on how to install ANTs.
Atlas-based pituitary segmentation using ANTs.
Usage: ./pituitary_segmentation.sh <input> <output> [-t transform] [-c cutoff] [-m threads] [-n] [-h]
Options:
<input> Input image filename.
<output> Output image filename.
-t transform Type of transform to use in registration. Default: Affine. Currently supported: Affine, SyN, SyNQuick.
-c cutoff Cutoff value for the mask. Default: 5.
-m threads Number of threads to use. Default: 1. Increase this value to speed up the registration process.
-n Apply N4 bias correction to the input image.
-h Display this help message.
To install ANTsPy, run:
pip install antspyxpython main.py --in <input_image> --out <output_image>--transform: Specify the type of transform to use for ANTs registration. Default isAffine. For other options, see ANTsPy documentation.--n4: Optionally apply N4 bias correction to the input image.