Dear FreeSurfer Developers,
I am trying to visualize and modify the output warp field (in .m3z) of a mri_cv_registration call aimed at aligning a T1w scan to the MNI space.
I was wondering how file format .m3z is organized, in order to read it with, for example, matlab. Or if there are simpler file format to convert the warp field to.
No information about it seems to be reported in the website. Moreover, I've searched the list and a similar question was not answered. I was wondering if you have some suggestions in reading the output warp field of mri_cvs_register.
1) FreeSurfer version: freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0-2beb96c 2) Platform: ubuntu 16.04 LTS
Many thanks, Stefano.
Hi Stefano,
You can try to use the attached matlab file for reading the m3z file.
Lilla
On Mon, 30 Jan 2017, Stefano Zappalà wrote:
Dear FreeSurfer Developers,
I am trying to visualize and modify the output warp field (in .m3z) of a mri_cv_registration call aimed at aligning a T1w scan to the MNI space.
I was wondering how file format .m3z is organized, in order to read it with, for example, matlab. Or if there are simpler file format to convert the warp field to.
No information about it seems to be reported in the website. Moreover, I've searched the list and a similar question was not answered. I was wondering if you have some suggestions in reading the output warp field of mri_cvs_register.
- FreeSurfer version: freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0-2beb96c
- Platform: ubuntu 16.04 LTS
Many thanks, Stefano.
Dear Lilla,
thank you for your prompt response.
I have a question regarding the function: I am confused about what vol_orig, vol_dest and vol_ind0 represent.
For instance, after calling the function on different transformations, vol_orig and vol_dest resulted to be precisely the same matrix (compared with the '==' Matlab operator). Moreover, the two volumes have values that increment in a linear way, as reported in the figure attached.
So they don't seem to represent the transformation itself, even if they have the right dimension 182x218x182x3.
On the other hand, if vol_orig and vol_dest need to be subtracted in order to extract the warp field (i.e. they represent a kind of moving and fixed volumes), I would have a transformation with all zero values, since vol_orig==vol_dest. I wouldn't expect a warp field full of zero values, since the mri_cvs_register call successfully aligned the images in all the cases. In addition, vol_ind0 resulted to be a matrix of zeros.
For completeness, I attached the log files for one mri_cvs_register execution.
Thank you very much for your attention and I look forward to hearing from you.
Best wishes,
Stefano Zappala'.
________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu freesurfer-bounces@nmr.mgh.harvard.edu on behalf of Lilla Zollei lzollei@nmr.mgh.harvard.edu Sent: 01 February 2017 19:28:50 To: Freesurfer support list Subject: Re: [Freesurfer] mri_cvs_register: how to read/import .m3z warp file
Hi Stefano,
You can try to use the attached matlab file for reading the m3z file.
Lilla
On Mon, 30 Jan 2017, Stefano Zappalà wrote:
Dear FreeSurfer Developers,
I am trying to visualize and modify the output warp field (in .m3z) of a mri_cv_registration call aimed at aligning a T1w scan to the MNI space.
I was wondering how file format .m3z is organized, in order to read it with, for example, matlab. Or if there are simpler file format to convert the warp field to.
No information about it seems to be reported in the website. Moreover, I've searched the list and a similar question was not answered. I was wondering if you have some suggestions in reading the output warp field of mri_cvs_register.
- FreeSurfer version: freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0-2beb96c
- Platform: ubuntu 16.04 LTS
Many thanks, Stefano.
Dear FreeSurfer,
I am trying to visualize and compare multiple subjects from the mri_cvs_registration. Therefore I need to work with the .m3z file. Is there a way to read this file format in python or is there a way to convert it into an other file format ?
There are just a few information on the website describing the file format.
Yours sincerely and many thanks in advance,
Daniel van de Velden
Hi Daniel
I don't know if there is a python converter, but you can do:
mri_convert file.m3z file.mgz
or
mri_convert file.m3z file.nii.gz
and it will convert it to a 3-frame volume with the dense vector field. You lose information that way though about source and target geometry and such
cheers Bruce
On Mon, 6 Nov 2017, Daniel van de Velden wrote:
Dear FreeSurfer,
I am trying to visualize and compare multiple subjects from the mri_cvs_registration. Therefore I need to work with the .m3z file. Is there a way to read this file format in python or is there a way to convert it into an other file format ?
There are just a few information on the website describing the file format.
Yours sincerely and many thanks in advance,
Daniel van de Velden
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Dear Bruce,
the loss of information about the source and target geometry is not tolerable.
I found similar request (https://mail.nmr.mgh.harvard.edu/pipermail//freesurfer/2017-February/049834....). There is an matlab script, which is able to read the .m3z files. Lilla Zollei replied the script. Maybe there also is a python-version available.
Yours sincerely and many thanks,
Daniel van de Velden
On 06.11.2017 15:44, Bruce Fischl wrote:
Hi Daniel
I don't know if there is a python converter, but you can do:
mri_convert file.m3z file.mgz
or
mri_convert file.m3z file.nii.gz
and it will convert it to a 3-frame volume with the dense vector field. You lose information that way though about source and target geometry and such
cheers Bruce
On Mon, 6 Nov 2017, Daniel van de Velden wrote:
Dear FreeSurfer,
I am trying to visualize and compare multiple subjects from the mri_cvs_registration. Therefore I need to work with the .m3z file. Is there a way to read this file format in python or is there a way to convert it into an other file format ?
There are just a few information on the website describing the file format.
Yours sincerely and many thanks in advance,
Daniel van de Velden
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://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@nmr.mgh.harvard.edu