<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Dear Susmita,<div class=""><br class=""></div><div class="">I used your code and could reproduce the same results. The step that goes wrong here is the segmentation step.</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;" class=""><div style="margin: 0px; line-height: normal;" class="">cfg           = [];</div><div style="margin: 0px; line-height: normal;" class="">cfg.output    = {<span style="color: #b245f3" class="">'brain'</span>,<span style="color: #b245f3" class="">'skull'</span>,<span style="color: #b245f3" class="">'scalp'</span>};</div><div style="margin: 0px; line-height: normal;" class="">segmentedmri  = ft_volumesegment(cfg, mri_aligned);</div><p style="margin: 0px; line-height: normal; min-height: 12px;" class=""> <br class="webkit-block-placeholder"></p><div style="margin: 0px; line-height: normal;" class="">seg_i = ft_datatype_segmentation(segmentedmri,<span style="color: #b245f3" class="">'segmentationstyle'</span>,<span style="color: #b245f3" class="">'indexed'</span>);</div><p style="margin: 0px; line-height: normal; min-height: 12px;" class=""> <br class="webkit-block-placeholder"></p><div style="margin: 0px; line-height: normal;" class="">cfg              = [];</div><div style="margin: 0px; line-height: normal;" class="">cfg.funparameter = <span style="color: #b245f3" class="">'seg'</span>;</div><div style="margin: 0px; line-height: normal;" class="">cfg.funcolormap  = lines(6); <span style="color: #25992d" class="">% distinct color per tissue</span></div><div style="margin: 0px; line-height: normal;" class="">cfg.location     = <span style="color: #b245f3" class="">'center'</span>;</div><div style="margin: 0px; line-height: normal; color: rgb(37, 153, 45);" class=""><span style="color: #000000" class="">cfg.atlas        = seg_i;    </span>% the segmentation can also be used as atlas </div><div style="margin: 0px; line-height: normal;" class="">ft_sourceplot(cfg, seg_i);</div><div class=""><br class=""></div></div></div><div class=""><br class=""></div><div class="">I segmented additionally to the scalp the brain and the skull tissues as well so that you can clearly see whats going on. </div><div class=""><br class=""></div><div class="">You should tweak the cfg for the ft_volumesegment to improve your pipeline.</div><div class=""><br class=""></div><div class="">Best regards,</div><div class=""><br class=""><div class="">
Simon Homölle<br class="">PhD Candidate<br class="">Donders Institute for Brain, Cognition and Behaviour<br class="">Centre for Cognitive Neuroimaging<br class="">Radboud University Nijmegen<br class="">Phone: +31-(0)24-36-65059
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On 30 Sep 2016, at 19:16, Susmita Sen <<a href="mailto:susmitasen.ece@gmail.com" class="">susmitasen.ece@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div dir="ltr" class=""><div class=""><div style="font-size:12.8px" class="">I am Susmita Sen, MS research scholar in the dept of Electronics and Electrical Communication Engineering, IIT Kharagpur. </div><div style="font-size:12.8px" class="">      I am currently working on MEG data recorded by yokogawa system. I want to perform source reconstruction on the data. However, I do not have the MRI data along with that. so, I have planned to use the standard MRI provided by fieldtrip (downloaded from <a href="https://github.com/fieldtrip/fieldtrip/blob/master/template/headmodel/standard_mri.mat" target="_blank" class="">https://github.com/fieldtrip/<wbr class="">fieldtrip/blob/master/<wbr class="">template/headmodel/standard_<wbr class="">mri.mat</a>).<br class=""></div><div style="font-size:12.8px" class=""><br class=""></div><div style="font-size:12.8px" class="">For preparing the head model I have followed the steps provided in the fieldtrip tutorial (<a href="http://www.fieldtriptoolbox.org/tutorial/headmodel_meg" target="_blank" class="">http://www.fieldtriptoolbox.<wbr class="">org/tutorial/headmodel_meg</a>). </div><div style="font-size:12.8px" class=""><br class=""></div><div style="font-size:12.8px" class=""><div class="">%% align the coordinate system</div><div class="">load('standard_mri.mat'); % load mri data</div><div class="">disp(mri)</div><div class=""><br class=""></div><div class="">cfg = [];</div><div class="">cfg.method = 'interactive';</div><div class="">cfg.coordsys = 'yokogawa';</div><div class="">cfg.snapshot     = 'yes';</div><div class="">[mri_aligned] = ft_volumerealign(cfg,mri);</div><div class=""><br class=""></div><div class="">%% SEGMENTATION</div><div class="">cfg           = [];</div><div class="">cfg.output    = 'brain';</div><div class="">segmentedmri  = ft_volumesegment(cfg, mri_aligned);</div><div class=""><br class=""></div><div class="">%% create headmodel</div><div class="">cfg = [];</div><div class="">cfg.method='singleshell';</div><div class="">vol = ft_prepare_headmodel(cfg, segmentedmri);</div><div class=""><br class=""></div><div class="">%% visualize </div><div class="">load grad % load gradiometer info</div><div class="">vol = ft_convert_units(vol,'cm');  % the gradiometer info is given in cm</div><div class=""><br class=""></div><div class="">figure;</div><div class="">ft_plot_sens(grad, 'style', '*b');</div><div class="">hold on</div><div class="">ft_plot_vol(vol);</div></div><div style="font-size:12.8px" class="">  </div><div style="font-size:12.8px" class="">while aligning the coordinate system I have chosen fiducial points (naison, LPA and RPA) using the instruction given by <a href="http://neuroimage.usc.edu/brainstorm/CoordinateSystems" target="_blank" class="">http://neuroimage.usc.edu/<wbr class="">brainstorm/CoordinateSystems</a>.</div><div style="font-size:12.8px" class=""><br class=""></div><div style="font-size:12.8px" class="">I am attaching the figures that display the shape of the 'vol' along with the position of the sensors (from different viewing angle). However, I doubt the headmodel is corrected prepared (It dosen't look alike the figure given in the tutorial). It seems I have made some mistakes, but I am not able to detect it. I would be very thankful if you can help me in this regard.  </div><div style="font-size:12.8px" class=""><br class=""></div></div><div class=""><br class=""></div><br clear="all" class=""><div class=""><div class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class="">Thanks and Regards,<div class="">Susmita Sen</div><div class="">Research Scholar</div><div class="">Audio and Bio Signal Processing Lab.</div><div class="">E & ECE Dept.</div><div class="">IIT Kharagpur</div></div></div></div></div></div>
</div>
<span id="cid:49803234-3A5E-4D90-AF72-875F6541C83A"><vol1.png></span><span id="cid:A59D8FBD-73FB-4AA5-857E-3B431C4E9A81"><vol2.png></span><span id="cid:14D0669E-26AE-4D49-9D06-BE9115A4B482"><vol3.png></span>_______________________________________________<br class="">fieldtrip mailing list<br class=""><a href="mailto:fieldtrip@donders.ru.nl" class="">fieldtrip@donders.ru.nl</a><br class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</div></blockquote></div><br class=""></div></body></html>