Compute a mask file from fMRI data in 3D or 4D ndarrays.
Compute and write the mask of an image based on the grey level This is based on an heuristic proposed by T.Nichols: find the least dense point of the histogram, between fractions m and M of the total image histogram.
In case of failure, it is usually advisable to increase m.
Parameters: | mean_volume : 3D ndarray
reference_volume: 3D ndarray, optional :
m : float, optional
M: float, optional :
cc: boolean, optional :
|
---|---|
Returns: | mask : 3D boolean ndarray
|
Compute a mask file from fMRI nifti file(s)
Compute and write the mask of an image based on the grey level This is based on an heuristic proposed by T.Nichols: find the least dense point of the histogram, between fractions m and M of the total image histogram.
In case of failure, it is usually advisable to increase m.
Parameters: | input_filename : string
output_filename : string or None, optional
return_mean : boolean, optional
copy_filename : string, optional
m : float, optional
M: float, optional :
cc: boolean, optional :
|
---|---|
Returns: | mask : nifti.NiftiImage object
mean_image : 3d ndarray, optional
|
Compute a common mask for several sessions of fMRI data.
Uses the mask-finding algorithmes to extract masks for each session, and then keep only the main connected component of the a given fraction of the intersection of all the masks.
Parameters: | session_files : list of list of strings
threshold : float, optional
m : float, optional
M: float, optional :
cc: boolean, optional :
|
---|---|
Returns: | mask : 3D boolean ndarray
|