<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;}
@font-face
        {font-family:Aptos;
        panose-1:2 11 0 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Apple Color Emoji";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Lucida Sans Unicode";
        panose-1:2 11 6 2 3 5 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:12.0pt;
        font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
p.xmsonormal, li.xmsonormal, div.xmsonormal
        {mso-style-name:x_msonormal;
        margin:0cm;
        font-size:12.0pt;
        font-family:"Aptos",sans-serif;}
p.xelementtoproof, li.xelementtoproof, div.xelementtoproof
        {mso-style-name:x_elementtoproof;
        margin:0cm;
        font-size:12.0pt;
        font-family:"Aptos",sans-serif;}
span.EmailStyle24
        {mso-style-type:personal-reply;
        font-family:"Aptos",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:3.0cm 2.0cm 3.0cm 2.0cm;}
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="DA" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;mso-fareast-language:EN-US">Dear Benedetta<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;mso-fareast-language:EN-US">I see; if I understand correctly, SPM treats the data as a “volume”, with the first two dimensions being x and y coordinates and the 3<sup>rd</sup> dimension being time.
 To get this data into FieldTrip, you will probably need to specify it as a volume data structure (<a href="https://www.fieldtriptoolbox.org/faq/how_is_anatomical_functional_or_statistical_volume_data_described/">https://www.fieldtriptoolbox.org/faq/how_is_anatomical_functional_or_statistical_volume_data_described/</a>).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;mso-fareast-language:EN-US">Event though volumes in FieldTrip, in most instances, refer to MR data or source reconstructed EEG/MEG data, I think you can treat your t-maps as such for plotting.
 SPM kind of does this for statistics as it converts the EEG topographies over time into a volume with time as one side of the “volume”.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;mso-fareast-language:EN-US">For plotting purposes, you can then use the FieldTrip functions for source plots (<a href="https://www.fieldtriptoolbox.org/tutorial/plotting/#plotting-data-at-the-source-level">https://www.fieldtriptoolbox.org/tutorial/plotting/#plotting-data-at-the-source-level</a>).
 With the cfg.method = ‘slice’ for ft_sourceplot, you could probably create some topoplot-looking figures.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;mso-fareast-language:EN-US">Probably something like this could work:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;mso-fareast-language:EN-US"># Create your data<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;mso-fareast-language:EN-US">volume.tscore.  = % your t-score<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;mso-fareast-language:EN-US">volume.dim = [32, 32, 201].  % x, y, time<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">cfg = [];<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">cfg.method        = 'slice';<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">cfg.funparameter  = ’tscore’;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">ft_sourceplot(cfg, volume);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;mso-fareast-language:EN-US">You might need to play around a little with the cfg.funparameter and/or cfg.maskparameter to get it to work properly.</span><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:65.2pt"><span lang="EN-GB" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;mso-fareast-language:EN-US">Best regards<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;mso-fareast-language:EN-US">Mikkel<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div id="mail-editor-reference-message-container">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="color:black">Fra:
</span></b><span style="color:black">Cecconi Benedetta <Benedetta.Cecconi@uliege.be><br>
<b>Dato: </b>fredag, 15. marts 2024 kl. 11.47<br>
<b>Til: </b>mikkelcv@drcmr.dk <mikkelcv@drcmr.dk>, FieldTrip discussion list <fieldtrip@science.ru.nl><br>
<b>Emne: </b>Re: Using FieldTrip for Plotting SPM Statistical Maps<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Lucida Sans Unicode",sans-serif;color:black">Dear</span><span style="font-size:11.0pt;font-family:"Lucida Sans Unicode",sans-serif;color:black"> Mikkel,</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Lucida Sans Unicode",sans-serif;color:black">thanks a lot for your answer
</span><span style="font-size:11.0pt;font-family:"Apple Color Emoji";color:black">🙂</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Lucida Sans Unicode",sans-serif;color:black">I'm not sure I can implement the solution you proposed as my T_maps/contrast maps (3D Sensor maps over time) are 32x32x201 double where 32x32 is the
 n of pixels and 201 the n of samples (here's a col of a contrast map):</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Lucida Sans Unicode",sans-serif;color:black"><img border="0" width="435" height="342" style="width:4.5312in;height:3.5625in" id="image_0" src="cid:6c6b3150-aa61-4789-8ec2-22d006dba4c1"></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Lucida Sans Unicode",sans-serif;color:black">If I create a matrix Ch x time points, I do not know which values correspond to which channel (e.g., which channel a certain t-value belongs to)...</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Lucida Sans Unicode",sans-serif;color:black">I am probably missing something of what you explained, is there any chance you could clarify further?</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Lucida Sans Unicode",sans-serif;color:black">Thanks a lot in advance,</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Lucida Sans Unicode",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div id="Signature">
<p class="MsoNormal"><span style="font-family:"Lucida Sans Unicode",sans-serif;color:black">Benedetta </span><span style="font-family:"Arial",sans-serif;color:#222222"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Lucida Sans Unicode",sans-serif;color:black">-----</span><span style="font-family:"Arial",sans-serif;color:#222222"><br>
</span><span style="font-family:"Lucida Sans Unicode",sans-serif;color:black">Doctoral Candidate - FNRS ASP</span><span style="font-family:"Arial",sans-serif;color:#222222"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#222222"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Lucida Sans Unicode",sans-serif;color:black"><a href="https://www.coma.uliege.be/" target="_blank"><span style="color:black">Coma Science Group</span></a>   GIGA Consciousness</span><span style="font-family:"Arial",sans-serif;color:#222222"><br>
</span><span style="font-family:"Lucida Sans Unicode",sans-serif;color:black"><a href="http://www.chuliege.be/cerveau" target="_blank"><span style="color:black">Centre du Cerveau²</span></a>      CHU de Liège</span><span style="font-family:"Arial",sans-serif;color:#222222"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#222222"><br>
</span><span style="font-family:"Lucida Sans Unicode",sans-serif;color:black">University of Liège, Belgium </span><span style="font-family:"Arial",sans-serif;color:#222222"><br>
</span><span style="font-family:"Lucida Sans Unicode",sans-serif;color:black">11 Avenue de l'Hôpital, B34+2</span><span style="font-family:"Arial",sans-serif;color:#222222"><br>
</span><span style="font-family:"Lucida Sans Unicode",sans-serif;color:black">4000-Liège (Sart Tilman)</span><span style="font-family:"Arial",sans-serif;color:#222222"><br>
</span><span style="font-family:"Lucida Sans Unicode",sans-serif;color:black">Belgium</span><span style="font-family:"Arial",sans-serif;color:#222222"><o:p></o:p></span></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="0" width="100%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> mikkelcv@drcmr.dk <mikkelcv@drcmr.dk><br>
<b>Sent:</b> Friday, March 15, 2024 10:46 AM<br>
<b>To:</b> FieldTrip discussion list <fieldtrip@science.ru.nl><br>
<b>Cc:</b> Cecconi Benedetta <Benedetta.Cecconi@uliege.be><br>
<b>Subject:</b> SV: Using FieldTrip for Plotting SPM Statistical Maps</span> <o:p>
</o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="xmsonormal"><span lang="EN-GB" style="font-size:11.0pt">Dear Benedetta</span><o:p></o:p></p>
<p class="xmsonormal"><span lang="EN-GB" style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="xmsonormal"><span lang="EN-GB" style="font-size:11.0pt">Depending on what level you have your t-maps (sensor level, source level, or something else), you can manually create the FieldTrip data structure. All you need is to arrange your t-map as NxM
 matrix, a vector with the N channel names, and a vector with the M dimension, usually time or frequency. Finally, you specify the “dimord” according to one of the datatypes, e.g., “chan_time” if the data is channelled by time points. The details on what you
 need and what the data fields should be named are explained here: <a href="https://www.fieldtriptoolbox.org/development/datastructure/">
https://www.fieldtriptoolbox.org/development/datastructure/</a></span><o:p></o:p></p>
<p class="xmsonormal"><span lang="EN-GB" style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="xmsonormal"><span lang="EN-GB" style="font-size:11.0pt">For example, if you have a single t-value per channel location in a standard EEG cap, you would export the N channels x 1 “t-map” and the channel names. Once you have arranged it according to
 the FieldTrip naming conventions, you can use ft_checkdata to see if the structure is “valid” in FieldTrips view or if something is still missing.</span><o:p></o:p></p>
<p class="xmsonormal"><span lang="EN-GB" style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="xmsonormal"><span lang="EN-GB" style="font-size:11.0pt">Best regards</span><o:p></o:p></p>
<p class="xmsonormal"><span lang="EN-GB" style="font-size:11.0pt">Mikkel</span><o:p></o:p></p>
<p class="xmsonormal"><span lang="EN-GB" style="font-size:11.0pt"> </span><o:p></o:p></p>
<div id="x_mail-editor-reference-message-container">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="xmsonormal" style="margin-bottom:12.0pt"><b><span style="color:black">Fra:
</span></b><span style="color:black">fieldtrip <fieldtrip-bounces@science.ru.nl> på vegne af Cecconi Benedetta via fieldtrip <fieldtrip@science.ru.nl><br>
<b>Dato: </b>torsdag, 14. marts 2024 kl. 19.06<br>
<b>Til: </b>fieldtrip@science.ru.nl <fieldtrip@science.ru.nl><br>
<b>Cc: </b>Cecconi Benedetta <Benedetta.Cecconi@uliege.be><br>
<b>Emne: </b>[FieldTrip] Using FieldTrip for Plotting SPM Statistical Maps</span><o:p></o:p></p>
</div>
<p class="xelementtoproof"><span style="font-family:"Lucida Sans Unicode",sans-serif;color:black">Hello everyone
</span><span style="font-family:"Apple Color Emoji";color:black">🙂</span><o:p></o:p></p>
<p class="xelementtoproof"> <o:p></o:p></p>
<p class="xelementtoproof"><span style="font-family:"Lucida Sans Unicode",sans-serif;color:black">I have contrast and t-maps generated in SPM-EEG, and I've been finding it challenging to plot these in SPM while allowing for some customization (even basic ones
 like adjusting the scale or plotting multiple time points).</span><o:p></o:p></p>
<p class="xelementtoproof"> <o:p></o:p></p>
<p class="xelementtoproof"><span style="font-family:"Lucida Sans Unicode",sans-serif;color:black">Since there does not seem to be a simple solution to achieve this, I was considering using FieldTrip for plotting these statistical maps. I found the function
 spm2fieldtrip, but it only seems to handle the conversion of raw data. I was wondering if any of you have experience or insights on using FieldTrip for plotting SPM statistical maps directly, without the need to redo the entire analysis on FieldTrip. </span><o:p></o:p></p>
<p class="xelementtoproof"> <o:p></o:p></p>
<p class="xelementtoproof"><span style="font-family:"Lucida Sans Unicode",sans-serif;color:black">Any tips or guidance would be greatly appreciated..</span><o:p></o:p></p>
<p class="xelementtoproof"> <o:p></o:p></p>
<p class="xelementtoproof"><span style="font-family:"Lucida Sans Unicode",sans-serif;color:black">Thanks in advance for your help!
</span><span style="font-family:"Apple Color Emoji";color:black">🙂</span><o:p></o:p></p>
<p class="xelementtoproof"> <o:p></o:p></p>
<p><span style="font-family:"Lucida Sans Unicode",sans-serif;color:black">Best, </span>
<o:p></o:p></p>
<div>
<p class="xmsonormal"><span style="font-family:"Lucida Sans Unicode",sans-serif;color:black"> </span><o:p></o:p></p>
</div>
<p class="xmsonormal"><span style="font-family:"Lucida Sans Unicode",sans-serif;color:black">Benedetta </span><o:p></o:p></p>
<p class="xmsonormal"><span style="font-family:"Lucida Sans Unicode",sans-serif;color:black">-----</span><span style="font-family:"Arial",sans-serif;color:#222222"><br>
</span><span style="font-family:"Lucida Sans Unicode",sans-serif;color:black">Doctoral Candidate - FNRS ASP</span><o:p></o:p></p>
<p class="xmsonormal"><span style="font-family:"Arial",sans-serif;color:#222222"> </span><o:p></o:p></p>
<p class="xmsonormal"><span style="font-family:"Lucida Sans Unicode",sans-serif;color:black"><a href="https://www.coma.uliege.be/" target="_blank"><span style="color:black">Coma Science Group</span></a>   GIGA Consciousness</span><span style="font-family:"Arial",sans-serif;color:#222222"><br>
</span><span style="font-family:"Lucida Sans Unicode",sans-serif;color:black"><a href="http://www.chuliege.be/cerveau" target="_blank"><span style="color:black">Centre du Cerveau²</span></a>      CHU de Liège</span><o:p></o:p></p>
<p class="xmsonormal"><span style="font-family:"Arial",sans-serif;color:#222222"><br>
</span><span style="font-family:"Lucida Sans Unicode",sans-serif;color:black">University of Liège, Belgium </span><span style="font-family:"Arial",sans-serif;color:#222222"><br>
</span><span style="font-family:"Lucida Sans Unicode",sans-serif;color:black">11 Avenue de l'Hôpital, B34+2</span><span style="font-family:"Arial",sans-serif;color:#222222"><br>
</span><span style="font-family:"Lucida Sans Unicode",sans-serif;color:black">4000-Liège (Sart Tilman)</span><span style="font-family:"Arial",sans-serif;color:#222222"><br>
</span><span style="font-family:"Lucida Sans Unicode",sans-serif;color:black">Belgium</span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>