<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Michael,
<div class=""><br class="">
</div>
<div class="">You’d need to adjust the vertex indices as specified in the hemisphere specific triangulations (in fieldtrip this is the ’tri’ field, in generic matlab these are the so-called ‘faces’ of a mesh). <br class="">
<div><br class="">
</div>
<div>if you do cat(1, atlas.tri, atlas_right.tri), the numbers in the second part of this resulting matrix (running from 1:N2, where N2 is the number of rows in atlas_right.pos), should point to the (N1+1):(N1+N2) rows in atlas.pos (where N1 is the number of
rows in atlas_left.pos). Currently, the numbers range from 1:N2, which points to a bunch of left-hemispheric points.</div>
<div><br class="">
</div>
<div>Solution: atlas.tri = cat(1,atlas.tri, atlas_right.tri+size(atlas_left.pos,1));</div>
<div><br class="">
</div>
<div>Good luck and best wishes,</div>
<div>Jan-Mathijs</div>
<div><br class="">
</div>
<div>PS: I would recommend to update your fieldtrip version to a more recent one. At some point addressing questions inspired by behavior of 5-year old code might not be worth our while.</div>
<div><br class="">
</div>
<div><br class="">
</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 26 Feb 2024, at 21:17, Michael Houston via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" class="">fieldtrip@science.ru.nl</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Hello,
<div class=""><br class="">
</div>
<div class="">I ran the ft_readatlas function on a surface based atlas as follows for later parcellation:</div>
<div class=""><br class="">
</div>
<div class="">atlas_left = ft_read_atlas({'lh.aparc.DKTatlas.annot','lh.white'}, 'format', 'freesurfer_aparc');<br class="">
atlas_right = ft_read_atlas({'rh.aparc.DKTatlas.annot','rh.white'}, 'format', 'freesurfer_aparc');<br class="">
atlas_right.aparc = atlas_right.aparc + 36;<br class="">
<br class="">
atlas = atlas_left;<br class="">
atlas.pos = cat(1,atlas.pos,atlas_right.pos);<br class="">
atlas.tri = cat(1,atlas.tri,atlas_right.tri);<br class="">
atlas.aparc = cat(1,atlas.aparc,atlas_right.aparc);<br class="">
atlas.aparclabel = cat(1,atlas.aparclabel,atlas_right.aparclabel);<br class="">
atlas.rgba = cat(1,atlas.rgba,atlas_right.rgba);<br class="">
save('dkt_test','atlas')</div>
<div class=""><br class="">
</div>
<div class="">I combined both outputs together to visualize both parcellated hemispheres in the same plot, but what I end up with is a messy superimposition of both hemispheres within each other. What is the more appropriate way to go about merging both left/right
atlases together into one? I could not find a Fieldtrip function that does so (I am running the 2019 version).<br clear="all" class="">
<div class="">
<div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr" class="">
<div class=""><br class="">
</div>
Thanks,
<div class="">Michael</div>
<div class="">--</div>
<div class=""><a href="mailto:mjhouston2@uh.edu" target="_blank" class="">mjhouston2@uh.edu</a></div>
<div class=""><font color="#ff0000" class="">MSBE '20, University of Houston</font></div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Ca80379fd8041435ca42e08dc377504e9%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638446222941750902%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=I8nAYI9bdaEPitgcX%2BGlFT6hVlIu6DCvpBTofP7FVbA%3D&reserved=0" originalsrc="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" shash="COIrLhZsYTG5NIskYonop4vwhG0y9ExmzY5EF3HzSebTtjBY0n6TH5VuqpVIwX9K63b/KH4uLN6PLWqYqTvAosMHNe5L/vSWm2L/e7/wO8jo9xVopQBNf5N2NuwhB8LsbkHj+P6z5HDnKM90qolZCuPPhZiv31yiSFd99xCSPzM=" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
https://doi.org/10.1371/journal.pcbi.1002202<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>