Skip to content

Commit 7551209

Browse files
satraeffigies
authored andcommitted
fix: updated to reflect latest CIFTI-2 spec and nifti extensions
1 parent 3d73dff commit 7551209

File tree

1 file changed

+25
-12
lines changed

1 file changed

+25
-12
lines changed

nibabel/nifti1.py

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -232,18 +232,31 @@
232232
(2003, 'rgb vector', (), "NIFTI_INTENT_RGB_VECTOR"),
233233
(2004, 'rgba vector', (), "NIFTI_INTENT_RGBA_VECTOR"),
234234
(2005, 'shape', (), "NIFTI_INTENT_SHAPE"),
235-
# The codes below appear on the CIFTI page, but don't appear to have
236-
# reached the nifti standard as of 19 August 2013
237-
# https://www.nitrc.org/plugins/mwiki/index.php/cifti:ConnectivityMatrixFileFormats
235+
# The codes below appear on the CIFTI-2 standard
236+
# http://www.nitrc.org/plugins/mwiki/index.php/cifti:ConnectivityMatrixFileFormats
237+
# https://www.nitrc.org/forum/attachment.php?attachid=341&group_id=454&forum_id=1955
238+
(3000, 'dense fiber/fan samples', (), 'NIFTI_INTENT_CONNECTIVITY_UNKNOWN'),
238239
(3001, 'dense connectivity', (), 'NIFTI_INTENT_CONNECTIVITY_DENSE'),
239-
(3002, 'dense time connectivity', (),
240-
'NIFTI_INTENT_CONNECTIVITY_DENSE_TIME'),
240+
(3002, 'dense data series/fiber fans', (),
241+
'NIFTI_INTENT_CONNECTIVITY_DENSE_SERIES'),
241242
(3003, 'parcellated connectivity', (),
242243
'NIFTI_INTENT_CONNECTIVITY_PARCELLATED'),
243-
(3004, 'parcellated time connectivity', (),
244-
"NIFTI_INTENT_CONNECTIVITY_PARCELLATED_TIME"),
245-
(3005, 'trajectory connectivity', (),
246-
'NIFTI_INTENT_CONNECTIVITY_CONNECTIVITY_TRAJECTORY'),
244+
(3004, 'parcellated data series', (),
245+
"NIFTI_INTENT_CONNECTIVITY_PARCELLATED_SERIES"),
246+
(3006, 'dense scalar', (),
247+
'NIFTI_INTENT_CONNECTIVITY_DENSE_SCALARS'),
248+
(3007, 'dense label', (),
249+
'NIFTI_INTENT_CONNECTIVITY_DENSE_LABELS'),
250+
(3008, 'parcellated scalar', (),
251+
'NIFTI_INTENT_CONNECTIVITY_PARCELLATED_SCALAR'),
252+
(3009, 'parcellated dense connectivity', (),
253+
'NIFTI_INTENT_CONNECTIVITY_PARCELLATED_DENSE'),
254+
(3010, 'dense parcellated connectivity', (),
255+
'NIFTI_INTENT_CONNECTIVITY_DENSE_PARCELLATED'),
256+
(3011, 'parcellated connectivity series', (),
257+
'NIFTI_INTENT_CONNECTIVITY_PARCELLATED_PARCELLATED_SERIES'),
258+
(3012, 'parcellated connectivity scalar', (),
259+
'NIFTI_INTENT_CONNECTIVITY_PARCELLATED_PARCELLATED_SCALAR'),
247260
), fields=('code', 'label', 'parameters', 'niistring'))
248261

249262

@@ -482,9 +495,9 @@ def _mangle(self, dataset):
482495
(10, "jimdiminfo", Nifti1Extension),
483496
(12, "workflow_fwds", Nifti1Extension),
484497
(14, "freesurfer", Nifti1Extension),
485-
(16, "pypickle", Nifti1Extension)
486-
),
487-
fields=('code', 'label', 'handler'))
498+
(16, "pypickle", Nifti1Extension),
499+
(32, "cifti", Nifti1Extension)
500+
), fields=('code', 'label', 'handler'))
488501

489502

490503
class Nifti1Extensions(list):

0 commit comments

Comments
 (0)