If you load the volume in with MRIread a = MRIread('yourvolume.mgz'); a.vox2ras1 is the one-based vox2ras matrix which takes a 1-based column, row, slice and converts it to RAS. So you just need to convert your indices to col, row, slice and apply this matrix.
doug
On 12/17/2012 06:53 PM, octavian lie wrote:
Dear Douglas,
Thank you very much for your input.
- I generated the ind matrix as per your script, but what I wanted is
to get a matrix with the RAS coordinates for the pixels indexed in ind. Is there a way to do this?
Thank you,
Octavian