64faf99202c30fedc666f9846f8af017cecf8efd,nilearn/masking.py,,compute_gray_matter_mask,#Any#Any#Any#Any#Any#Any#,522
Before Change
from .image.resampling import resample_to_img
resampled_template = cache(resample_to_img, memory)(template, target_img)
mask = get_data(resampled_template) >= threshold
mask, affine = _post_process_mask(mask, target_img.affine, opening=opening,
connected=connected,
warning_msg="Gray matter mask is empty, "
"lower the threshold or "
"check your input FOV")
return new_img_like(target_img, mask, affine)
def compute_multi_gray_matter_mask(target_imgs, threshold=.5,
connected=True, opening=2,
After Change
mask : nibabel.Nifti1Image
The brain mask (3D image)
return compute_brain_mask(target_img=target_img, threshold=threshold,
connected=connected, opening=opening,
memory=memory, verbose=verbose)
def compute_brain_mask(target_img, threshold=.5, connected=True,
opening=2, memory=None, verbose=0):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: nilearn/nilearn
Commit Name: 64faf99202c30fedc666f9846f8af017cecf8efd
Time: 2020-05-21
Author: ana.pinho@inria.fr
File Name: nilearn/masking.py
Class Name:
Method Name: compute_gray_matter_mask
Project Name: nilearn/nilearn
Commit Name: 057ce85932ea16e86f85fba1e837fa7b50d43584
Time: 2015-04-20
Author: abraham.alexandre@gmail.com
File Name: nilearn/_utils/niimg_conversions.py
Class Name:
Method Name: check_niimg_3d
Project Name: ellisdg/3DUnetCNN
Commit Name: a48b055a628bfa648a0b5a371838848e997440e2
Time: 2017-05-17
Author: david.ellis@unmc.edu
File Name: unet3d/normalize.py
Class Name:
Method Name: get_complete_foreground