AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
Daniel Glen
March 04, 2010 04:24PM
Rick and I looked at your data, and the problem with it is the NIFTI datasets are not properly formed. They are missing any kind of orientation information that would be contained in the sform or qform in the NIFTI header. This is true for both the mask and the functional datasets. The mask dataset also has the problem of not having properly matched voxel dimensions, it seems, because the mask has the "pixdim" field set to 1 mm^3 voxels instead of the 3 mm^3 voxels in your functional dataset. (The functional dataset also seems to have an incorrect TR between volumes of 1750 seconds, but that wasn't really part of your question.) Because the header is incorrect, the conversion to AFNI at that point doesn't help.

The best thing to do would be to get the package that writes the data to write it properly. You had mentioned MVPA, which I know nothing about, but I googled it and found they actually use the AFNI matlab library to write out AFNI format datasets by default, I believe. Using the AFNI format there may alleviate these headaches.

If you can't avoid the NIFTI format output of MVPA, then you can roughly work around the problem by changing the NIFTI header using a command like this to change the voxel dimensions:

nifti_tool -infiles l_FEF_anat.nii -mod_hdr -overwrite -mod_field pixdim "0.0 3.0 3.0 3.0 1 0.0 0.0 0.0"

The equivalent on the AFNI format file is this:

3drefit -xdel 3 -ydel 3 -zdel 3 -keepcen l_FEF_anat_mask+orig

To copy the geometry from a dataset to another, you can also do this:
to3d -prefix anat_masknii2.nii -geomparent sbrt15Visac_Run1.nii 3D:-1:0:64:64:32:l_FEF_anat.nii

All this is fairly dangerous though, not knowing the orientation at all, so left from right, for instance, is tricky.
Subject Author Posted

converting anat masks from Analyze to afni

Julia March 02, 2010 10:09AM

Re: converting anat masks from Analyze to afni

Daniel Glen March 02, 2010 10:52AM

Re: converting anat masks from Analyze to afni

Julia March 02, 2010 12:39PM

Re: converting anat masks from Analyze to afni

Daniel Glen March 02, 2010 12:56PM

Re: converting anat masks from Analyze to afni

Julia March 02, 2010 01:10PM

Re: converting anat masks from Analyze to afni

Daniel Glen March 02, 2010 01:51PM

Re: converting anat masks from Analyze to afni

Julia March 03, 2010 05:38AM

Re: converting anat masks from Analyze to afni

Daniel Glen March 04, 2010 04:24PM