Hi
how can I import AFNI (.brik .head) contrast files to Neurovault?
thanks!
Hi
how can I import AFNI (.brik .head) contrast files to Neurovault?
thanks!
There’s a 3dAFNItoNIFTI command that might help !
https://afni.nimh.nih.gov/pub/dist/doc/program_help/3dAFNItoNIFTI.html
Hi-
Replying to this a bit late, but some things to note:
AFNI can both read and write NIFTI; in many programs, to write NIFTI you just have your “-prefix …” filename end with “.nii” or “.nii.gz”.
In addition to the program noted by @emdupre, there are also the following options:
3dcopy DSET*.HEAD NEW_DSET.nii.gz
Since AFNI allows having 4D volumes (that is, like a time axis of data sets, or just stacking volumes together in sequence), we also have functionality to select subsets of volumes (like “slicing” in Python).
Let’s say a dset MY_DSET has 30 volumes; AFNI uses zerobased counting for indexes (again, like Python, but different than say Matlab), so the index range goes from [0, 29]. You can use a 3dcalc command to “copy” either the full dset or a subset to NIFTI. The rules for indexes are fairly straightforward:
Some examples of using 3dcalc to copy datasets:
full copy
3dcalc -a MY_DSET -expr “a” -prefix NEW_DSET.nii.gz
select just the “first” volume in the dset to copy
3dcalc -a MY_DSET"[0]" -expr “a” -prefix NEW_DSET_firstvol.nii.gz
select just the first 14 volumes and the 18th vol in the dset to copy
3dcalc -a MY_DSET"[0…13,17]" -expr “a” -prefix NEW_DSET_firstvol.nii.gz
select just the vols from index 15 to The End of the dset in the dset to copy
3dcalc -a MY_DSET"[15…$]" -expr “a” -prefix NEW_DSET_firstvol.nii.gz
–pt
MANAGED BY INCF