Skip to content

Commit 9dad02e

Browse files
author
Shoshana Berleant
committed
binarize global maps
1 parent 9df8d8a commit 9dad02e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nipype/interfaces/nilearn.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ def _process_inputs(self):
119119
self.inputs.label_files))
120120

121121
if self.inputs.include_global:
122-
global_label_data = label_data.get_data().clip(0, 1).sum(axis=3)
122+
global_label_data = label_data.get_data().sum(axis=3)
123+
global_label_data = np.rint(global_label_data).astype(int).clip(0, 1)
123124
global_label_data = global_label_data[:, :, :, np.newaxis] # add back 4th dimension
124125
global_label_data = nb.Nifti1Image(global_label_data, np.eye(4))
125126
global_masker = nl.NiftiMapsMasker(global_label_data, detrend=self.inputs.detrend)

0 commit comments

Comments
 (0)