Hi,
Thanks for the detailed and very helpful response.
We will definitely follow up on this and implement a fix for this in the next patch.
All the best,
Mark
On 27 Oct 2014, at 10:30, Antonin Skoch <[log in to unmask]> wrote:
> Dear FSL,
>
> I have similar problem with fslreorient2std. My FSL version is 5.0, installed from NeuroDebian, on Ubuntu 12.04 32 bit.
> The command
> fslreorient2std input_file output_file
> produces neither desired output_file, nor error message.
>
> I found that this problem is related with fslswapdim script, namely evaluation of regular expression in sed commands at lines 116 and 118 where parsing of sform_.orient and qform_.orient and conversion to format undestandable to get_axis() function is performed. The string passed to sed 's/[^A-Z]//g' is not stripped of lowercase characters in my system as the authors of this script expect. For example, in my case the sform_xorient Right-to-Left is translated to RighttoLeft but not to RL. The fslswapdim script in this case silently exists without issuing any error.
> Apparently the [A-Z] regular expression matches also lower case letters on my system.
>
> I found that the regexp behavior depends on system locale settings
> http://www.linuxquestions.org/questions/linux-general-1/grep-%5Ba-z%5D-and-%5Ba-z%5D-match-both-upper-and-lower-case-327916/
>
> Changing my LANG=cs_CZ.UTF-8 to LANG=en_US.UTF-8 or setting LC_ALL=C in my system solved the error and fslreorient2std/fslswapdim worked fine.
>
> To make it independent on local system settings, changing sed 's/[^A-Z]//g' to sed 's/[^RLAPIS]//g' on lines 116 and 118 solved the problem.
> In any case, I suggest that error message for the cases when the axis orientation string is invalid should be added to fslswapdim script.
>
> Regards,
>
> Antonin Skoch
|