Doug, thanks for your help with this.
I gave this a try using the inverse of the vox2RAS affine from the LPS image: inv_M2*(M1*v1) = v2 The results look as if the voxel CRS coords are a bit translated towards the inferior. This is most likely due to your second note. I don't think it converted the volumes to LPS correctly from RAS. Coordinates are increasing along the x axis towards the right (not left), and coordinates are decreasing along the z axis in the posterior direction. It also appears that trying to convert back to RAS from LPS(?) does nothing. Is there a better way to convert to LPS that you know of? Thanks again, -zack On Mon, Jun 22, 2015 at 3:39 PM, Douglas Greve <gr...@nmr.mgh.harvard.edu> wrote: > The coordinates won't change because the underlying coordinate system is > the same regardless of how it is sliced. The voxel col, row, slice mapped > to a coordinate will change. If that is what you mean, then you'll need to > get the voxel-to-ras matrix with mri_info --vox2ras file.nii for each > orientation. Then the formula is > > M1*v1 = M2*v2 > > where M? is the vox2ras for an orientation. v? is the voxel coords for > that orientation. You'll have M1, M2, and v1, so you can solve for v2. > > Also, you should check that the conversion worked properly since you are > explicitly discouraged from doing this kind of thing in the mri_convert > help: > > Do not use this to try to change the orientation. This is only > to be used when the orientation information in the input file is > *wrong*. If it is correct, this will make it wrong! > > To check, run > tkregister --mov file1.nii --targ file2.nii --regheader --reg junk.dat > > The two should be in perfect alighnment (hit the compare button) > > > > > > > On 6/22/15 12:31 PM, Zachary Greenberg wrote: > > Hi, > > I'm converting some structural images from RAS ( orig.mgz conformed > space) to LPS using: > > mri_convert orig.mgz orig_LPS.nii --in_orientation 'RAS' > --out_oreintation 'LPS' > > My question is, if I have some RAS coordinates defined from the original > orig.mgz image, how do I also convert those coordinates to LPS to be in > correct orientation to orig_LPS.nii? > > thanks for your help, > -zack > > > > > > > _______________________________________________ > Freesurfer mailing > listfreesur...@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer > > > > _______________________________________________ > Freesurfer mailing list > Freesurfer@nmr.mgh.harvard.edu > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer > > > The information in this e-mail is intended only for the person to whom it > is > addressed. If you believe this e-mail was sent to you in error and the > e-mail > contains patient information, please contact the Partners Compliance > HelpLine at > http://www.partners.org/complianceline . If the e-mail was sent to you in > error > but does not contain patient information, please contact the sender and > properly > dispose of the e-mail. > >
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.