<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<br>
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt">
<span style="font-family:Arial">Dear experts, </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt">
<span style="font-family:Arial"> </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt">
<span style="font-family:Arial">I am working on relating 7T quantitative MRI to MEG.
</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt">
<span style="font-family:Arial"> </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt">
<span style="font-family:Arial">I have been following this tutorial <a href="http://www.fieldtriptoolbox.org/tutorial/sourcemodel/">
http://www.fieldtriptoolbox.org/tutorial/sourcemodel/</a></span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt">
<span style="font-family:Arial"> </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt">
<span style="font-family:Arial">However I want to run freesurfer on my 7T image and then transform the source model to CTF space.
</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt">
<span style="font-family:Arial"> </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt">
<span style="font-family:Arial">I did the following steps</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt">
<span style="font-family:Arial"> </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt">
<span style="font-family:Arial">1. I ran freesurfer on my 7T mp2rage.nii (-hires pipeline)
</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt">
<span style="font-family:Arial"> </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt">
<span style="font-family:Arial">2. Then I register my 7T mp2rage.nii to the CTF realigned mp2rage.nii to generate a transform (using nifiti_reg) -  </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt">
<span style="font-family:Arial"> </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt">
<span style="font-family:Arial">%% Load transform</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt">
<span style="font-family:Arial">transform_fs2ctf = load(fullfile(mri_path,'fs_ctf.txt'));
</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt">
<span style="font-family:Arial"> </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt">
<span style="font-family:Arial">I then tried to use this transform to put the sourcemodel into CTF space</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt">
<span style="font-family:Arial"> </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt">
<span style="font-family:Arial">%% Refine and save source model</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt">
<span style="font-family:Arial">sourcemodel = ft_transform_geometry(transform_fs2ctf, sourcemodel);</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt">
<span style="font-family:Arial"> </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt">
<span style="font-family:Arial">However I get the following error:</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt">
<span style="font-family:Arial"> </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt">
<span style="font-family:Arial">Error using ft_transform_geometry (line 65)</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt">
<span style="font-family:Arial">only a global rescaling is allowed. </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt">
<span style="font-family:Arial"> </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt">
<span style="font-family:Arial">(transform file attached). </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria">
<span style="font-family:Arial"> </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria">
<span style="font-family:Arial">Any idea why this is happening? </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria">
<span style="font-family:Arial">I have also tried to use the transform from:</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt; text-autospace:none">
<span style="font-size:10.0pt; font-family:Courier; color:forestgreen">%% Relign anatomical MRI to MEG</span><span style="font-family:Courier"></span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt; text-autospace:none">
<span style="font-size:10.0pt; font-family:Courier; color:black">cfg<span style="">         
</span>= [];</span><span style="font-family:Courier"></span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt; text-autospace:none">
<span style="font-size:10.0pt; font-family:Courier; color:black">cfg.method<span style="">  
</span>= </span><span style="font-size:10.0pt; font-family:Courier; color:#A020F0">'interactive'</span><span style="font-size:10.0pt; font-family:Courier; color:black">;</span><span style="font-family:Courier"></span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt; text-autospace:none">
<span style="font-size:10.0pt; font-family:Courier; color:black">cfg.coordsys = </span>
<span style="font-size:10.0pt; font-family:Courier; color:#A020F0">'ctf'</span><span style="font-size:10.0pt; font-family:Courier; color:black">;</span><span style="font-family:Courier"></span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria; margin-bottom:0cm; margin-bottom:.0001pt; text-autospace:none">
<span style="font-size:10.0pt; font-family:Courier; color:black">mri<span style="">         
</span>= ft_volumerealign(cfg, mri);</span><span style="font-family:Courier"></span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria">
<span style="font-family:Arial"> </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria">
<span style="font-family:Arial">I have also tried to run freesurfer on after realigning the MRI ctf, then to acpc as in the tutorial however freesurfer fails on the 7T images
</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria">
<span style="font-family:Arial">Thanks</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria">
<span style="font-family:Arial"> Peter</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria">
<span style="font-family:Arial"> </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria">
<span style="font-family:Arial"> </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria">
<span style="font-family:Arial"> </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria">
<span style="font-family:Arial"> </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0cm 0cm 10pt; font-size:12pt; font-family:Cambria">
<span style="font-family:Arial" lang="EN-GB"> </span></p>
<br>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
</div>
</div>
</div>
</div>
</body>
</html>