File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -124,15 +124,15 @@ def _process_inputs(self):
124
124
maskers = []
125
125
126
126
# determine form of label files, choose appropriate nilearn masker
127
- if np .amax (label_data .get_data () ) > 1 : # 3d label file
128
- n_labels = np .amax (label_data .get_data () )
127
+ if np .amax (label_data .dataobj ) > 1 : # 3d label file
128
+ n_labels = np .amax (label_data .dataobj )
129
129
maskers .append (nl .NiftiLabelsMasker (label_data ))
130
130
else : # 4d labels
131
- n_labels = label_data .get_data (). shape [3 ]
131
+ n_labels = label_data .shape [3 ]
132
132
if self .inputs .incl_shared_variance : # independent computation
133
133
for img in nli .iter_img (label_data ):
134
134
maskers .append (
135
- nl .NiftiMapsMasker (self ._4d (img .get_data () , img .affine ))
135
+ nl .NiftiMapsMasker (self ._4d (img .dataobj , img .affine ))
136
136
)
137
137
else : # one computation fitting all
138
138
maskers .append (nl .NiftiMapsMasker (label_data ))
@@ -155,9 +155,7 @@ def _process_inputs(self):
155
155
)
156
156
157
157
if self .inputs .include_global :
158
- global_label_data = label_data .get_data ().sum (
159
- axis = 3
160
- ) # sum across all regions
158
+ global_label_data = label_data .dataobj .sum (axis = 3 ) # sum across all regions
161
159
global_label_data = (
162
160
np .rint (global_label_data ).astype (int ).clip (0 , 1 )
163
161
) # binarize
You can’t perform that action at this time.
0 commit comments