processing-scripts > questions about input files
Showing 1-2 of 2 posts
Results per page:
Mar 22, 2012  08:03 AM | Xinyuan Miao
questions about input files
Hi all,
Very released to find this forum!
1. I have just started to learn UNIX and AFNI, so my questions might be very simple. I saw that Daniel Keeser has asked about 'anatomical scan you want to use' and 'resting-state scan you want to use', and these two items should be the names of raw images. But I am still a little confused. I did not see to3d in the nor, so am I supposed to do to3d first, save the data as .nii files and used the names of .nii files in those two itmes?

2. Also an additional question of AFNI, I did to3d for a scan of the functional data, after clicked 'save dataset' in GUI, and I only got one nii image. Is this correct?
3. A very general question. I saw that seperate step scripts get parameters passed from the batch script, some lines are like this:
## subject
## analysisdirectory/subject
## name of the anatomical scan

I just wonder how these parameters passed from batch script by $1, $2, $3 etc..

That's all so far. Thank you in advance!

Mar 22, 2012  02:03 PM | Maarten Mennes
RE: questions about input files
Hi Xinyuan,

1. You are correct, there is no to3d in the commands. That is becase the images required by the script are 3- or 4-D nifti images, instead of the 2D dicoms you would combine into a 3D image with to3d. So yes, if you have 2D dicoms you want to convert them into 3d nifti images first, .nii.gz is probably preferred as that will save you some diskspace.

2. Yes, that is the function of to3d. It combines 2D datasets into 3d data or even 4d if you feed it functional data. Alternatively you can alos use dcm2nii from mricron which might be more straightforward to use in that it reads whatever it needs from the headers, whereas you need to provide to3d with all the relevant parameters.

3. The $1, $2 etc. are command line arguments that you can give to a script. e.g., 10 /home/me --> here the script, will use 10 as its first input, e.g., value=$1 (thus value=10) and dir=$2 (thus dir=/home/me)