aslprep.interfaces.niworkflows module
Interfaces derived from niworkflows.
- class EstimateReferenceImage(from_file=None, resource_monitor=None, **inputs)[source]
Bases:
SimpleInterface
Generate a reference 3D map from BOLD and SBRef EPI images for BOLD datasets.
Given a 4D BOLD file or one or more 3/4D SBRefs, estimate a reference image for subsequent motion estimation and coregistration steps. For the case of BOLD datasets, it estimates a number of T1w saturated volumes (non-steady state at the beginning of the scan) and calculates the median across them. Otherwise (SBRefs or detected zero non-steady state frames), a median of of a subset of motion corrected volumes is used. If the input reference (BOLD or SBRef) is 3D already, it just returns a copy of the image with the NIfTI header extensions removed.
LIMITATION: If one wants to extract the reference from several SBRefs with several echoes each, the first echo should be selected elsewhere and run this interface in
multiecho = False
mode.- Mandatory Inputs:
in_file (a list of items which are a pathlike object or string representing an existing file) – 4D EPI file. If multiple files are provided, they are assumed to represent multiple echoes from the same run.
- Optional Inputs:
mc_method (‘AFNI’ or ‘FSL’) – Which software to use to perform motion correction. (Nipype default value:
AFNI
)multiecho (a boolean) – If multiecho data was supplied, data from the first echo will be selected. (Nipype default value:
False
)sbref_file (a list of items which are a pathlike object or string representing an existing file) – Single band reference image. If multiple files are provided, they are assumed to represent multiple echoes.
- Outputs:
n_volumes_to_discard (an integer) – Number of detected non-steady state volumes in the beginning of the input file.
ref_image (a pathlike object or string representing an existing file) – 3D reference image.