<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear Jan,<div><br></div><div>No problem. Thanks for the script. If you feel up to it, you are kindly invited to update the documentation on the fieldtrip wiki as well. If I recall correctly, at some point Hanneke added some documentation about how to create MNI-based dipole grids for neuromag data. A lot of the intermediate steps have now become obsolete and this part of the wiki can be substantially cleaned.</div><div><br></div><div>Thanks,</div><div><br></div><div>Jan-Mathijs</div><div><br></div><div><br><div><div>On Apr 13, 2011, at 2:31 PM, <<a href="mailto:Jan.Hirschmann@med.uni-duesseldorf.de">Jan.Hirschmann@med.uni-duesseldorf.de</a>> <<a href="mailto:Jan.Hirschmann@med.uni-duesseldorf.de">Jan.Hirschmann@med.uni-duesseldorf.de</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div lang="DE" link="blue" vlink="blue" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"><div class="Section1" style="page: Section1; "><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">Dear Jan-Mathijs,<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p> </o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">I think we solved the problem. Everthing is like you said in the first place. ft_volumerealign and ft_volumesegment should be called with cfg.coordsys=’neuromag’. The only thing that was wrong is that for the voxel coordinates read from the Neuromag GUI x and y should be swapped. For anyone interested I attach a script that is meant to be easy-to-use for beginners.<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p> </o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">Thank you very much for your time!</span></font><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><o:p></o:p></span></font></div><div><div class="MsoNormal" align="center" style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; text-align: center; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><hr size="2" width="100%" align="center" tabindex="-1"></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><b><font size="2" face="Tahoma"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold; ">Von:</span></font></b><font size="2" face="Tahoma"><span style="font-size: 10pt; font-family: Tahoma; "><span class="Apple-converted-space"> </span><a href="mailto:fieldtrip-bounces@donders.ru.nl">fieldtrip-bounces@donders.ru.nl</a> [<a href="mailto:fieldtrip-bounces@donders.ru.nl" style="color: blue; text-decoration: underline; ">mailto:fieldtrip-bounces@donders.ru.nl</a>]<span class="Apple-converted-space"> </span><b><span style="font-weight: bold; ">Im Auftrag von<span class="Apple-converted-space"> </span></span></b>jan-mathijs schoffelen<br><b><span style="font-weight: bold; ">Gesendet:</span></b><span class="Apple-converted-space"> </span>Dienstag, 12. April 2011 21:18<br><b><span style="font-weight: bold; ">An:</span></b><span class="Apple-converted-space"> </span><st1:personname w:st="on">Email discussion list for the FieldTrip project</st1:personname><br><b><span style="font-weight: bold; ">Betreff:</span></b><span class="Apple-converted-space"> </span>Re: [FieldTrip] I think you solved the problem</span></font><o:p></o:p></div></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p> </o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">Dear Jan,<o:p></o:p></span></font></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p> </o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">I suspect that your mri, as it comes out of ft_read_mri is already coregistered in neuromag space. After your realignment and after replacing mri.transform with real_mri.transform, the coordinate axes in your pic1 look strange. This I think causes the 'dropped pocket change'. <o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">What happens if you skip the ft_volumerealign step and call ft_volumesegment directly on the mri (with cfg.coordsys = 'neuromag', or, for what it's worth, without cfg.coordsys; in this case you will be able to verify the coordinate system)?<o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">Alternatively, if this doesn't work, could you replace mri.transform by eye(4) prior to calling ft_volumerealign and ft_volumesegment (both with cfg.coordsys = 'neuromag' and no further tampering with transformation matrices?).<o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p> </o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">Thanks<o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p> </o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">JM<o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p> </o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p> </o:p></span></font></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">On Apr 12, 2011, at 8:49 PM, <<a href="mailto:Jan.Hirschmann@med.uni-duesseldorf.de" style="color: blue; text-decoration: underline; ">Jan.Hirschmann@med.uni-duesseldorf.de</a>> <<a href="mailto:Jan.Hirschmann@med.uni-duesseldorf.de" style="color: blue; text-decoration: underline; ">Jan.Hirschmann@med.uni-duesseldorf.de</a>> wrote:<o:p></o:p></span></font></div></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><br><br><o:p></o:p></span></font></div><span style="orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-spacing: 0px; "><u1:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"><div link="blue" vlink="blue" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; ">Dear Jan-Mathijs,<u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; "><u1:p> </u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; ">sorry, I think I was a bit too enthusiastic when I said everything worked out wonderfully. It worked only once. After an afternoon of confusion I concluded that on my first try I must have misspelled cfg.coordsys=’neuromag’ on my calls to ft_volumerealign and ft_volumesegment. In fact, the segmentation looks really bad with these settings. What works for me is written underneath:<u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><u1:p> </u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">mri  = ft_read_mri('….fif');<u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">hdr=ft_read_header('…fif');<u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">mri.anatomy=double(mri.anatomy);<u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><u1:p> </u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">%this is taken from the Neuromag GUI for MRI-MEG Integration<u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">cfg=[];<u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">cfg.fiducial.rpa=[136.35   142.80    31.96];<u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">cfg.fiducial.nas=[47.84   101.80   100.10];<u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">cfg.fiducial.lpa=[139.22   146.17   162.69];<u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><u1:p> </u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">%go from neuromag voxel to neuromag head coordinates<u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">cfg.coordsys='neuromag';<u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">cfg.method='fiducial';<u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">real_mri=ft_volumerealign(cfg,mri);<u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><u1:p> </u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">%taking real_mri with its coordsys field will not work, so I take mri<u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">mri.transform=real_mri.transform;<u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><u1:p> </u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">cfg                = [];<u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">cfg.keepintermediate = 'no';<u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">cfg.write = 'no';<u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">segmentedmri   = ft_volumesegment(cfg, mri);<u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><u1:p> </u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><u1:p> </u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; ">Before segmentation the function shows some kind of brain (pic 1). When segmentation is done the segmented brain looks good (pic 2) but the brain does not fit the helmet (pic 3). It is looking at its feet as if it dropped some pocket change. Do you know what is going on?<u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; "><u1:p> </u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; ">Thanks,<u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; ">jan<u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><u1:p> </u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div class="MsoNormal" align="center" style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; text-align: center; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><hr size="2" width="100%" align="center" tabindex="-1"></span></font></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><b><font size="2" color="black" face="Tahoma"><span style="font-size: 10pt; font-family: Tahoma; color: black; font-weight: bold; ">Von:</span></font></b><span class="apple-converted-space"><font size="2" color="black" face="Tahoma"><span style="font-size: 10pt; font-family: Tahoma; color: black; "> </span></font></span><font size="2" color="black" face="Tahoma"><span style="font-size: 10pt; font-family: Tahoma; color: black; "><a href="mailto:fieldtrip-bounces@donders.ru.nl" style="color: blue; text-decoration: underline; ">fieldtrip-bounces@donders.ru.nl</a><span class="Apple-converted-space"> </span>[<a href="mailto:fieldtrip-bounces@donders.ru.nl" style="color: blue; text-decoration: underline; ">mailto:fieldtrip-bounces@donders.ru.nl</a>]<span class="apple-converted-space"> </span><b><span style="font-weight: bold; ">Im Auftrag von<span class="apple-converted-space"> </span></span></b>jan-mathijs schoffelen<br><b><span style="font-weight: bold; ">Gesendet:</span></b><span class="apple-converted-space"> </span>Dienstag, 12. April 2011 12:11<br><b><span style="font-weight: bold; ">An:</span></b><span class="apple-converted-space"> <st1:personname u2:st="on"></st1:personname></span><st1:personname w:st="on">Email discussion list for the FieldTrip project</st1:personname><br><b><span style="font-weight: bold; ">Betreff:</span></b><span class="apple-converted-space"> </span>Re: [FieldTrip] I think you solved the problem</span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div><u1:p></u1:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u1:p> </u1:p><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">Dear Jan,<u1:p></u1:p><o:p></o:p></span></font></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u1:p> </u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">Apart from not being properly aligned, the segmentation looks a bit strange to me. I suspect that not everything went well here ;o).<u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">Could you try the following:<u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u1:p> </u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">specify cfg.coordsys = 'neuromag', both in your call to ft_volumerealign and in your call to ft_volumesegment. The cfg.coordinates for ft_volumesegment has to be removed (actually it is a deprecated option). The idea now is that mri-structures in fieldtrip can have a coordsys field, which allows for more transparent use of the different head coordinate system conventions. This takes away the need for intermediately coregistering the MRI in 'ctf'-convention, and would also take away your need to call headcoordinates later on.<u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u1:p> </u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">Best wishes,<u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u1:p> </u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">Jan-Mathijs<u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u1:p> </u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u1:p> </u1:p><o:p></o:p></span></font></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">On Apr 12, 2011, at 11:07 AM, <<a href="mailto:Jan.Hirschmann@med.uni-duesseldorf.de" style="color: blue; text-decoration: underline; ">Jan.Hirschmann@med.uni-duesseldorf.de</a>> <<a href="mailto:Jan.Hirschmann@med.uni-duesseldorf.de" style="color: blue; text-decoration: underline; ">Jan.Hirschmann@med.uni-duesseldorf.de</a>> wrote:<u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><br><br><br><o:p></o:p></span></font></div></div><u1:p></u1:p><span style="orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-spacing: 0px; "><u3:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"><div link="blue" vlink="blue"><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; ">Dear fieldtrip experts,<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; "><u3:p> </u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; ">I have two questions regarding head model creation. As noted on this thread, the volumesegment function was updated and I tested it for our Neuromag data. The segmentation is performed, but unfortunately it is not aligned with the MRI in my case. Here is the code I am using, the fieldtrip is from 9<sup>th</sup><span class="apple-converted-space"> </span>April 2011.<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><u3:p> </u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">%read mri<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">mri                = ft_read_mri(subject_files.fiff_mri);<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">mri.anatomy=double(mri.anatomy);<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><u3:p> </u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">%these are the fiducials for this subject taken from the Neuromag GUI for coregistration<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">cfg=[];<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">cfg.fiducial.rpa=[136.35   142.80    31.96];<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">cfg.fiducial.nas=[47.84   101.80   100.10];<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">cfg.fiducial.lpa=[139.22   146.17   162.69];<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><u3:p> </u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">%define the head coordinate system according to CTF conventions<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">cfg.method='fiducial';<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">real_mri=ft_volumerealign(cfg,mri);<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><u3:p> </u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">%segment<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">cfg                = [];<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">cfg.template       = '/data/apps/spm/spm8/templates/T1.nii';<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">cfg.coordinates    = 'ctf';<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">cfg.keepintermediate = 'no';<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">segmentedmri     = ft_volumesegment(cfg, real_mri);<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><u3:p> </u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">%plot white matter<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">test=segmentedmri;<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">test.anatomy=real_mri.anatomy;<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">cfg=[];<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">cfg.funparameter='white';<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">ft_sourceplot(cfg,test); %see attached picture<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><u3:p> </u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; ">The other issue regards back-transformation from CTF to Neuromag coordinates, which is necessary to make the head model fit the sensors. My idea was to create an appropriate transformation matrix like this.<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; "><u3:p> </u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; ">cd /net/avidya/storage/home/jan/fieldtrip-20110409/private<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; ">ctfmat=headcoordinates(nas,lpa,rpa,'ctf');<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; ">nmmat=headcoordinates(nas,lpa,rpa,'neuromag');<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; ">ctf_to_nm=nmmat/ctfmat;<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; "><u3:p> </u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; "><u3:p> </u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; ">And then to use it on the head model to bring it back into Neuromag coordinates:<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; "><u3:p> </u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; ">%create single shell, realistic headmodel<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; ">cfg                = [];<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; ">hdm                = ft_prepare_singleshell(cfg,segmentedmri);<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; "><u3:p> </u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; ">% transformation of headmodel into Neuromag space<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; ">hdm.bnd.pnt=warp_apply(ctf_to_nm,hdm.bnd.pnt,'homogeneous');<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; "><u3:p> </u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; ">Does this survive a sanity check?<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; "><u3:p> </u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; ">Best regards and thanks a lot,<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; "><u3:p> </u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; ">Jan<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span lang="EN-US" style="font-size: 10pt; font-family: Arial; color: navy; "><u3:p> </u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><u3:p> </u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div class="MsoNormal" align="center" style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; text-align: center; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><hr size="2" width="100%" align="center" tabindex="-1"></span></font></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><b><font size="2" color="black" face="Tahoma"><span style="font-size: 10pt; font-family: Tahoma; color: black; font-weight: bold; ">Von:</span></font></b><span class="apple-converted-space"><font size="2" color="black" face="Tahoma"><span style="font-size: 10pt; font-family: Tahoma; color: black; "> </span></font></span><font size="2" color="black" face="Tahoma"><span style="font-size: 10pt; font-family: Tahoma; color: black; "><a href="mailto:fieldtrip-bounces@donders.ru.nl" style="color: blue; text-decoration: underline; ">fieldtrip-bounces@donders.ru.nl</a><span class="apple-converted-space"> </span>[<a href="mailto:fieldtrip-bounces@donders.ru.nl" style="color: blue; text-decoration: underline; ">mailto:fieldtrip-bounces@donders.ru.nl</a>]<span class="apple-converted-space"> </span><b><span style="font-weight: bold; ">Im Auftrag von<span class="apple-converted-space"> </span></span></b>Jen Whitman<br><b><span style="font-weight: bold; ">Gesendet:</span></b><span class="apple-converted-space"> </span>Montag, 28. Februar 2011 22:32<br><b><span style="font-weight: bold; ">An:</span></b><span class="apple-converted-space"> <st1:personname u4:st="on"></st1:personname></span><st1:personname u2:st="on"><st1:personname w:st="on">Email discussion list for the FieldTrip project</st1:personname></st1:personname><br><b><span style="font-weight: bold; ">Betreff:</span></b><span class="apple-converted-space"> </span>[FieldTrip] I think you solved the problem</span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><u3:p></u3:p><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u3:p> </u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div><p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 12pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">I just checked, and when I re-ran my segmentation script with the new Fieldtrip in order to use an spm8 template image, coordinates got reversed. When I take out the calls to flipdim, they look fine (see attached screenshots). That certainly explains the meaningless results I was getting!<br><br>Thanks for figuring that out,<br><br>Jen<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></p><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">On Mon, Feb 28, 2011 at 12:36 PM, jan-mathijs schoffelen <<a href="mailto:jan.schoffelen@donders.ru.nl" style="color: blue; text-decoration: underline; ">jan.schoffelen@donders.ru.nl</a>> wrote:<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div style="word-wrap: break-word; "><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">Hi Jen,<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u3:p> </u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">At first glance I have a comment on your script. You may need to explicitly check the alignment of your segmented volume and the original anatomy. A while a go some changes were made to ft_volumesegment, taking away the need to do the flipdim(flipdim...  operations. I have posted this on the discussion list last January, but you may not have noticed. <u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">Anyway, if you now have used a recent version of FieldTrip for your segmentation both the location of your dipole grid, and the volume conductor model will not be adequately coregistered with the data, which may lead to funky results to begin with. That's most likely not related to the filetype in which the volumes are saved for later use.<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u3:p> </u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">Best wishes,<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u3:p> </u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="#888888" face="Times New Roman"><span style="font-size: 12pt; color: rgb(136, 136, 136); ">Jan-Mathijs<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "> <u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u3:p> </u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u3:p> </u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">On Feb 28, 2011, at 8:59 PM, Jen Whitman wrote:<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><br><br><br><br><o:p></o:p></span></font></div></div></div><u1:p></u1:p><p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 12pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u3:p></u3:p>Hello Jan,<span class="apple-converted-space"> </span><br><br>When calling volumesegment, I specified 'ctf' as the coordinate system. The function I wrote to call volumesegment and prepare_singleshell for each subject and save the results is pasted below, with a couple of  comments added for clarity.<br>Over the weekend I tried specifying the coordinate system in the call to ft_volumenormalise as 'ctf' rather than 'spm', and commented out all the lines that said cfg.spmversion = 'spm8'; before calling a function. However, that created worse results, as each plot involved stripes of activation and empty voxels, suggesting that 'ctf' was not the correct coordinate system to specify.<br><br>Thanks for the attached script. Looking in that the comments in that, I suspect that the solution to my problems will be to specify my filetype as nifti_img rather than nifti. I'll let you know how that goes.<br><br>Jen<br><br>------------------------------------------------------------------------------------------------------------<br>% the variable subj is simply a string consisting of a subject number (e.g. 's05') which can be a folder name or part of a filename<br>function [vol mri segmentedmri segmentedmriF]=call_volume_segment_function_spm8(subj)<br>cfg.spmversion = 'spm8';<br>cfg.template   = '/home/woodwardlab/spm8/templates/EPI.nii';<br>%cfg.template='/home/common/matlab/spm2/templates/T1.mnc';<span class="apple-converted-space"> </span><br><a href="http://cfg.name" target="_blank" style="color: blue; text-decoration: underline; ">cfg.name</a>=[subj '_volseg'];<br>cfg.write='yes';<br>cfg.smooth='no';         <span class="apple-converted-space"> </span><br>cfg.coordinates='ctf';<span class="apple-converted-space"> </span><br>mri=read_mri([subj '/mri/' subj 'head.mri']); % made with CTF mriConverter and mriViewer software, after fiducials were marked<br>segmentedmri = volumesegment(cfg, mri);<br>segmentedmriF = segmentedmri;<br>segmentedmriF.gray  = flipdim(flipdim(flipdim(segmentedmriF.gray,3),2),1);<br>segmentedmriF.white = flipdim(flipdim(flipdim(segmentedmriF.white,3),2),1);<br>segmentedmriF.csf   = flipdim(flipdim(flipdim(segmentedmriF.csf,3),2),1);<br>segmentedmriF.transform = mri.transform;<br>segmentedmriF.anatomy   = mri.anatomy;<br>cfg = [];<br>cfg.spmversion = 'spm8';<br>vol = prepare_singleshell(cfg, segmentedmriF);<br>eval(['save ' subj '/meg/mrisegmented.mat mri segmentedmri segmentedmriF vol'])<br><br><br><br><br><o:p></o:p></span></font></p><u1:p></u1:p><div><u3:p></u3:p><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">On Sat, Feb 26, 2011 at 5:26 AM, jan-mathijs schoffelen <<a href="mailto:jan.schoffelen@donders.ru.nl" target="_blank" style="color: blue; text-decoration: underline; ">jan.schoffelen@donders.ru.nl</a>> wrote:<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div style="word-wrap: break-word; "><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">Dear Jen,<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u3:p> </u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">I do not manage to reproduce your issue, when only focussing on the ft_volumewrite and visualization part of your pipeline. See attached script, and yet an updated version of ft_volumewrite which you need to (hopefully) draw the same conclusion as I did.<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">Yet, I only now realize that your question may pertain to the entire pipeline. It could be that something is going wrong there. <u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">I only see now that in the part of your script of which you reported that it gave 'good' results, you specify cfg.coordinates = 'ctf' before calling ft_volumenormalise. I assume this is correct, because the coordinate system your source-reconstructed data lives in, is according to the CTF-convention, and not according to the SPM-convention. On the other hand, the template for the spatial normalization lives in the SPM-coordinate system. In order for the spatial normalization to work OK, Fieldtrip tries to convert from one coordinate system to the other (once again, this is appropriate behaviour), before doing the actual normalization. It seems that at least in the script you sent along, in the final (not working version), you specified cfg.coordinates = 'spm' prior to calling ft_volumenormalise. This is probably wrong.<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">Another important point that should be mentioned, is that the coordinate systems in which the functional data and the anatomical data live should be the same for the ft_sourceinterpolate to make sense. In other words, if your source reconstructed images are defined on a 3D grid of positions in CTF-space, the mri.transform of your anatomy should describe a transformation from voxel to CTF-space.<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">I think you may want to revisit step by step this part of the pipeline; I don't think the problem lies in the writing.<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">A final possibility of course is that Mricron is misbehaving...<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u3:p> </u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">Best,<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u3:p> </u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="#888888" face="Times New Roman"><span style="font-size: 12pt; color: rgb(136, 136, 136); ">Jan-Mathijs<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="#888888" face="Times New Roman"><span style="font-size: 12pt; color: rgb(136, 136, 136); "><u3:p> </u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="#888888" face="Times New Roman"><span style="font-size: 12pt; color: rgb(136, 136, 136); "><u3:p> </u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="#888888" face="Times New Roman"><span style="font-size: 12pt; color: rgb(136, 136, 136); "><u3:p> </u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u3:p> </u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u3:p> </u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div><u3:p><div style="word-wrap: break-word; "><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "> <u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">On Feb 25, 2011, at 9:44 PM, Jen Whitman wrote:<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><br><br><br><br><o:p></o:p></span></font></div></div></div><u1:p></u1:p><p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 12pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u3:p></u3:p>Hi Jan,<br><br>I tried re-running the analysis with the new script you sent me, and the latest version of fieldtrip (since I needed ft_get_opt as well), but the spm8 images being written are still producing flawed results. It's the same problem as I mentioned briefly in my previous post. I am not getting any error messages when writing these images. Rather, my problem is that the spm8 and spm2 results from the same data ought to be identical when viewed in mricron, but they're far from it. When I use mricron to look at the results from the spm8-format images, combined across participants to create a t-image, I just get a single 'blob' spanning roughly half the brain. In contrast, when I used spm2-format previously on the same data, the t-image was much more meaningful; a posterior alpha power decrease in a set of regions corresponding to the 'task-positive network' (a network found in the results of an fMRI version of my experiment, and widely reported in the fMRI literature).<span class="apple-converted-space"> </span><br><br>This failure to replicate the spm2 results when using spm8 images from the same data leads me to suspect that something is wrong with the coordinates for spm8 format. However, after experimenting extensively with different cfg options I still haven't identified the problem. If I my structural MRIs have been saved to .mri files using CTF's MRIConverter program, which cfg options, particularly for coordinates, template images, and filetypes, should I specify before calling the ft_volumesegment, ft_prepare_singleshell, ft_sourceinterpolate, ft_volumenormalise, and ft_volumewrite functions? Or should I be calling a different set of functions now?<br><br>Thanks again for your help,<br><br>Jen<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></p><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">On Thu, Feb 24, 2011 at 10:07 AM, Jen Whitman <<a href="mailto:jenwhitman@gmail.com" target="_blank" style="color: blue; text-decoration: underline; ">jenwhitman@gmail.com</a>> wrote:<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div><p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 12pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">Great, thanks!<br><br>I'll start the analysis with your new script today and will let you know how it works out.<br></span></font><font color="#888888"><span style="color: rgb(136, 136, 136); "><br>Jen<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></p><div><div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">On Thu, Feb 24, 2011 at 4:44 AM, jan-mathijs schoffelen <<a href="mailto:jan.schoffelen@donders.ru.nl" target="_blank" style="color: blue; text-decoration: underline; ">jan.schoffelen@donders.ru.nl</a>> wrote:<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div></div><blockquote style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; border-left-style: solid; padding-top: 0cm; padding-right: 0cm; padding-bottom: 0cm; padding-left: 6pt; margin-left: 4.8pt; margin-top: 5pt; margin-right: 0cm; margin-bottom: 5pt; border-width: initial; border-color: initial; border-width: initial; border-color: initial; "><div><div><div style="word-wrap: break-word; "><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">Dear Jen,<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u3:p> </u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">I managed to reproduce your problem. The code was rather buggy and indeed ft_volumewrite did not behave as it should have. I now fixed it in the code and it should run fine now. Please find the updated file attached. It will be available on our ftp-server as of tonight. Please note that I updated the documentation, and changed the names of some of the options a bit. If you want to save your data in analyze-format, you should specify cfg.filetype = 'analyze_spm'. If you specify cfg.filetype = 'nifti', it should write out a volume to nifti-format, using SPM8.<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u3:p> </u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">Best wishes,<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u3:p> </u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="#888888" face="Times New Roman"><span style="font-size: 12pt; color: rgb(136, 136, 136); ">Jan-Mathijs<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="#888888" face="Times New Roman"><span style="font-size: 12pt; color: rgb(136, 136, 136); "><u3:p> </u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="#888888" face="Times New Roman"><span style="font-size: 12pt; color: rgb(136, 136, 136); "><u3:p> </u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u3:p> </u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div></div><u3:p><div style="word-wrap: break-word; "><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "> <u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u3:p> </u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">On Feb 23, 2011, at 7:44 PM, Jen Whitman wrote:<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u3:p> </u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><blockquote type="cite" style="margin-top: 5pt; margin-bottom: 5pt; "><p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 12pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><br>Dear Jan,<br><br>Thanks for the quick reply. Yes, I have tried it out quite a few times now, experimenting with different settings in the cfgs. Below I'll paste the code I've been using to write images - first the code that successfully created spm2 images that produced good results, then the code used for creating nifti format images from the same data. The comments in this second part are at this point a bit of a maze of cfg options I've been changing back & forth. Any insights/suggestions regarding how to set up my cfgs to make this work would be greatly appreciated.<br><br>Jen<br><br><br>%%%%%%%% this code generated spm2-compatible images which did work (producing results that made sense).<br>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br><br>    sourcetemp.avg.pow = (sourcetemp.avg.pow - sourcePre.avg.pow) ./ sourcePre.avg.pow;<br><br>    cfg = [];<br>    cfg.downsample = 2;<br>    sourcetempInt = sourceinterpolate(cfg, sourcetemp , mri);<br><br>    % projecting the plot onto a surface...<br>    cfg = [];<br>    cfg.coordinates  = 'ctf';<br>    cfg.template     = '/home/common/matlab/spm2/templates/T1.mnc'; %this template is in MNI coordinates<br>    sourcetempIntN = volumenormalise(cfg, sourcetempInt);<br><br>    filename=[subj 'run' int2str(r) 'cond' int2str(cond) '_' int2str(f) 'HzWin' int2str(win) 'width750ms'];<br>    cfg=[];<br>    cfg.parameter     = 'avg.pow'; % string, describing the functional data to be processed, e.g. 'pow', 'coh' or 'nai'<br>    cfg.filename      = [filename '.img']; %'testimageoutput_alphafreq'; % filename without the extension<br>    cfg.filetype      = 'spm'; %'analyze', 'spm', 'vmp' or 'vmr'<br>    cfg.coordinates   = 'spm'; %'spm, 'ctf' or empty for interactive (default = [])<br>    cfg.datatype = 'double'; %'float'; %'double'; %'bit1', 'uint8', 'int16', 'int32', 'float' or 'double'<br><br>    volumewrite(cfg, sourcetempIntN)<br><br>   <span class="apple-converted-space"> </span><br>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br>%%%%% this code below hasn't worked yet...<br><br>% I added    cfg.spmversion = 'spm8';<br>% in the cfgs for the calls to ft_prepare_leadfield and ft_sourceanalysis,<br>% and in the call to prepare_singleshell after calling volumesegment<br><br>% I've also ensured that spm8 is the only spm version in my path, even in<br>% the fieldtrip/external folder, and ensured that spm8 is installed properly<br>% (files compiled correctly, etc..)<br><br>    sourcetemp.avg.pow = (sourcetemp.avg.pow - sourcePre.avg.pow) ./ sourcePre.avg.pow;<br><br>    filename=[subj 'run' int2str(r) 'cond' int2str(cond) '_' int2str(f) 'Hzspm8_FIXv9_Win' int2str(win) 'width750ms.img'];<br><br>    cfg = [];<br>%     cfg.coordinates  = 'spm'; % changed for version 5<br>%     cfg.spmversion = 'spm8'; % changed for version 5<br>    cfg.downsample = 4;<br>    sourcetempInt = ft_sourceinterpolate(cfg, sourcetemp , mri);<br><br><br>    % projecting the plot onto a surface...<br>    cfg = [];<br>    %cfg.coordinates  = 'spm'; % changed for version 5<br>    %cfg.coordinates  = 'ctf'; % changed for version 5<br>    cfg.coordinates = 'spm'; % changed back to spm for version 9<br>    cfg.downsample = 4;<br>    %cfg.spmversion = 'spm8'; % changed for version 6 (because this gets specified in volumewrite)<br>    cfg.template = 'Hmatrix/mask.nii.nii'; % basically equivalent to using spm8/templates/EPI.nii, except that mask.nii (produced from fmri data) has the desired voxel size<br>    %<span class="apple-converted-space"> </span><a href="http://cfg.name" target="_blank" style="color: blue; text-decoration: underline; ">cfg.name</a><span class="apple-converted-space"> </span>= [filename]; % changed for version 6<br>    %cfg.write= 'yes'; % changed for version 6 (when this was set to 'yes' there was no subsequent call to volumewrite)<br>    cfg.write= 'no';   % changed for version 6<br>    sourcetempIntN = ft_volumenormalise(cfg, sourcetempInt);<br>   <span class="apple-converted-space"> </span><br>    % this whole cfg and function call added for version 6<span class="apple-converted-space"> </span><br>    cfg=[];<br>    %   cfg.parameter     = string, describing the functional data to be processed, e.g. 'pow', 'coh' or 'nai'<br>%   cfg.filename      = filename without the extension<br>%   cfg.filetype      = 'analyze', 'spm', 'vmp' or 'vmr'<br>%   cfg.vmpversion    = 1 or 2 (default) version of the vmp-format to use<br>%   cfg.coordinates   = 'spm, 'ctf' or empty for interactive (default = [])<br>    cfg.parameter='pow';<br>    cfg.filename=filename;<span class="apple-converted-space"> </span><br>    cfg.filetype = 'spm';<br>    cfg.spmversion = 'SPM8'; % capitalized after first error message from vers 6<br>%   cfg.dataformat='nifti';  % added after first error message from vers 6<br>                                 % commented out after 2nd error message from vers 6<br>    %cfg.vmpversion=2; % this is a filetype, like spm, so don't need to specify unless cfg.filetyp='vmp' <span class="apple-converted-space"> </span><br>    cfg.coordinates='spm';<br>    ft_volumewrite(cfg,sourcetempIntN);<br><br>   <span class="apple-converted-space"> </span><br><br><br><br><br><o:p></o:p></span></font></p><u1:p></u1:p><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u3:p></u3:p>On Wed, Feb 23, 2011 at 7:50 AM, jan-mathijs schoffelen <<a href="mailto:jan.schoffelen@donders.ru.nl" target="_blank" style="color: blue; text-decoration: underline; ">jan.schoffelen@donders.ru.nl</a>> wrote:<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">Dear Jen,<br><br>I notice that indeed in the documentation section of ft_write_volume there is a FIXME behind nifti. Yet, nifti format seems to be supported by ft_write_volume (at least in a recent version of fieldtrip). Did you try it at all (and ran into problems) or were you held back by the FIXME statement? Could you just try it out using a recent fieldtrip function?<br><br>Thanks and best wishes<br><br>Jan-Mathijs<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div><p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 12pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><br><br><br>On Feb 23, 2011, at 2:21 AM, Jen Whitman wrote:<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></p></div></div><blockquote style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; border-left-style: solid; padding-top: 0cm; padding-right: 0cm; padding-bottom: 0cm; padding-left: 6pt; margin-left: 4.8pt; margin-top: 5pt; margin-right: 0cm; margin-bottom: 5pt; border-width: initial; border-color: initial; border-width: initial; border-color: initial; "><div><div><p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 12pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">Hello,<br><br>While writing beamformed images to spm2 format in a previous version of fieldtrip (now lost due to a computer crash), I was able to get nice-looking results; networks of brain regions consistent with existing literature. When I try to write images from the same dataset and the same analysis to spm8 format, my results (t-images computed across subjects) end up being single clusters spanning large sections of the brain (e.g. a 'blob' spanning all of one hemisphere but not the other). Unfortunately, some aspects of my planned data analyses cannot be performed on spm2 images, so I have to find a way of writing to successfully to nifti format.<br><br>I just noticed that in the comments in the ft_write_volume function, which I am calling via ft_volumewrite, it says 'FIXME' next to nifti under the list of supported dataformats. Is there by any chance a patch out there for writing nifti images?<br><br>Thanks!<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></p></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl" target="_blank" style="color: blue; text-decoration: underline; ">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank" style="color: blue; text-decoration: underline; ">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></blockquote><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><br>Dr. J.M. (Jan-Mathijs) Schoffelen<br>Donders Institute for Brain, Cognition and Behaviour,<br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands<br><a href="mailto:J.Schoffelen@donders.ru.nl" target="_blank" style="color: blue; text-decoration: underline; ">J.Schoffelen@donders.ru.nl</a><br>Telephone: 0031-24-3614793<br><br>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl" target="_blank" style="color: blue; text-decoration: underline; ">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank" style="color: blue; text-decoration: underline; ">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><br>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl" target="_blank" style="color: blue; text-decoration: underline; ">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank" style="color: blue; text-decoration: underline; ">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></blockquote></div></div></div><div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u3:p> </u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><span style="word-spacing: 0px; "><div style="word-wrap: break-word; "><div style="word-wrap: break-word; "><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="4" color="black" face="Helvetica"><span style="font-size: 13.5pt; font-family: Helvetica; color: black; ">Dr. J.M. (Jan-Mathijs) Schoffelen <u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="4" color="black" face="Helvetica"><span style="font-size: 13.5pt; font-family: Helvetica; color: black; ">Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="4" color="black" face="Helvetica"><span style="font-size: 13.5pt; font-family: Helvetica; color: black; "><a href="mailto:J.Schoffelen@donders.ru.nl" target="_blank" style="color: blue; text-decoration: underline; ">J.Schoffelen@donders.ru.nl</a><u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="4" color="black" face="Helvetica"><span style="font-size: 13.5pt; font-family: Helvetica; color: black; ">Telephone: 0031-24-3614793<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div></div></div></span></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "></span><u3:p> </u3:p><u1:p></u1:p><o:p></o:p></font></div></div></div></div></div></div></div><div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><br>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl" target="_blank" style="color: blue; text-decoration: underline; ">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank" style="color: blue; text-decoration: underline; ">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div></div></u3:p></blockquote></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u3:p></u3:p> <u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><br>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl" target="_blank" style="color: blue; text-decoration: underline; ">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank" style="color: blue; text-decoration: underline; ">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u3:p> </u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div style="word-wrap: break-word; "><div style="word-wrap: break-word; "><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">Dr. J.M. (Jan-Mathijs) Schoffelen <u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><a href="mailto:J.Schoffelen@donders.ru.nl" target="_blank" style="color: blue; text-decoration: underline; ">J.Schoffelen@donders.ru.nl</a><u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; ">Telephone: 0031-24-3614793<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u3:p> </u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><br>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl" target="_blank" style="color: blue; text-decoration: underline; ">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank" style="color: blue; text-decoration: underline; ">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></u3:p></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><br>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl" target="_blank" style="color: blue; text-decoration: underline; ">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank" style="color: blue; text-decoration: underline; ">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u3:p> </u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><span style="word-spacing: 0px; "><span style="word-spacing: 0px; "><div style="word-wrap: break-word; "><div style="word-wrap: break-word; "><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="4" color="black" face="Helvetica"><span style="font-size: 13.5pt; font-family: Helvetica; color: black; ">Dr. J.M. (Jan-Mathijs) Schoffelen <u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="4" color="black" face="Helvetica"><span style="font-size: 13.5pt; font-family: Helvetica; color: black; ">Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="4" color="black" face="Helvetica"><span style="font-size: 13.5pt; font-family: Helvetica; color: black; "><a href="mailto:J.Schoffelen@donders.ru.nl" target="_blank" style="color: blue; text-decoration: underline; ">J.Schoffelen@donders.ru.nl</a><u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="4" color="black" face="Helvetica"><span style="font-size: 13.5pt; font-family: Helvetica; color: black; ">Telephone: 0031-24-3614793<u3:p></u3:p></span></font><font color="black"><span style="color: black; "><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div></div></div></span></span></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><u3:p><span style="font-size: 12pt; color: black; "></span> <o:p></o:p></u3:p><u1:p></u1:p></font></div></div></div></div></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><br>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl" style="color: blue; text-decoration: underline; ">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank" style="color: blue; text-decoration: underline; ">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u3:p> </u3:p><u1:p></u1:p><o:p></o:p></span></font></div></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="4" color="black" face="Helvetica"><span style="font-size: 13.5pt; font-family: Helvetica; color: black; "><misalignment.png><u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="4" color="black" face="Helvetica"><span style="font-size: 13.5pt; font-family: Helvetica; color: black; ">_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl" style="color: blue; text-decoration: underline; ">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" style="color: blue; text-decoration: underline; ">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div></div></u3:smarttagtype></span></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u1:p> </u1:p><o:p></o:p></span></font></div></div><span style="orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-spacing: 0px; "><span style="orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-spacing: 0px; "><div apple-content-edited="true"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="4" color="black" face="Helvetica"><span style="font-size: 13.5pt; font-family: Helvetica; color: black; ">Dr. J.M. (Jan-Mathijs) Schoffelen <u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="4" color="black" face="Helvetica"><span style="font-size: 13.5pt; font-family: Helvetica; color: black; ">Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands<u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="4" color="black" face="Helvetica"><span style="font-size: 13.5pt; font-family: Helvetica; color: black; "><a href="mailto:J.Schoffelen@donders.ru.nl" style="color: blue; text-decoration: underline; ">J.Schoffelen@donders.ru.nl</a><u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="4" color="black" face="Helvetica"><span style="font-size: 13.5pt; font-family: Helvetica; color: black; ">Telephone: 0031-24-3614793<u1:p></u1:p></span></font><font color="black"><span style="color: black; "><o:p></o:p></span></font></div></div></div></div></div></div></span><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" color="black" face="Times New Roman"><span style="font-size: 12pt; color: black; "><u1:p> </u1:p><o:p></o:p></span></font></div></div></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="4" color="black" face="Helvetica"><span style="font-size: 13.5pt; font-family: Helvetica; color: black; "><pic1.png><pic2.png><pic3.png><o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="4" color="black" face="Helvetica"><span style="font-size: 13.5pt; font-family: Helvetica; color: black; ">_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl" style="color: blue; text-decoration: underline; ">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" style="color: blue; text-decoration: underline; ">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><o:p></o:p></span></font></div></div></u1:smarttagtype></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p> </o:p></span></font></div><span style="orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-spacing: 0px; "><span style="orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-spacing: 0px; "><div apple-content-edited="true"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="4" color="black" face="Helvetica"><span style="font-size: 13.5pt; font-family: Helvetica; color: black; ">Dr. J.M. (Jan-Mathijs) Schoffelen <o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="4" color="black" face="Helvetica"><span style="font-size: 13.5pt; font-family: Helvetica; color: black; ">Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands<o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="4" color="black" face="Helvetica"><span style="font-size: 13.5pt; font-family: Helvetica; color: black; "><a href="mailto:J.Schoffelen@donders.ru.nl" style="color: blue; text-decoration: underline; ">J.Schoffelen@donders.ru.nl</a><o:p></o:p></span></font></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="4" color="black" face="Helvetica"><span style="font-size: 13.5pt; font-family: Helvetica; color: black; ">Telephone: 0031-24-3614793<o:p></o:p></span></font></div></div></div></div></div></span><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p> </o:p></span></font></div></span></div><span><headmodel_with_neuromag.m></span></div>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl" style="color: blue; text-decoration: underline; ">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" style="color: blue; text-decoration: underline; ">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></o:smarttagtype></div></span></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Dr. J.M. (Jan-Mathijs) Schoffelen </div><div>Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands</div><div><a href="mailto:J.Schoffelen@donders.ru.nl">J.Schoffelen@donders.ru.nl</a></div><div>Telephone: 0031-24-3614793</div></div></span></div></span> </div><br></div></body></html>