<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi all, <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">It occurs to me that using ft_sourceinterpolate to decrease, rather than increase, the dimensions is not intuitive, and I found that it was actually fairly easy to get the Gorden et al. atlas loaded in as they provide an MNI-registered
 form of the atlas. So I repeated my steps using the selected atlas and with a smaller headmodel and leadfield resulting in a source file that had to be interpolated in the more anticipated direction. The problem persists, however.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I now have connectivity results with the following pertinent values:<o:p></o:p></p>
<p class="MsoNormal">          dim: [18 15 15]<o:p></o:p></p>
<p class="MsoNormal">          pos: [4050×3 double]<o:p></o:p></p>
<p class="MsoNormal">    cohspctrm: [4050×4050 double]<o:p></o:p></p>
<p class="MsoNormal">       dimord: 'pos_pos_freq'<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">My atlas has the following pertinent values:<o:p></o:p></p>
<p class="MsoNormal">            dim: [61 73 61]<o:p></o:p></p>
<p class="MsoNormal">      transform: [4×4 double]<o:p></o:p></p>
<p class="MsoNormal">         brick0: [61×73×61 uint16]<o:p></o:p></p>
<p class="MsoNormal">    brick0label: {1×333 cell}<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The results of interpolating my connectivity source to the atlas lead to the same peculiar asymmetry in the cohspctrm results:<o:p></o:p></p>
<p class="MsoNormal">          dim: [61 73 61]<o:p></o:p></p>
<p class="MsoNormal">    transform: [4×4 double]<o:p></o:p></p>
<p class="MsoNormal">       inside: [61×73×61 logical]<o:p></o:p></p>
<p class="MsoNormal">    cohspctrm: [271633×4050 double]<o:p></o:p></p>
<p class="MsoNormal">          pos: [271633×3 double]<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">And as the whole point is to then use ft_sourceparcellate, I found that this carries over the asymmetrical results of the interpolation with the following source values after parcellation:<o:p></o:p></p>
<p class="MsoNormal">               freq: 9.9340<o:p></o:p></p>
<p class="MsoNormal">              label: {1×333 cell}<o:p></o:p></p>
<p class="MsoNormal">          cohspctrm: [333×4050 double]<o:p></o:p></p>
<p class="MsoNormal">      brainordinate: [1×1 struct]<o:p></o:p></p>
<p class="MsoNormal">                cfg: [1×1 struct]<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">As you can see, the first dimension of the cohspctrm results increased from 4050 to 271633 with interpolation and then decreased to 333, the number of parcels in my chosen atlas, exactly as I would have expected. The second dimension, however,
 did not budge from its initial 4050. The interpolation step is necessary to ensure the source matches the atlas (FT throws an error otherwise).
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Could this be a bug in ft_sourceinterpolate and ft_sourceparcellate, or is there some crucial step such as converting everything into another format that I am missing?
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks again and sorry for the serial messages,<o:p></o:p></p>
<p class="MsoNormal">Josh<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black"><fieldtrip-bounces@science.ru.nl> on behalf of Joshua Bear <Joshua.Bear@childrenscolorado.org><br>
<b>Reply-To: </b>FieldTrip discussion list <fieldtrip@science.ru.nl><br>
<b>Date: </b>Wednesday, April 25, 2018 at 8:14 PM<br>
<b>To: </b>FieldTrip discussion list <fieldtrip@science.ru.nl><br>
<b>Subject: </b>Re: [FieldTrip] ft_sourceinterpolate question<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">Hi Robert, <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Thank you so much for the response! <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">My ultimate intention is actually to use the parcellation scheme proposed by Gordon et al. (<i>Cerebral Cortex</i>, Volume 26, Issue 1, 1 January 2016, Pages 288–303, <a href="https://doi.org/10.1093/cercor/bhu239">https://doi.org/10.1093/cercor/bhu239</a>)
 though at this time I was using the atlas provided in the tutorial. <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">The problem I ran into is that I am trying to interpolate my brain’s mesh DOWN from 15002 to 8004 (to match the atlas), not up. As you pointed out, I have had some problems with other high resolution meshes, but in this case ft_sourceinterpolate
 seemed to work — it just only worked for one of the two dimensions of my connectivity data. That is, it went from
<span style="color:black">a [15002×15002 double] to a [8004×15002 double]</span>. Of course it’s possible the interpolation for that first dimension was incorrect, but what confused me was that it did not interpolate the second dimension. (As I write this,
 I’m wondering if I should simply try transposing the matrix and running the interpolation again!).
<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I will try, as you suggest, downsampling the mesh externally and trying again. I’m not able to match the 8004 vertices perfectly, but perhaps if I drop it slightly below this number it will be able to interpolate up correctly.
<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Any other thoughts or suggestions are greatly appreciated as well.
<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Best,<o:p></o:p></p>
<p class="MsoNormal">Josh<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black"><fieldtrip-bounces@science.ru.nl> on behalf of "Seymour, Robert (Research Student)" <seymourr@aston.ac.uk><br>
<b>Reply-To: </b>FieldTrip discussion list <fieldtrip@science.ru.nl><br>
<b>Date: </b>Wednesday, April 25, 2018 at 5:48 PM<br>
<b>To: </b>"fieldtrip@science.ru.nl" <fieldtrip@science.ru.nl><br>
<b>Subject: </b>Re: [FieldTrip] ft_sourceinterpolate question</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal"><a name="_MailOriginalBody">Hi Josh,  <o:p></o:p></a></p>
<div>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody">It seems like you are using the HCP Glasser atlas ('A multi-modal parcellation of human cerebral cortex')? The atlas presented as part of the network analysis tutorial is designed for a cortical
 mesh with 8004 vertices, rather than the 15002 you are using. I don’t believe ft_sourceinterpolate can currently cope with the surface-based transformation upwards from 8000—> 15000 vertices. <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody">To use the HCP atlas you will need to downsample the original 32k atlas in fs_LR space to 15000 space and transform to whichever standard-brain template you are using. This is non-trivial and
 requires some functions from the HCP project (e.g. wb_command which can be found here: </span><a href="https://www.humanconnectome.org/software/workbench-command"><span style="mso-bookmark:_MailOriginalBody">https://www.humanconnectome.org/software/workbench-command</span><span style="mso-bookmark:_MailOriginalBody"></span></a><span style="mso-bookmark:_MailOriginalBody">).<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody">If your mesh is created using Freesurfer you can use this script here:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"></span><a href="https://github.com/Washington-University/Pipelines/blob/master/PostFreeSurfer/scripts/FreeSurfer2CaretConvertAndRegisterNonlinear.sh"><span style="mso-bookmark:_MailOriginalBody">https://github.com/Washington-University/Pipelines/blob/master/PostFreeSurfer/scripts/FreeSurfer2CaretConvertAndRegisterNonlinear.sh</span><span style="mso-bookmark:_MailOriginalBody"></span></a><span style="mso-bookmark:_MailOriginalBody"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody">If the mesh is not constructed using Freesurfer it will be tricker & I would recommend contacting the HCP mailing list.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody">Good luck!<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody">Robert Seymour (Aston Brain Centre & Department of Cognitive Science, Macquarie University).<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"> <o:p></o:p></span></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">
<hr size="2" width="100%" align="center">
</span></span></div>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody">CONFIDENTIALITY NOTICE:  This e-mail, including any attachments, is for the sole use of the intended recipient and may contain confidential and privileged information.  If you are not an intended
 recipient, or the person responsible for delivering this message to an intended recipient, you are hereby notified that reading, copying, using or distributing this message is prohibited. If you are not an intended recipient, please contact the sender by reply
 email and destroy all copies of the original message from your computer system. <o:p>
</o:p></span></p>
<div class="MsoNormal" align="center" style="text-align:center"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">
<hr size="2" width="100%" align="center">
</span></span></div>
<span style="mso-bookmark:_MailOriginalBody"></span></div>
<font size="3" face="Times New Roman">

</font><div style="margin: 0in 0in 0pt; text-align: left;" class="MsoNormal" align="center"><span style='font-family: "Times New Roman","serif"; font-size: 12pt; mso-fareast-font-family: "Times New Roman";'>

<hr align="center" SIZE="2" width="100%">

</span>
CONFIDENTIALITY NOTICE:  This e-mail, including any attachments, is for the sole use of the intended recipient and may contain confidential and privileged information.  If you are not an intended recipient, or the person responsible for delivering this message to an intended recipient, you are hereby notified that reading, copying, using or distributing this message is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy all copies of the original message from your computer system. <br> 
<font size="3" face="Times New Roman">

</font></div><div style="margin: 0in 0in 0pt; text-align: center;" class="MsoNormal" align="center"><span style='font-family: "Times New Roman","serif"; font-size: 12pt; mso-fareast-font-family: "Times New Roman";'>

<hr align="center" SIZE="2" width="100%">

</span></div><font size="3" face="Times New Roman">

</font></body>
</html>