Hi,
Thanks for that.
We'll update the scripts appropriately.
All the best,
Mark
On 30 Nov 2006, at 23:46, Randy Notestine wrote:
> Mark,
>
> To the best of my knowledge, unlike FSL and Freesurfer, AFNI
> doesn't use a standard environmental variable to define the
> location of the .../AFNI/bin directory. So I think the simplest
> thing to do would be to simply remove the attempt to explicitly
> locate 3dinfo, by removing "$AFNI_PLUGINPATH/ " from the scripts,
> and allow the user's PATH to locate the 3dinfo command for you.
>
> If you wanted to do a little more work, you could determine if
> 3dinfo can be found and print a friendly warning message if
> appropriate. Perhaps revising afni2avw to look something like:
>
> # --- start of revised afni2avw script ---
>
> #!/bin/sh
>
> Usage() {
> echo "Usage: afni2avw <input_fileroot>"
> exit
> }
>
> [ "$1" = "" ] && Usage
>
> which 3dinfo >/dev/null 2>&1
> if [ $? -ne 0 ] ; then
> echo "ERROR: This program uses AFNI's 3dinfo command, but 3dinfo
> was not found in your PATH."
> exit 1
> fi
>
> x=`3dinfo $1 | grep R-to-L | sed "s/\[//g" | awk '{print $11}'`
> y=`3dinfo $1 | grep A-to-P | sed "s/\[//g" | awk '{print $11}'`
> z=`3dinfo $1 | grep I-to-S | sed "s/\[//g" | awk '{print $11}'`
>
> xv=`3dinfo $1 | grep R-to-L | awk '{print $9}'`
> yv=`3dinfo $1 | grep A-to-P | awk '{print $9}'`
> zv=`3dinfo $1 | grep I-to-S | awk '{print $9}'`
>
> echo "x=$x y=$y z=$z xv=$xv yv=$yv zv=$zv"
>
> $FSLDIR/bin/avwcreatehd $x $y $z 1 $xv $yv $zv 3 0 0 0 4 $1
>
> /bin/cp -f $1.BRIK $1.img
>
> # --- end of revised script ---
>
> A similar fix could be applied to avw2afni, which currently calls
> $AFNI_PLUGINPATH/to3d (rather than 3dinfo - as I originally mis-
> wrote).
>
> Thanks for your consideration,
>
> - Randy
>
> Mark Jenkinson wrote:
>
>> Hi,
>>
>> We are not very familiar with afni and its workings.
>> We are certainly happy to update it and fix and problems.
>> Can you suggest a fix?
>>
>> All the best,
>> Mark
>>
>>
>> On 30 Nov 2006, at 20:49, Randy Notestine wrote:
>>
>>> Both the afni2avw and avw2afni scripts distributed with FSL
>>> contain the following call to AFNI's 3dinfo: $AFNI_PLUGINPATH/
>>> 3dinfo
>>>
>>> This is an inappropriate usage of AFNI_PLUGINPATH, however, as
>>> this environmental variable may contain more than one directory
>>> (as most PATH variables usually do). And when AFNI_PLUGINPATH
>>> contains more than one directory, 3dinfo obviously can't be run
>>> with this command.
>>>
>>> There are of course several work arounds, but I'm hoping that
>>> the developers of FSL will consider revising afni2avw and
>>> avw2afni in a future release.
>>>
>>> - Randy Notestine
>>>
>>> --
>>> Randy Notestine
>>> Laboratory of Cognitive Imaging
>>> UCSD/VA San Diego Healthcare System
>>
>>
|