Hi,
Why do you want to do this?
The use of labels is to enable people to rearrange their
data into different views, as seen by FSLView. But the
RL and LR change does not change anything for FSLView,
which always shows things with a consistent "handedness"
which is based on the same one as used by the template
images, shown as "radiological". You can change the
left-right order if you really want, but there is no real need
to do that with the current version of FSL. If you do it, it will
change your storage between the "radiological" and "neurological"
conventions. We explicitly stop this happening when using
the labels with fslswapdim in order to avoid this happening
as an unintentional side-effect.
So I simply recommend that you don't do this.
If you really want to _only_ swap LR, then you need to use the
"-x y z" syntax _and_ use fslorient -swaporient, to make sure
that the relationship between the data and the labels stays
consistent. If you do not run both commands then the left
and right labels will get mixed up with respect to what is
contained in the brain image which is bad.
Hope this makes it clearer.
All the best,
Mark
On 4 May 2010, at 14:26, Alle Meije Wink wrote:
> The fslswapdim script contains this bit of code:
>
>> # Check if the labels are used *and* it is doing a left-right
>> inversion
>> if [ $uselabels = yes ] ; then
>> tmpf=`$FSLDIR/bin/tmpnam`_sd
>> $comm > $tmpf 2>&1
>> wl=`grep WARNING $tmpf | wc -l`;
>> if [ $wl -gt 0 ] ; then
>> echo "Cannot perform requested swap (NEUROLOGICAL/RADIOLOGICAL
>> storage inverted)"
>> echo "Try the following command instead:"
>> arg234=`echo "$2 $3 $4" | sed 's/RL/LRXX/g' | sed 's/LR/RL/g' |
>> sed 's/RLXX/LR/g' | sed 's/-x/XX-x/g' | sed 's/ x / -x /g' | sed 's/
>> XX-x/x/g'`;
>> echo "fslswapdim $1 $arg234 $5"
>> exit 1
>> fi
>> fi
> Does that mean that the "LR AP IS" etc syntax cannot be used for
> left-right swapping? I thought the beauty of using the labels was
> that fslswapdim determined whether a swap is necessary in the first
> place.
>
> Then the only way to do the automatic swapping I guess is to build a
> script around it, which uses the old fslswapdim syntax?
>
> bw
> AM
>
|