Note

This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the user guide for the big picture.

5.3.3. sammba.registration.fmri_sessions_to_template

sammba.registration.fmri_sessions_to_template(sessions, t_r, head_template_filename, write_dir, brain_volume, use_rats_tool=True, brain_template_filename=None, dilated_head_mask_filename=None, prior_rigid_body_registration=False, slice_timing=True, registration_kind='nonlinear', maxlev=2, func_voxel_size=None, caching=False, verbose=True)

DEPRECATED: Function ‘fmri_sessions_to_template’ is deprecated and will be removed in future release. Use class ‘TemplateRegistrator’ instead.

Registration of subject’s functional and anatomical images to

a given template.

Parameters

sessions : sequence of sammba.registration.FMRISession

fMRI sessions to register.

t_rfloat

Repetition time for the EPI, in seconds.

head_template_filenamestr

Template to register the functional to.

brain_volumeint

Volume of the brain in mm3 used for brain extraction. Typically 400 for mouse and 1800 for rat.

use_rats_toolbool, optional

If True, brain mask is computed using RATS Mathematical Morphology. Otherwise, a histogram-based brain segmentation is used.

write_dirstr

Path to the affine 1D transform from anatomical to template space.

brain_template_filenamestr, optional

Path to a brain template, passed to sammba.registration.anats_to_template

dilated_head_mask_filenamestr, optional

Path to a dilated head mask, passed to sammba.registration.anats_to_template

registration_kindone of {‘rigid’, ‘affine’, ‘nonlinear’}, optional

The allowed transform kind from anat to template.

maxlevint or None, optional

Maximal level for the warp when registering anat to template. Passed to sammba.registration.anats_to_template

func_voxel_size3-tuple of floats, optional

Voxel size of the registered functional, in mm.

cachingbool, optional

Wether or not to use caching.

verbosebool, optional

If True, all steps are verbose. Note that caching implies some verbosity in any case.

Returns

the same sequence with each animal_data updated: the following attributes

are added
  • template_str

    Path to the given registration template.

  • output_dir_str

    Path to the output directory for each animal.

  • coreg_func_str

    Path to the coregistered functional image.

  • coreg_anat_str

    Path to the coregistered anatomical image.

  • coreg_transform_str

    Path to the transform from anat to func.

  • registered_func_str

    Path to the functional registered to template.

  • registered_anat_str

    Path to the anatomical registered to template.

Notes

If use_rats_tool is turned on, RATS tool is used for brain extraction and has to be cited. For more information, see RATS