Hi Doug;
Thank you  for your prompt reply. I have obtained Torig Tmov and Reg values as below:

mri_info --vox2ras-tkr segmentedanatomic.nii

Torig=[-0.93750    0.00000    0.00000  120.00000 

   0.00000    0.00000    1.20000  -75.00016 

   0.00000   -0.93750    0.00000  120.00000 

   0.00000    0.00000    0.00000    1.00000];

mri_info --vox2ras-tkr BHfunc.nii

Tmov=[-3.59375    0.00000    0.00000  115.00000 

   0.00000    0.00000    2.00000  -30.00000 

   0.00000   -3.59375    0.00000  115.00000 

   0.00000    0.00000    0.00000    1.00000 ];



Reg=[0.015 1,-0.017,1.62;

    -0.096,-0.015,-1,-24.701;

    -0.995,0.016,0.096,-0.177;

    0,0,0,1];

 

However when i try to map lets say; voxel 32 32 15

orig=Torig*inv(Reg)*inv(Tmov)*[32 32 15 1]';


I get the below coordinates:


   98.3478

  -37.8002

   93.9130

    1.0000

which do not match at all. I wonder where i am doing the mistake.


Thank you ;


Burcu






2012/5/18 Douglas N Greve <greve@nmr.mgh.harvard.edu>
I think this scenario applies to you (just use your structural instead
of orig.mgz).
doug

--------------------------------------------------------------
I have a CRS from a voxel in my functional/diffusion/ASL/rawavg/etc
"mov" volume and want to compute the CRS for the corresponding point in
the orig.mgz:

origCRS = Torig * inv(Reg) * inv(Tmov) * [movC movR movS 1]'
Torig: mri_info --vox2ras-tkr orig.mgz
Tmov: mri_info --vox2ras-tkr mov.nii
Reg: register.dat
tkregister2 --mov mov.nii --reg register.dat

Test: click on a point in tkmedit very close to the left hemi white
surface. Use the "Functional Overlay Index Coordinates" to compute
origCRS (round to the nearest integer). Compare origCRS to the "Volume
index". Note: you may need to use the "Volume RAS" from tkmedit in
the computation above to get an exact match.

--------------------------------------------------------------


On 05/17/2012 05:43 AM, Sinem Burcu Erdoğan wrote:
>
> Dear Freesurfer Community;
>
> I need to find the corresponding voxel in a functional image for a
> specific structural image voxel after coregistering two images. My
> structural image has 256*256*125 voxels and the functional image has
> 64*64*30 voxels.
>
> I use the following command
>
>
> tkregister2 --s subjectname --targ structural.nii --mov functional.nii
> --regheader --reg directorythatyouwanttosaveregisterfile/MYregister.dat
>
>
> Where the target is structural image and movable is the functional image
>
> then click save to get MYregister.dat.
>
>
> then take the inverse of the matrix
>
> save it as invMYregister.dat, and try to use this matrix to transform
> from
>
> anatomical to functional.
>
>
> However; as an example when I try to map voxel (169 , 62 ,35) of the
> anatomical image to the functional space using the inverse
> registration matrix; i get the values below
>
> - 64.3319
>
> -146.4394
>
> -157.2665
>
> as the corresponding voxels' coordinates at the functional space which
> is far beyond the functional volume size and is negative. It is clear
> I cannot manage to use the trasfer matrices appropriately.
>
> Your help will be greatly appreciated.
>
> Thank you;
>
> Sinem Burcu ERDOGAN
>
>
> --
> Sinem Burcu ERDOĞAN
> Research Assistant
> Bogazici University
> Biomedical Engineering Institute
> Kandilli Kampüs
> 34684 Çengelköy / İSTANBUL TURKEY
> Tel :+90-216-5163433
> Fax :+90-216-5163479
> e-mail: burcu.erdogan@boun.edu.tr <mailto:burcu.erdogan@boun.edu.tr>
>
>
> _______________________________________________
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

--
Douglas N. Greve, Ph.D.
MGH-NMR Center
greve@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: www.nmr.mgh.harvard.edu/facility/filedrop/index.html

_______________________________________________
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.



--
Sinem Burcu ERDOĞAN
Research Assistant
Bogazici University
Biomedical Engineering Institute
Kandilli Kampüs
34684 Çengelköy / İSTANBUL TURKEY
Tel :+90-216-5163433
Fax :+90-216-5163479   
e-mail: burcu.erdogan@boun.edu.tr