Print

Print


Hi - yes you can simply multiply the x component of the dyads by -1. Easiest way to do that is to create a 4D file with "-1" for the first volume and "1" for 2nd and 3rd, then multiply that by the dyads directly without splitting them.

Cheers
Saad



On 6 Jan 2013, at 18:35, Colin Reveley wrote:

> maybe I should split the dyad file into 3 volumes and run fslmaths mod pi (right?) on one of them then merge it back?
> 
> On 6 January 2013 18:29, Colin Reveley <[log in to unmask]> wrote:
> Hi, I want to reslice volumes (not just the header, the data, for use with further processing outside FSL) so that the left is the right.
> 
> this is easy to do with my scalar volumes with fslswapdim. I can also do it with vector files, and the result is fine except now the vectors are rotated 90 degrees in the axis I swapped.
> 
> I can see an option --rotmat in vecreg that looks like it might help but I'm not sure what matrix to pass it. the main transform matrix is just rotation and translation. so it should be easy. But I'm unsure what numbers to put in a 4x4 matrix to rotate the vectors left right for the --rotmat bit.
> 
> the procedure I'm using, which works great other than this, for any given scalar or vector volume
> 
> fslorient -swaporient
> fslswapdim LR PA IS
> vecreg 
> fslorient -setsform (from something), same for qform
> 
> the last puts it all in the right place for the other processing. I list that because I don't want to break what that list of commands does.
> 
> the files are eg dyads1. presumably it's the same for first tensor eigenvec file.
> 
> I only just noticed the 90 degree rotation. which is pretty obviously going to happen just running swapdim like that.  it's all slightly complicated and I did it a few days ago and don't understand what I did to get it all to work with the other program, so I hope there's a simple solution. 
> 
> thanks for help
> 
> Colin R
> 

--
Saad Jbabdi
University of Oxford, FMRIB Centre

JR Hospital, Headington, OX3 9DU, UK
(+44)1865-222466  (fax 717)
www.fmrib.ox.ac.uk/~saad