24
24
from .. import xmlutils as xml
25
25
from ..externals import inflection
26
26
from ..externals .six import BytesIO
27
- from ..nifti1 import Nifti1Extension , extension_codes
27
+ from ..nifti1 import Nifti1Extension , extension_codes , intent_codes
28
28
from ..nifti2 import Nifti2Header , Nifti2Image
29
29
30
30
@@ -50,6 +50,33 @@ def _mangle(self, value):
50
50
extension_codes .add_codes ((
51
51
(CiftiExtension .code , "cifti" , CiftiExtension ),))
52
52
53
+ intent_codes .add_codes ((
54
+ # The codes below appear on the CIFTI-2 standard
55
+ # http://www.nitrc.org/plugins/mwiki/index.php/cifti:ConnectivityMatrixFileFormats
56
+ # https://www.nitrc.org/forum/attachment.php?attachid=341&group_id=454&forum_id=1955
57
+ (3000 , 'dense fiber/fan samples' , (), 'NIFTI_INTENT_CONNECTIVITY_UNKNOWN' ),
58
+ (3001 , 'dense connectivity' , (), 'NIFTI_INTENT_CONNECTIVITY_DENSE' ),
59
+ (3002 , 'dense data series/fiber fans' , (),
60
+ 'NIFTI_INTENT_CONNECTIVITY_DENSE_SERIES' ),
61
+ (3003 , 'parcellated connectivity' , (),
62
+ 'NIFTI_INTENT_CONNECTIVITY_PARCELLATED' ),
63
+ (3004 , 'parcellated data series' , (),
64
+ "NIFTI_INTENT_CONNECTIVITY_PARCELLATED_SERIES" ),
65
+ (3006 , 'dense scalar' , (),
66
+ 'NIFTI_INTENT_CONNECTIVITY_DENSE_SCALARS' ),
67
+ (3007 , 'dense label' , (),
68
+ 'NIFTI_INTENT_CONNECTIVITY_DENSE_LABELS' ),
69
+ (3008 , 'parcellated scalar' , (),
70
+ 'NIFTI_INTENT_CONNECTIVITY_PARCELLATED_SCALAR' ),
71
+ (3009 , 'parcellated dense connectivity' , (),
72
+ 'NIFTI_INTENT_CONNECTIVITY_PARCELLATED_DENSE' ),
73
+ (3010 , 'dense parcellated connectivity' , (),
74
+ 'NIFTI_INTENT_CONNECTIVITY_DENSE_PARCELLATED' ),
75
+ (3011 , 'parcellated connectivity series' , (),
76
+ 'NIFTI_INTENT_CONNECTIVITY_PARCELLATED_PARCELLATED_SERIES' ),
77
+ (3012 , 'parcellated connectivity scalar' , (),
78
+ 'NIFTI_INTENT_CONNECTIVITY_PARCELLATED_PARCELLATED_SCALAR' )))
79
+
53
80
54
81
class _CiftiAsNiftiHeader (Nifti2Header ):
55
82
''' Class for Cifti2 header extension '''
0 commit comments