<div dir="ltr">Hi Jan-Mathijs,<div><br></div><div>Thank you very much for your suggestion.</div><div><br></div><div>I'd like to conduct the analysis in the volume space because I'm also interested in hippocampal activity. I guess I could use The Brainnetome Atlas as provided in fieldtrip template atlases  (<a href="https://www.fieldtriptoolbox.org/template/atlas/">https://www.fieldtriptoolbox.org/template/atlas/</a>) for finer-grained parcels.<br></div><div><br></div><div>Thank you again for your valuable input!</div><div><br></div><div>Best,</div><div>Lin</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 23 Mar 2021 at 03:49, Schoffelen, J.M. (Jan Mathijs) <<a href="mailto:jan.schoffelen@donders.ru.nl">jan.schoffelen@donders.ru.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<div style="overflow-wrap: break-word;">
Hi Lin,
<div><br>
</div>
<div>I agree that the AAL atlas without further subdivisions is too coarse. If you need a finer subdivision, you need to create one manually. I am usually quite happy with the granularity provided by a cortical surface based source model, and an refined
 anatomical atlas based on Conte69, as used in DOI:<a href="https://doi.org/10.1523/JNEUROSCI.2271-19.2020" target="_blank">10.1523/JNEUROSCI.2271-19.2020</a>, <a href="https://doi.org/10.7554/eLife.53715" target="_blank">DOI: 10.7554/eLife.53715</a> and <a href="https://doi.org/10.1073/pnas.1703155114" target="_blank">DOI:
 10.1073/pnas.1703155114</a>.</div>
<div><br>
</div>
<div>Best wishes,</div>
<div>Jan-Mathijs</div>
<div><br>
<div><br>
<blockquote type="cite">
<div>On 22 Mar 2021, at 20:51, Lin Wang <<a href="mailto:wanglinsisi@gmail.com" target="_blank">wanglinsisi@gmail.com</a>> wrote:</div>
<br>
<div>
<div dir="ltr">
<div>Hi Jan-Mathijs,</div>
<div><br>
</div>
<div>Thank you for your super clear explanation. I see what you mean now.</div>
<div><br>
</div>
<div>I also see why it's better to run the analysis within a bigger anatomically defined brain region. Is there a way to divide a specific anatomical region into two searchlight regions based on the MNI coordinate? For example, I'd like to use the
 AAL atlas to define the left inferior temporal lobe, and then divide this region into two ROIs, with the anterior and posterior parts being separated by y=-31.</div>
<div><br>
</div>
<div>Is there a way to do so? Or can I only use the existing template atlas to define the searchlight regions?</div>
<div><br>
</div>
<div>Best,</div>
<div>Lin</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, 22 Mar 2021 at 12:59, Schoffelen, J.M. (Jan Mathijs) <<a href="mailto:jan.schoffelen@donders.ru.nl" target="_blank">jan.schoffelen@donders.ru.nl</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>Hi Lin,
<div><br>
</div>
<div>Not exactly. Apologies that I was not clear enough. What I meant with  'the neighbourhood is implicit in their order’ is the following:</div>
<div><br>
</div>
<div>if you take the spatial dimension of your data - including the outsiders - and you would reshape it into the 3D volume, by doing something like reshape(datavector, source.dim); then for a given dipole indexed with the triplet of volumetric indices
 (ix,iy,iz) has its neighbours at (ix+1,iy,iz), (ix, iy+1, iz), (ix, iy, iz+1) etc. </div>
<div><br>
</div>
<div>Now, if you want to manually define for each of the dipole positions their (6 18 or 26? neighbours, depending on whether you include only the center faces, the edges or the corners of the 3x3x3 cube) you probably would want to loop through the
 three dimensions and identify for each of the dipoles which are the indices of their direct neighbours. To this end, you could start with creating a ‘dummy’ variable that contains the dipole indices in a volume, i.e. reshape(1:5780, [17 20 17]), and then loop
 through all positions in the volume to identify the neighbours</div>
<div><br>
</div>
<div><br>
</div>
<div>neighbours = cell([17 20 17]);</div>
<div>for i = 2:16</div>
<div>for j = 2:19</div>
<div>for k =2:16</div>
<div><br>
</div>
<div>tmp = dummy(i+[-1:1], j+[-1:1],k+[-1:1]); % this needs to be adjusted according to which part of the cube you desire in your searchlight</div>
<div>neighbours{i,j,k} = tmp(:);</div>
<div><br>
</div>
<div>end</div>
<div>end</div>
<div>end</div>
<div><br>
</div>
<div>On a side note, I would think that doing a spatial searchlight on source reconstructed MEG data is a little bit of an overkill, unless you have reason to suspect that you have some local very high spatial resolution. As an alternative, you could
 consider chunking your data into parcels -e.g. based on a(n) (refined) anatomical atlas- and use those parcels as your spatial searchlight.</div>
<div><br>
</div>
<div>Best wishes,</div>
<div>Jan-Mathijs</div>
<div> </div>
<div><br>
<div><br>
<blockquote type="cite">
<div>On 22 Mar 2021, at 17:19, Lin Wang <<a href="mailto:wanglinsisi@gmail.com" target="_blank">wanglinsisi@gmail.com</a>> wrote:</div>
<br>
<div>
<div dir="ltr">
<div>Hi Jan-Mathijs,</div>
<div><br>
</div>
<div>Thank you very much for your response.</div>
<div><br>
</div>
<div>I defined the dipole positions with a regular 3D grid, with a dimension of 17*20*17 (following
<a href="https://www.fieldtriptoolbox.org/tutorial/sourcemodel/" target="_blank">
https://www.fieldtriptoolbox.org/tutorial/sourcemodel/</a>). This gives me 5780 grid points in total, with 2982 grid points inside of the brain.</div>
<div><br>
</div>
<div>You mentioned that 'the neighbourhood is implicit in their order', so can I do the following for the searchlight type of analysis:</div>
<div>(1) select only the activation of the 2982 grid points</div>
<div>(2) conduct analysis to every 10 grid points that are next to each other</div>
<div>(3) loop through all the 2982 grid points</div>
<div><br>
</div>
<div>Thank you again for your input!</div>
<div>Lin</div>
<div><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, 19 Mar 2021 at 03:57, Schoffelen, J.M. (Jan Mathijs) <<a href="mailto:jan.schoffelen@donders.ru.nl" target="_blank">jan.schoffelen@donders.ru.nl</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>Hi Lin,
<div><br>
</div>
<div>The answer to your question depends on the topology of the source space.</div>
<div>If the dipole positions are defined on a regular 3D grid, the neighbourhood is implicit in their order.</div>
<div>If the dipole positions are defined on a cortical mesh (that includes a triangulation), the neighbourhood can be determined from the triangulation.</div>
<div><br>
</div>
<div>Best wishes,</div>
<div>Jan-Mathijs</div>
<div><br>
<div><br>
<blockquote type="cite">
<div>On 18 Mar 2021, at 01:59, Lin Wang <<a href="mailto:wanglinsisi@gmail.com" target="_blank">wanglinsisi@gmail.com</a>> wrote:</div>
<br>
<div>
<div dir="ltr">
<div style="margin:0in;font-family:Calibri;font-size:11pt">Hi field excerpts,</div>
<div style="margin:0in;font-family:Calibri;font-size:11pt"><br>
</div>
<div style="margin:0in;font-family:Calibri;font-size:11pt">I'd like to implement a searchlight type of multivariate analysis in the MEG source localized data, but I don’t know where to find the information about neighboring voxels for each voxel.</div>
<div style="margin:0in;font-family:Calibri;font-size:11pt"><br>
</div>
<div style="margin:0in;font-family:Calibri;font-size:11pt">I guess this is also relevant to the definition of the neighborhood when conducting cluster-based permutation tests in the source space.</div>
<div style="margin:0in;font-family:Calibri;font-size:11pt"><br>
</div>
<div style="margin:0in;font-family:Calibri;font-size:11pt">Could anyone help me?</div>
<div style="margin:0in;font-family:Calibri;font-size:11pt"><br>
</div>
<div style="margin:0in;font-family:Calibri;font-size:11pt">Thank you very much!</div>
<div style="margin:0in;font-family:Calibri;font-size:11pt">Lin</div>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</div>
</blockquote>
</div>
<br>
</div>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote>
</div>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</div>
</blockquote>
</div>
<br>
</div>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote>
</div>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</div>
</blockquote>
</div>
<br>
</div>
</div>

_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote></div>