- Specifying image filenames on the command line
bet_vol script and modify it so that it applies BET to the image filename passed in as the first command line argument.
That is, if you type:
then it should apply BET to the image
im2 and save
the result as
Try running the script with
im2 as the input.
Check that the resulting image has the correct name and that the
image itself looks right.
Note: the argument should not include the
.nii.gz part of the filename
- Passing arguments to BET (Advanced)
You can pass any additional arguments of the script onto BET (e.g -f 0.4 -g 0.1) using
However, as you do not want to repeat the input filename this
can be removed from the argument list using
Once the command
shift is executed inside a script
the first argument
$1 is removed and all others shuffle
down one number.
$@ pass the extra arguments
as following options to the BET command line call.
Look here for the cheat.