Hello Bryson,
Thank you for your reply. I'm afraid I'm not quite sure what you mean when you say to make sure that I have the correct (x, -x, y, -y); what are you referring to here?
When putting in the last command (fslorient -setqform 1 image.nii.gz), am I just typing this as is, just replacing the filename? I found when I did this that it just came up with the usage instructions for fslorient, and prompted me to put in all 16 values for the qform matrix.
Thanks again and regards,
Kirran
Hello,
This method:
fslorient -deleteorient image.nii.gz
fslswapdim image.nii.gz -x -y z image.nii.gz
fslorient -setqform 1 image.nii.gz
Should work (this method has never failed me), just make sure you have the correct (x, -x, y, -y, ...). You do not need to manually edit the qform or sform.
Perhaps others have better methods for achieving this goal.
Bryson
Bryson
On Mon, Jan 5, 2015 at 4:05 PM, Kirran Bakhshi <[log in to unmask]> wrote:
Dear FSL,
I am trying to switch the anterior-posterior labels on a set of data. I have tried some suggestions found here in the forums, but have not found anything to work so far.
I have tried to set the qform and sform matrices, changing the sign of the values corresponding to the 'y' coordinate, using fslorient, but don't know that I have doing this correctly, as when I try to view the resulting image in fslview I get the error: Inconsistent left-right order stored in sform and qform in file, using sform instead of qform values.
I have also tried just using fslorient -x -y z imagename, and this did not reorient the image properly.
I have also tried the following commands, as suggested:
fslorient -deleteorient image.nii.gz
fslswapdim image.nii.gz -x -y z image.nii.gz
fslorient -setqform 1 image.nii.gz
But even when I set the qform matrices with all 16 values, this is not working for me.
Would someone be able to describe the proper procedure for switching the anterior-posterior labels? I would be very grateful.
Thank you and regards,
Kirran
|