pyrobex package¶
Submodules¶
pyrobex.cli module¶
pyrobex.cli
console script for pyrobex
this is a silly script because it provides a python script interface to a bash script, but it’s slightly easier to deploy because of setup.py and it allows easy testing of the pyrobex package
Author: Jacob Reinhold (jcreinhold@gmail.com) Created on: May 6, 2021
pyrobex.errors module¶
pyrobex.errors
pyrobex-specific errors
Author: Jacob Reinhold (jcreinhold@gmail.com) Created on: May 5, 2021
pyrobex.io module¶
pyrobex.io
load an image with either antspy or nibabel
Author: Jacob Reinhold (jcreinhold@gmail.com) Created on: May 6, 2021
pyrobex.robex module¶
pyrobex.robex
main python wrapper functions for robex
Author: Jacob Reinhold (jcreinhold@gmail.com) Created on: May 5, 2021
- pyrobex.robex.robex(image: NiftiImage, seed: int = 0) Tuple[NiftiImage, NiftiImage] [source]¶
Takes a NIfTI image from nibabel or antspy and performs ROBEX brain extraction on the image volume
- Parameters
image (NiftiImage) – a nibabel NIfTI image, e.g., nib.Nifti1Image, or an antspy image
seed (int) – random seed for reproducibility
- Returns
- depending on the input,
returns a nibabel NIfTI image or an antspy image of the extracted brain
- mask (NiftiImage): depending on the input,
returns a nibabel NIfTI image or an antspy image of a binary mask of the brain
- Return type
stripped (NiftiImage)
- Raises
PyRobexError – when ROBEX is not found or fails
- pyrobex.robex.robex_mask(image: NiftiImage, seed: int = 0) NiftiImage [source]¶
Takes a NIfTI image from nibabel or antspy and performs ROBEX brain extraction on the image volume and returns only the mask
- Parameters
image (NiftiImage) – a nibabel NIfTI image, e.g., nib.Nifti1Image, or an antspy image
seed (int) – random seed for reproducibility
- Returns
- depending on the input,
returns a nibabel NIfTI image or an antspy image of a binary mask of the brain
- Return type
mask (NiftiImage)
- Raises
PyRobexError – when ROBEX is not found or fails
- pyrobex.robex.robex_stripped(image: NiftiImage, seed: int = 0) NiftiImage [source]¶
Takes a NIfTI image from nibabel or antspy and performs ROBEX brain extraction on the image volume and returns only the extracted brain image
- Parameters
image (NiftiImage) – a nibabel NIfTI image, e.g., nib.Nifti1Image, or an antspy image
seed (int) – random seed for reproducibility
- Returns
- depending on the input,
returns a nibabel NIfTI image or an antspy image of the extracted brain
- Return type
stripped (NiftiImage)
- Raises
PyRobexError – when ROBEX is not found or fails
Module contents¶
Top-level package for pyrobex.