File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -706,13 +706,16 @@ def agg_data(self, intent_code=None):
706
706
707
707
darrays = self .darrays if intent_code is None else self .get_arrays_from_intent (intent_code )
708
708
all_data = tuple (da .data for da in darrays )
709
- all_intent = tuple ( intent_codes . niistring [ da .intent ] for da in darrays )
709
+ all_intent = { da .intent for da in darrays }
710
710
711
711
# Gifti files allows usually one or more data array of the same intent code
712
712
# surf.gii is a special case of having two data array of different intent code
713
713
714
- if (self .numDA > 1 and all (el == all_intent [0 ] for el in all_intent )):
715
- return np .column_stack (all_data )
714
+ if self .numDA > 1 and len (all_intent ) == 1 :
715
+ if all_intent == 'NIFTI_INTENT_TIME_SERIES' : # stack when the gifti is a timeseries
716
+ return np .column_stack (all_data )
717
+ else :
718
+ return all_data
716
719
else :
717
720
return all_data
718
721
You can’t perform that action at this time.
0 commit comments