01d18e835815feedeac2fbeff8025cdd94128eaa,pynets/fmri/clustools.py,NilParcellate,create_clean_mask,#NilParcellate#,411

Before Change


        self._mask_data = np.asarray(self._clust_mask_img.dataobj).astype("bool").astype("uint8")

        // Ensure mask does not inclue voxels outside of the brain
        self._masked_fmri_vol = np.asarray(self._func_img.dataobj)[:, :, :, 0]
        self._masked_fmri_vol = self._masked_fmri_vol.astype("bool")
        self._mask_data[~self._masked_fmri_vol] = 0
        del self._masked_fmri_vol

After Change


        clust_mask_res_img = resample_img(nib.load(self.clust_mask), target_affine=func_vol_img.affine,
                                          target_shape=func_vol_img.shape, interpolation="nearest")
        if self._mask_img is not None:
            mask_res_img = compute_gray_matter_mask(resample_img(self._mask_img, target_affine=func_vol_img.affine,
                                                                 target_shape=func_vol_img.shape,
                                                                 interpolation="nearest"))
            self._clust_mask_corr_img = intersect_masks([math_img("img > 0", img=func_vol_img),
                                                         math_img("img > 0", img=clust_mask_res_img),
                                                         math_img("img > 0", img=mask_res_img)],
                                                        threshold=1, connected=False)
            self._mask_img.uncache()
            mask_res_img.uncache()
        else:
            self._clust_mask_corr_img = intersect_masks([math_img("img > 0", img=func_vol_img),
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: dPys/PyNets
Commit Name: 01d18e835815feedeac2fbeff8025cdd94128eaa
Time: 2019-12-09
Author: dpisner@utexas.edu
File Name: pynets/fmri/clustools.py
Class Name: NilParcellate
Method Name: create_clean_mask


Project Name: nilearn/nilearn
Commit Name: b28f80346270231ff2ef253af7ef4c5cd37f0916
Time: 2014-03-31
Author: virgile.fritsch@gmail.com
File Name: plot_localizer_mass_univariate.py
Class Name:
Method Name:


Project Name: nilearn/nilearn
Commit Name: 5808d9662cbe1266396d08656a6dc9ac1dca8383
Time: 2018-10-16
Author: pierre.bellec@gmail.com
File Name: nilearn/image/tests/test_resampling.py
Class Name:
Method Name: test_resampling_fill_value