Hi Jan-Mathijs,<div><br></div><div>The converting units before ft_prepare_sourcemodel solved it! </div><div>I suspected the same, but didn't know at which step it went wrong, and wasn't aware of the function ft_convert_units... </div>
<div><br></div><div>I will also report it in bugzilla so you have the solution at hand!</div><div><br></div><div>Thanks so much!</div><div><br></div><div>Hanneke</div><div><br><div class="gmail_quote">On Thu, Jun 14, 2012 at 1:13 PM, jan-mathijs schoffelen <span dir="ltr"><<a href="mailto:jan.schoffelen@donders.ru.nl" target="_blank">jan.schoffelen@donders.ru.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Hi Hanneke,</div><div><br></div>You could try the following:<div><br></div><div>
mri=ft_convert_units(mri, 'mm'), prior to calling ft_prepare_sourcemodel?</div><div>(and then do ft_convert_units(grid,'m') on the output)</div><div><br></div><div>Also, what happens if you do cfg.grid.nonlinear = 'no'?</div>
<div><br></div><div>I also saw that you already created a bug on our bugzilla-site. Thanks for doing so; we were already aware of your problem and it's on our list to look into it in more detail as soon as our time resources allow. At the moment I suspect a metric unit issue to be the problem when doing the inverse (non-linear) warp.</div>
<div><br></div><div>Best,</div><div><br></div><div>Jan-Mathijs</div><div><br></div><div><br><div><div><div class="h5"><div>On Jun 14, 2012, at 12:47 PM, <<a href="mailto:Hanneke.vanDijk@med.uni-duesseldorf.de" target="_blank">Hanneke.vanDijk@med.uni-duesseldorf.de</a>> <<a href="mailto:Hanneke.vanDijk@med.uni-duesseldorf.de" target="_blank">Hanneke.vanDijk@med.uni-duesseldorf.de</a>> wrote:</div>
<br></div></div><blockquote type="cite"><div><div><div class="h5">Dear all,<br><br>I am creating headmodels of neuromag data (Using FT version 20123105 and the example script <a href="http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space" target="_blank">http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space</a>) <br>
<br>First I realign the mri with the fiducials I get out of mri-lab (in voxels).<br><br>The 'vol' structure is created like this:<br><br>Cfg                            = [];<br>cfg.coordsys         = 'neuromag'; <br>
cfg.method           = 'singleshell';<br>vol = ft_prepare_singleshell(cfg, segmentedmri);<br><br>the 'grid' like this:<br><br>load(strcat(basepath,'templates/template_grid.mat'));<br>cfg                                = [];<br>
cfg.grid.warpmni    =  'yes';<br>cfg.grid.template   =  template_grid;<br>cfg.grid.nonlinear  =  'yes'; % use non-linear normalization<br>cfg.coordsys            =  'neuromag'; <br>cfg.mri                 = mri; %the realigned mri<br>
grid                     = ft_prepare_sourcemodel(cfg);<br><br>Everything works well, untill I plot and see that the sizes/ origins (or units) are completely different for the vol and grid. At the moment I cannot find a solution. Does anyone have an idea?<br>
The results are plotted and attached to this e-mail.<br><br>Thanks in advance,<br><br>Hanneke<br><br>p.s. I also filed this in bugzilla, for more information see there:<br><br><a href="http://bugzilla.fcdonders.nl/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailreporter1=1&emailtype1=exact&email1=hannekevdg%40hotmail.com&field0-0-0=bug_status&type0-0-0=notequals&value0-0-0=UNCONFIRMED&field0-0-1=reporter&type0-0-1=equals&value0-0-1=hannekevdg%40hotmail.com" target="_blank">http://bugzilla.fcdonders.nl/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailreporter1=1&emailtype1=exact&email1=hannekevdg%40hotmail.com&field0-0-0=bug_status&type0-0-0=notequals&value0-0-0=UNCONFIRMED&field0-0-1=reporter&type0-0-1=equals&value0-0-1=hannekevdg%40hotmail.com</a><br>
<br><br>__________________________________________<br><br>Hanneke van Dijk, PhD<br><br><a href="http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html" target="_blank">http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html</a> <<a href="http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html" target="_blank">http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html</a>> <br>
<br>Institute for Clinical Neuroscience,<br><br>Heinrich Heine Universität Düsseldorf, Germany<br><br><a href="mailto:Hanneke.vanDijk@med.uni-duesseldorf.de" target="_blank">Hanneke.vanDijk@med.uni-duesseldorf.de</a><br><br>
Tel. <a href="tel:%2B49%20%280%29%20211%2081%2013074" value="+492118113074" target="_blank">+49 (0) 211 81 13074</a>   <br><br>__________________________________________                                        <br><br><br>
<br><br><br><br></div></div><span><grid_vol.png></span><span><grid_vol2.jpg></span>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div></blockquote></div><br><div>
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<div>Jan-Mathijs Schoffelen, MD PhD </div><div><br></div><div>Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands</div><div><br></div>
<div>Max Planck Institute for Psycholinguistics,</div><div>Nijmegen, The Netherlands</div><div><br></div><div><a href="mailto:J.Schoffelen@donders.ru.nl" target="_blank">J.Schoffelen@donders.ru.nl</a></div><div>Telephone: <a href="tel:%2B31-24-3614793" value="+31243614793" target="_blank">+31-24-3614793</a></div>
</div></span></div></span></div></span></div></span></div></span></span>
</div>
<br></div></div><br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>