|
9 | 9 | % |
10 | 10 | % input: |
11 | 11 | % name: a header name as a string, currently support the below nii |
12 | | -% headers: 'intent_code', 'slice_code', 'datatype', 'qform', |
13 | | -% 'sform' and 'xyzt_units' and their corresponding JNIfTI |
| 12 | +% headers: 'intent_code', 'slice_code', 'datatype', 'qform_code', |
| 13 | +% 'sform_code' and 'xyzt_units' and their corresponding JNIfTI |
14 | 14 | % headers: |
15 | 15 | % 'Intent','SliceType','DataType','QForm','SForm','Unit' |
16 | 16 | % value:the current header value, if it is a code, newval will |
|
30 | 30 | % |
31 | 31 | % this file was initially developed for the MCX project: https://github.com/fangq/mcx/blob/master/utils/mcxloadnii.m |
32 | 32 | % |
33 | | -% this file is part of JNIfTI specification: https://github.com/NeuroJSON/jnifti |
| 33 | +% this file is part of JNIfTI specification: https://github.com/NeuroJSON/jnifty |
34 | 34 | % |
35 | | -% License: Apache 2.0, see https://github.com/NeuroJSON/jnifti for details |
| 35 | +% License: Apache 2.0, see https://github.com/NeuroJSON/jnifty for details |
36 | 36 | % |
37 | 37 |
|
38 | 38 | % code to name look-up-table |
|
42 | 42 | return |
43 | 43 | end |
44 | 44 |
|
45 | | -lut.intent_code = containers.Map([0, 2:24 1001:1011 2001:2005], ... |
| 45 | +lut.intent_code = containers.Map([0, 2:24 1001:1011 2001:2005 2006:2009 2016:2018], ... |
46 | 46 | {'', 'corr', 'ttest', 'ftest', 'zscore', 'chi2', 'beta', ... |
47 | 47 | 'binomial', 'gamma', 'poisson', 'normal', 'ncftest', ... |
48 | 48 | 'ncchi2', 'logistic', 'laplace', 'uniform', 'ncttest', ... |
49 | 49 | 'weibull', 'chi', 'invgauss', 'extval', 'pvalue', ... |
50 | 50 | 'logpvalue', 'log10pvalue', 'estimate', 'label', 'neuronames', ... |
51 | 51 | 'matrix', 'symmatrix', 'dispvec', 'vector', 'point', 'triangle', ... |
52 | | - 'quaternion', 'unitless', 'tseries', 'elem', 'rgb', 'rgba', 'shape'}); |
| 52 | + 'quaternion', 'unitless', 'tseries', 'elem', 'rgb', 'rgba', 'shape', ... |
| 53 | + 'fsl_fnirt_displacement_field', 'fsl_cubic_spline_coefficients', ... |
| 54 | + 'fsl_dct_coefficients', 'fsl_quadratic_spline_coefficients', ... |
| 55 | + 'fsl_topup_cubic_spline_coefficients', 'fsl_topup_quadratic_spline_coefficients', ... |
| 56 | + 'fsl_topup_field'}); |
53 | 57 |
|
54 | 58 | lut.slice_code = containers.Map(0:6, {'', 'seq+', 'seq-', 'alt+', 'alt-', 'alt2+', 'alt-'}); |
55 | 59 |
|
|
61 | 65 | lut.xyzt_units = containers.Map([0:3 8 16 24 32 40 48], ... |
62 | 66 | {'', 'm', 'mm', 'um', 's', 'ms', 'us', 'hz', 'ppm', 'rad'}); |
63 | 67 |
|
64 | | -lut.qform = containers.Map(0:4, {'', 'scanner', 'aligned', 'talairach', 'mni'}); |
| 68 | +lut.qform_code = containers.Map(0:5, {'', 'scanner_anat', 'aligned_anat', 'talairach', 'mni_152', 'template_other'}); |
65 | 69 |
|
66 | 70 | lut.unit = lut.xyzt_units; |
67 | | -lut.sform = lut.qform; |
| 71 | +lut.sform_code = lut.qform_code; |
68 | 72 | lut.slicetype = lut.slice_code; |
69 | 73 | lut.intent = lut.intent_code; |
70 | 74 |
|
|
74 | 78 | tul.slice_code = containers.Map(values(lut.slice_code), keys(lut.slice_code)); |
75 | 79 | tul.datatype = containers.Map(values(lut.datatype), keys(lut.datatype)); |
76 | 80 | tul.xyzt_units = containers.Map(values(lut.xyzt_units), keys(lut.xyzt_units)); |
77 | | -tul.qform = containers.Map(values(lut.qform), keys(lut.qform)); |
| 81 | +tul.qform_code = containers.Map(values(lut.qform_code), keys(lut.qform_code)); |
78 | 82 |
|
79 | | -tul.sform = tul.qform; |
| 83 | +tul.sform_code = tul.qform_code; |
80 | 84 | tul.slicetype = tul.slice_code; |
81 | 85 | tul.intent = tul.intent_code; |
82 | 86 | tul.unit = tul.xyzt_units; |
|
0 commit comments