Dear Lilla,


thank you for your prompt response. 


I have just applied mri_vol2vol, calling for 

mri_vol2vol --mov $folder/w_MniNick.nii --targ $folder/MniNick.nii - --o $folder/outvol.mgz --m3z $folder/final_CVSmorph_toSynthF.m3z --noDefM3zPath --no-save-reg.

Unfortunately, the result is not what I was expecting, as the deformation is not anatomically acceptable in certain regions.

Therefore, I was wondering how to view the warp field in order to check whether the mri_cvs_register or the mri_vol2vol call fails. I couldn't find any information on how to do it on the FS website.

Thank you very much for your consideration.

Best,
Stefano.

From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of Lilla Zollei <lzollei@nmr.mgh.harvard.edu>
Sent: 11 January 2017 18:56:07
To: Freesurfer support list
Subject: Re: [Freesurfer] createMorph & applyMorph: unexpected results
 

Hi Stefano,

If you have the final_CVSmorph_toSynthF.m3z file you can use mri_vol2vol
dirctly to apply it to another volume. Look for examples in
mri_cvs_register --help.

We are moving away from using the tm3d file format.

Lilla

On Wed, 11 Jan 2017, Stefano Zappalą wrote:

>
> Hello FreeSurfer Developers,
>
>
> I'm attempting to apply the CVS output transformation "final_CVSmorph_toSynthF.m3z" to an image different to the one that was used for its estimation. I followed the 
> steps reported at the bottom of the page https://surfer.nmr.mgh.harvard.edu/fswiki/mri_cvs_register, adjusting the lines for the output files that I obtained from mri_cvs_register. So I called for 
surfer.nmr.mgh.harvard.edu
Name. mri_cvs_register - registers MRI scans of two subjects (or a subject and the CVS atlas) using the combined volume and surface-based registration method, CVS.


>
>       createMorph --out fullCVSmorph.tm3d --template MniNick.mgz --subject w_MniNick.mgz --in gcam final_CVSmorph_toSynthF.m3z morph el_reg_toSynthF.mgz 
>
> and
>       applyMorph --template MniNick.mgz --transform fullCVSmorph.tm3d vol w_MniNick.mgz outputvol.nii trilinear
>
> but I encountered the following output when running  createMorph:
>
> setting orig areas to linear transform determinant scaled 1.00
>  atlas geometry = 256 , 256 , 256
>  image geometry = 256 , 256 , 256
>  vox 2 ras atlas = 
> -1.00000   0.00000   0.00000   127.00000;
>  0.00000   0.00000   1.00000  -145.00000;
>  0.00000  -1.00000   0.00000   147.00000;
>  0.00000   0.00000   0.00000   1.00000;
>  ras 2 vox image = 
> -1.00000  -0.00000  -0.00000   90.00000;
> -0.00000   1.00000  -0.00000   126.00000;
> -0.00000  -0.00000   1.00000   72.00000;
> -0.00000  -0.00000  -0.00000   1.00000;
>  product = 
>  1.00000   0.00000   0.00000  -37.00000;
>  0.00000   0.00000   1.00000  -19.00000;
>  0.00000  -1.00000   0.00000   219.00000;
>  0.00000   0.00000   0.00000   1.00000;
>
>  transform at origin
> -37.00000;
> -19.00000;
>  219.00000;
>  1.00000;
>  invalid voxel count = 0
>  extension = mgz
> terminate called after throwing an instance of 'std::bad_alloc'
>   what():  std::bad_alloc
> Aborted (core dumped)
>
> I've searched the mailing list and no similar errors have been reported. The recon-all and mri_cvs_register calls seemed to have correctly terminated. Does anyone have any thoughts on how to trouble-shoot this one?
>
> 1) FreeSurfer version: freesurfer-Linux-centos6_x86_64-dev-20161130-24fa2c9
> 2) Platform: ubuntu 16.04 LTS
> 3) In the attachment:
> 3.1) log files of the mri_cvs_register execution;
> 3.2) log file of the recon-all executions on the moving and fixed images.
>
> Thank you for your consideration.
>
> Stefano.
>
>
>