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  

|
August 13, 2014 12:21PM
While Rick is definitely the expert here, I think you need to do the following:

1) Install dependencies necessary to build at all, these vary by your system but on my computer were things like FreeType, Expat, and FontConfig
2) Download AFNI source for your system
3) In afni_src folder, copy the makefile for your system and then rename the copy as just Makefile
4) Build libmri - make libmri.a (not necessary to build everything)
5) Build your code using the list of dependencies (usually helps to be in the AFNI source directory, but not required):
gcc 3dMyTest.c -o 3dMyTest -lmri -lXt -lf2c -lz -lexpat \
-I nifti/niftilib/ -I nifti/nifticdf -I nifti/znzlib -I /opt/X11/include/ \
-I rickr -L . -L /opt/X11/lib/


Depending on what your eventual goal is, you could also just use the C NIFTI library for reading/writing of NIFTI files or there are a series of libraries in Python, Ruby, MATLAB, and R for reading and writing NIFTI formatted files. I'm sure the folks over at PyMVPA and Nipy/Nibabel have done similar things. There is also the R_io library for reading and writing AFNI datasets with R.



Edited 2 time(s). Last edit at 08/13/2014 12:21PM by Peter Molfese.
Subject Author Posted

Read afni dataset to C program

RafaelBravo August 12, 2014 06:43PM

Re: Read afni dataset to C program

Peter Molfese August 13, 2014 12:21PM

Re: Read afni dataset to C program

rick reynolds August 13, 2014 01:09PM

Re: Read afni dataset to C program

RafaelBravo August 13, 2014 03:34PM

Re: Read afni dataset to C program

rick reynolds August 13, 2014 09:04PM

Re: Read afni dataset to C program

RafaelBravo August 14, 2014 05:46PM