<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Dear Abraham,
<div class=""><br class="">
</div>
<div class="">I forward your questions to the discussion list, which is the place where to ask this type of questions.</div>
<div class="">Not only can you tap into the knowledge of many more people who might have hands on experience, also potentially many more people can learn from the discussion.</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">Jan-Mathijs Schoffelen</div>
<div class=""><br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">Begin forwarded message:</div>
<br class="Apple-interchange-newline">
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class="">
<span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">From:
</b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">"Dada, Abraham" <<a href="mailto:Abraham.Dada@ucsf.edu" class="">Abraham.Dada@ucsf.edu</a>><br class="">
</span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class="">
<span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">Subject:
</b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class=""><b class="">Re: Electrode visualization in FieldTrip</b><br class="">
</span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class="">
<span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">Date:
</b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">12 December 2023 at 02:54:24 CET<br class="">
</span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class="">
<span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">To:
</b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">"<a href="mailto:janmathijs.schoffelen@donders.ru.nl" class="">janmathijs.schoffelen@donders.ru.nl</a>" <<a href="mailto:janmathijs.schoffelen@donders.ru.nl" class="">janmathijs.schoffelen@donders.ru.nl</a>><br class="">
</span></div>
<div class="">
<div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<div class="elementToProof"><span style="letter-spacing: normal; font-size: 15px; font-weight: 400; color: rgb(36, 36, 36);" class="">Hello Professor<span class="Apple-converted-space"> </span></span><span style="letter-spacing: normal; font-size: 16px; font-weight: 400; color: rgb(33, 37, 41); background-color: rgb(255, 255, 255);" class="">Schoffelen</span><span style="letter-spacing: normal; font-size: 15px; font-weight: 400; color: rgb(36, 36, 36);" class="">,</span></div>
<div class="elementToProof"><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;" class="">My apologies for underspecifying the issue. I'm intending on using ft_sourceplot and plotting the
overlay instead of power. I tried to just plot the MNI positions of subject UC129's electrodes onto the mni template brain, but it's not working as expected. I've pasted my code below as well as the visualizaiton output.</span></div>
<div class="elementToProof"><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;" class=""><br class="">
</span></div>
<div style="padding: 30px;" class="">
<div style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px;" class="">
<span style="color: rgb(0, 128, 19);" class="">% Create dummy source data structure</span></div>
<div style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px;" class="">
<span style="" class="">sourceDiffIntNorm = struct;</span></div>
<div style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px;" class="">
<span style="color: rgb(0, 128, 19);" class="">% first set sourceDiffIntNorm.pos = to electrode positions</span></div>
<div style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px;" class="">
<span style="" class="">sourceDiffIntNorm.pos = data.elec.elecpos;<span class="Apple-converted-space"> </span></span><span style="color: rgb(0, 128, 19);" class="">% Assign the grid of coordinates to pos get from electrodes of pt uc129 from tutorial</span></div>
<div style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px;" class="">
<span style="color: rgb(0, 128, 19);" class="">% Set all power to 14</span></div>
<div style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px;" class="">
<span style="" class="">sourceDiffIntNorm.pow = ones(size(sourceDiffIntNorm.pos, 1), 1) * 14;<span class="Apple-converted-space"> </span></span><span style="color: rgb(0, 128, 19);" class="">% Set all to 14 initially</span></div>
<div style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px;" class="">
<span style="color: rgb(0, 128, 19);" class=""><br class="">
</span></div>
<div style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px;" class="">
<span style="color: rgb(0, 128, 19);" class="">% FieldTrip configuration</span></div>
<div style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px;" class="">
<span style="" class="">cfg = [];</span></div>
<div class="elementToProof" style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px;">
<span style="" class="">cfg.method =<span class="Apple-converted-space"> </span></span><span style="color: rgb(167, 9, 245);" class="">'surface'</span><span style="" class="">;</span></div>
<div class="elementToProof" style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px;">
<span style="" class="">cfg.projmethod =<span class="Apple-converted-space"> </span></span><span style="color: rgb(167, 9, 245);" class="">'sphere_weighteddistance'</span><span style="" class="">;</span></div>
<div class="elementToProof" style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px;">
<span style="" class="">cfg.sphereradius = 10;</span></div>
<div style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px;" class="">
<span style="" class="">cfg.funparameter =<span class="Apple-converted-space"> </span></span><span style="color: rgb(167, 9, 245);" class="">'pow'</span><span style="" class="">;</span></div>
<div style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px;" class="">
<span style="" class="">cfg.maskparameter = cfg.funparameter;</span></div>
<div class="elementToProof" style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px;">
<span style="" class="">cfg.funcolorlim = [0.0 14.0];<span class="Apple-converted-space"> </span></span><span style="color: rgb(0, 128, 19);" class="">% Adjusted to match the range of power values</span></div>
<div style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px;" class="">
<span style="" class="">cfg.funcolormap =<span class="Apple-converted-space"> </span></span><span style="color: rgb(167, 9, 245);" class="">'jet'</span><span style="" class="">;</span></div>
<div class="elementToProof" style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px;">
<span style="" class="">cfg.opacitylim = [0.0 14.0];<span class="Apple-converted-space"> </span></span><span style="color: rgb(0, 128, 19);" class="">% Adjusted to match the range of power values</span></div>
<div style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px;" class="">
<span style="" class="">cfg.opacitymap =<span class="Apple-converted-space"> </span></span><span style="color: rgb(167, 9, 245);" class="">'rampup'</span><span style="" class="">;</span></div>
<div style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px;" class="">
<span style="" class="">cfg.surffile =<span class="Apple-converted-space"> </span></span><span style="color: rgb(167, 9, 245);" class="">'surface_pial_both.mat'</span><span style="" class="">;<span class="Apple-converted-space"> </span></span><span style="color: rgb(0, 128, 19);" class="">%
Cortical sheet from canonical MNI brain</span></div>
<div style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px;" class="">
<span style="color: rgb(0, 128, 19);" class="">% Set datatype to 'source'</span></div>
<div style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px;" class="">
<span style="" class="">sourceDiffIntNorm = ft_datatype_source(sourceDiffIntNorm);</span></div>
<div style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px;" class="">
<span style="color: rgb(0, 128, 19);" class="">% Plot the dummy source data</span></div>
<div style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px;" class="">
<span style="" class="">ft_sourceplot(cfg, sourceDiffIntNorm);</span></div>
</div>
<div class="elementToProof"><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;" class="">The function is only plotting one hemisphere despite there being electrodes in both hemisphere.
Can you advise?</span></div>
<div class="elementToProof"><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;" class=""><br class="">
</span></div>
<div class="elementToProof"><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;" class="">Best,</span></div>
<div class="elementToProof"><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;" class="">Abraham</span></div>
<div class=""><span style="font-size: 14.4px; color: rgb(29, 33, 37); background-color: rgb(255, 255, 255);" class="">Abraham Dada</span></div>
<div id="Signature" class=""><span style="font-size: 14.4px; color: rgb(29, 33, 37); background-color: rgb(255, 255, 255);" class="">M.D. Candidate UCSF | 2026</span><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;" class=""><br class="">
</span><span style="font-size: 14.4px; color: rgb(29, 33, 37); background-color: rgb(255, 255, 255);" class="">B.A. Harvard College | 2021</span><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;" class=""><br class="">
</span><span style="font-size: 14.4px; color: rgb(29, 33, 37); background-color: rgb(255, 255, 255);" class="">Pronouns: he/him/his<br class="">
</span>
<div class=""><span style="font-size: 14.4px; color: rgb(29, 33, 37); background-color: rgb(255, 255, 255);" class="">xxx-xxx-xxxx</span></div>
<div class=""><span style="font-size: 14.4px; color: rgb(29, 33, 37);" class=""><br class="">
</span></div>
<div style="margin: 0px; background-color: white;" class="">
<div style="margin-top: 0px; margin-bottom: 0px; text-align: left; font-family: Calibri, sans-serif; font-size: 12pt;" class="">
<span style="font-size: 11pt; color: rgb(36, 36, 36);" class=""><b class="">University of California, San Francisco</b></span></div>
<div style="margin-top: 0px; margin-bottom: 0px; text-align: left; font-family: Calibri, sans-serif; font-size: 12pt;" class="">
<span style="font-size: 11pt; color: rgb(36, 36, 36);" class=""><b class=""><br class="">
</b></span></div>
</div>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 15px; color: rgb(36, 36, 36); background-color: white;" class=""><img data-outlook-trace="F:4|T:4" style="min-width: auto; min-height: auto; margin: 0px;" class="" apple-inline="yes" id="4EC9AEE7-BCDE-49A0-A6E9-9F222A6F11B4" src="cid:ba39579f-3b9f-42ac-b58e-f9cff80cd752"></span><span style="font-size: 14.4px; color: rgb(29, 33, 37); background-color: rgb(255, 255, 255);" class=""><br class="">
</span></div>
<div id="appendonsend" class=""></div>
<hr style="display: inline-block; width: 853.578125px;" class="">
<div id="divRplyFwdMsg" dir="ltr" class=""><span style="font-family: Calibri, sans-serif; font-size: 11pt;" class=""><b class="">From:</b> Dada, Abraham <<a href="mailto:Abraham.Dada@ucsf.edu" class="">Abraham.Dada@ucsf.edu</a>><br class="">
<b class="">Sent:</b> Saturday, December 9, 2023 10:42 AM<br class="">
<b class="">To:</b> <a href="mailto:janmathijs.schoffelen@donders.ru.nl" class="">janmathijs.schoffelen@donders.ru.nl</a><span class="Apple-converted-space"> </span><<a href="mailto:janmathijs.schoffelen@donders.ru.nl" class="">janmathijs.schoffelen@donders.ru.nl</a>><br class="">
<b class="">Subject:</b> Electrode visualization in FieldTrip</span>
<div class=""> </div>
</div>
<div style="direction: ltr;" class=""><span style="letter-spacing: normal; font-size: 15px; font-weight: 400; color: rgb(36, 36, 36);" class="">Hello Professor<span class="Apple-converted-space"> </span></span><span style="letter-spacing: normal; font-size: 16px; font-weight: 400; color: rgb(33, 37, 41); background-color: rgb(255, 255, 255);" class="">Schoffelen</span><span style="letter-spacing: normal; font-size: 15px; font-weight: 400; color: rgb(36, 36, 36);" class="">,</span></div>
<div style="direction: ltr;" class=""><span style="letter-spacing: normal; font-size: 15px; font-weight: 400; color: rgb(36, 36, 36);" class=""><br class="">
</span></div>
<div style="direction: ltr;" class=""><span style="letter-spacing: normal; font-size: 15px; font-weight: 400; color: rgb(36, 36, 36);" class="">I hope this email finds you well. I'm looking to use your toolbox to generate images for my project like the example
attached. I attempted to join the support email list, but was not able to get validated.</span></div>
<div style="direction: ltr; text-align: left; margin: 0px; background-color: rgb(255, 255, 255);" class="">
<span style="letter-spacing: normal; font-size: 15px; font-weight: 400; color: rgb(36, 36, 36);" class=""><br class="">
</span></div>
<div style="direction: ltr; text-align: left; margin: 0px; background-color: rgb(255, 255, 255);" class="">
<span style="letter-spacing: normal; font-size: 15px; font-weight: 400; color: rgb(36, 36, 36);" class="">I'm new to fieldtrip but want to make a simple image showing the cortical coverage of electrodes in my cohort. </span></div>
<div style="direction: ltr; text-align: left; margin: 0px; background-color: rgb(255, 255, 255);" class="">
<span style="letter-spacing: normal; font-size: 15px; font-weight: 400; color: rgb(36, 36, 36);" class=""><br class="">
</span></div>
<div style="direction: ltr; text-align: left; margin: 0px; background-color: rgb(255, 255, 255);" class="">
<span style="letter-spacing: normal; font-size: 15px; font-weight: 400; color: rgb(36, 36, 36);" class="">I already have all the electrode coordinates localized to MNI for my patients. I want to create a polygon for each patient spanning their electrodes like
the image below and project it into the cortical surface. Is this possible to do in FiledTrip?</span></div>
<div style="direction: ltr; text-align: left; margin: 0px; background-color: rgb(255, 255, 255);" class="">
<span style="letter-spacing: normal; font-size: 15px; font-weight: 400; color: rgb(36, 36, 36);" class=""><br class="">
</span></div>
<div style="direction: ltr; text-align: left; margin: 0px; background-color: rgb(255, 255, 255);" class="">
<span style="letter-spacing: normal; font-size: 15px; font-weight: 400; color: rgb(36, 36, 36);" class=""><br class="">
</span></div>
<div style="direction: ltr; text-align: left; margin: 0px; background-color: rgb(255, 255, 255);" class="">
<span style="letter-spacing: normal; font-size: 15px; font-weight: 400; color: rgb(36, 36, 36);" class=""><img alt="Image.jpeg" id="x_x_id-EE394171-AE43-4F89-BC6E-04242ED50A38" data-outlook-trace="F:2|T:2" style="max-width: 608px; min-width: auto; min-height: auto; margin: 0px;" class="" apple-inline="yes" src="cid:742f2e0f-966d-4218-97ff-863945ade7f2"></span></div>
<div style="direction: ltr; text-align: left; margin: 0px; background-color: rgb(255, 255, 255);" class="">
<span style="letter-spacing: normal; font-size: 15px; font-weight: 400; color: rgb(36, 36, 36);" class="">Best</span></div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;" class="">
<br class="">
</div>
<div id="x_Signature" class="">
<div class=""><span style="font-size: 14.4px; color: rgb(29, 33, 37); background-color: rgb(255, 255, 255);" class="">Abraham Dada</span></div>
<span style="font-size: 14.4px; color: rgb(29, 33, 37); background-color: rgb(255, 255, 255);" class="">M.D. Candidate UCSF | 2026</span><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;" class=""><br class="">
</span><span style="font-size: 14.4px; color: rgb(29, 33, 37); background-color: rgb(255, 255, 255);" class="">B.A. Harvard College | 2021</span><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;" class=""><br class="">
</span><span style="font-size: 14.4px; color: rgb(29, 33, 37); background-color: rgb(255, 255, 255);" class="">Pronouns: he/him/his<br class="">
</span>
<div class=""><span style="font-size: 14.4px; color: rgb(29, 33, 37); background-color: rgb(255, 255, 255);" class="">xxx-xxxxxxxx</span></div>
<div class=""><span style="font-size: 14.4px; color: rgb(29, 33, 37);" class=""><br class="">
</span></div>
<div style="margin: 0px; background-color: white;" class="">
<div style="margin-top: 0px; margin-bottom: 0px; text-align: left; font-family: Calibri, sans-serif; font-size: 12pt;" class="">
<span style="font-size: 11pt; color: rgb(36, 36, 36);" class=""><b class="">University of California, San Francisco</b></span></div>
<div style="margin-top: 0px; margin-bottom: 0px; text-align: left; font-family: Calibri, sans-serif; font-size: 12pt;" class="">
<span style="font-size: 11pt; color: rgb(36, 36, 36);" class=""><b class=""><br class="">
</b></span></div>
</div>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 15px; color: rgb(36, 36, 36); background-color: white;" class=""><img data-outlook-trace="F:5|T:5" style="min-width: auto; min-height: auto; margin: 0px;" class="" apple-inline="yes" id="55A64E88-50AE-42FD-9DCC-3B842F5A25BA" src="cid:b4e8b878-0ef0-4345-947e-2dde840775a6"></span><span style="font-size: 14.4px; color: rgb(29, 33, 37); background-color: rgb(255, 255, 255);" class=""><br class="">
</span></div>
</div>
<img style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="" apple-inline="yes" id="83FC1C74-500C-4351-A173-D0F9D257D48A" width="458" height="364" src="cid:0D89F4B0-7636-4CF9-9F07-192F224DFD6E"><img style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="" apple-inline="yes" id="D6D584B1-2131-49E0-8069-7650E9A16DAA" width="535" height="413" src="cid:84FC4C6B-1CD5-4719-A530-6EC2B92E1EB6"></div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>