<div dir="ltr">Hi Arjen, Jan-Mathijs, et. al.,<div><br></div><div>It seems the rotation was caused by a bug my side. The segmentation using SPM12 solved problems caused by low quality MRIS.</div><div>Thanks!</div><div>Stephen</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 22 September 2017 at 10:09, Stephen Whitmarsh <span dir="ltr"><<a href="mailto:stephen.whitmarsh@gmail.com" target="_blank">stephen.whitmarsh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Arjen,<div><br></div><div>Indeed, I do not think there is a problem with segmentation of brain/skull, as can be seen on the image. Stripping some skin of two subjects (thresholding the 'soft_tissue' probability output of SPM12, then removing it) with a similar problem of solved the rotation, but resulted in too small grids... On this subject I attached this procedure has no effect.</div><div><br></div><div>However, at least for those other subjects normalization on skullstripped, or rather, scalpstripped MRIs might do the trick. As I understand it, however, the spm8 procedure (and spm12 I think) is a two-stepped procedure, with (affine) transformation based on the scalp first, after which it optimizes it based on brain segmentation. I would not know how to therefor do normalization without scalp. In fact, it expects a full volumetric image, not a (pre-)segmented one.</div><div><br></div><div>Cheers,</div><div>Stephen</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 21 September 2017 at 18:45, Arjen Stolk <span dir="ltr"><<a href="mailto:a.stolk8@gmail.com" target="_blank">a.stolk8@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">First thought is a registration of brain outline to skull (instead of brain), although at closer inspection the shift seems overall just a bit too large for that. You could try calculating the normalization parameters on skullstripped volumes (unless you want to keep non-brain tissue).</div><div class="m_-3401491848187119960HOEnZb"><div class="m_-3401491848187119960h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 21, 2017 at 9:20 AM, Stephen Whitmarsh <span dir="ltr"><<a href="mailto:stephen.whitmarsh@gmail.com" target="_blank">stephen.whitmarsh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Arjen,<div><br></div><div>Thanks, and good to hear you've not been let down yet. It might be the fact that I have some bad quality MRIs to deal with. However... does this problem (see attached) ring a bell for anyone?:</div><div><br></div><div>Brain segmentation is proper, and co-registration with polhemus  head-shape as well, but inverse warp to MNI result in a tilted grid. Linear vs. non-linear transformation gives the same result. Other subjects going through the same procedure work fine, except two others wherein I identified it as a problem in segmenting the scalp and therefor the first step of the normalization. This one looks absolutely fine in every other regard, however.</div><div><br></div><div>I'm stumped...</div><div><br></div><div><div>    cfg                        = [];</div><div>    cfg.spmversion          = 'spm12';             </div><div>    cfg.grid.warpmni        = 'yes';</div><div>    cfg.grid.template       = template_grid;</div><div>    cfg.grid.nonlinear      = 'yes';</div><div>    cfg.mri                 = mri_realigned;</div><div>    cfg.grid.unit           = 'mm';</div><div>    subject_grid            = ft_prepare_sourcemodel(cfg);</div></div><div><br></div><div>Cheers,</div><div>Stephen</div><div><br></div></div><div class="m_-3401491848187119960m_-6991840200554205228HOEnZb"><div class="m_-3401491848187119960m_-6991840200554205228h5"><div class="gmail_extra"><br><div class="gmail_quote">On 21 September 2017 at 17:00, Arjen Stolk <span dir="ltr"><<a href="mailto:a.stolk8@gmail.com" target="_blank">a.stolk8@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div></div><div>Hey Stephen,</div><div><br></div><div>Look for discussions regarding spm12 and also dartel on bugzilla. It's been a while but as far as I can remember ft_volumenormalize is the only function now that has not been integrated. Reason being that it wasnt straightforward to house the dartel procedure under a single function, so this is ongoing work still. You can however use spm12's coregistration function with ft_volumerealign (for rigid body transformations), which Im using quite a bit and never let me down (and is much faster than before). But that wouldnt work for normalization to template space though (use spm8).</div><div><br></div><div>Best</div><div><div class="m_-3401491848187119960m_-6991840200554205228m_-8962977269442151219h5"><div><br>On Sep 21, 2017, at 6:56 AM, Herbert J Gould (hgould) <<a href="mailto:hgould@memphis.edu" target="_blank">hgould@memphis.edu</a>> wrote:<br><br></div><blockquote type="cite"><div>





<div>I have retired please remove me from the mail list </div>
<div><br>
</div>
<div>Herbert Jay Gould</div>
<div>Professor Emeritus</div>
<div>The University of Memphis</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div style="font-size:9px;color:#575757">Sent from my Verizon Wireless 4G LTE smartphone</div>
</div>
<br>
<br>
<div>-------- Original message --------</div>
<div>From: Stephen Whitmarsh </div>
<div>Date:09/21/2017 7:43 AM (GMT-06:00) </div>
<div>To: FieldTrip discussion list </div>
<div>Subject: Re: [FieldTrip] SPM12 for segmentation and (inverse) normalization </div>
<div><br>
</div>
<div>
<div dir="ltr">Dear Sarang and Jan-Mathijs,
<div><br>
</div>
<div>Thanks a lot. I am now able (after updating FT, which now includes SPM12 in /external), to use SPM12 for segmentation of my template and my subject MRI, by using cfg.spmversion = 'spm12'. 12 is definitely is a big improvement over 8 when it comes to brain-segmentation,
 which now does not require individual treatments anymore. It also outputs more compartments which gives me a little bit more to work with when dealing with scans that have bad delineation of the scalp for normalization.</div>
<div><br>
</div>
<div>Pleas note that defaults seems to differ - some FT functions default to spm8, others to spm12. </div>
<div><br>
</div>
<div>In fact, FT still reverts to spm8 in ft_volumenormalise when called in ft_prepare_sourcemodel, even when calling the latter with cfg.spmversion = 'spm12'. In other words the cfg.spmversion is not passed along.</div>
<div><br>
</div>
<div>Best wishes and thanks again!</div>
<div>Stephen</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 21 September 2017 at 09:09, Schoffelen, J.M. (Jan Mathijs)
<span dir="ltr"><<a href="mailto:jan.schoffelen@donders.ru.nl" target="_blank">jan.schoffelen@donders.ru.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Hi Stephen,
<div><br>
</div>
<div>Please note that FT now has full support for SPM12, both using the old-style segmentation, and the new one (the latter yielding 6 tissue types).</div>
<div><br>
</div>
<div>Best,</div>
<div>Jan-Mathijs</div>
<div><br>
<div>
<blockquote type="cite">
<div>
<div class="m_-3401491848187119960m_-6991840200554205228m_-8962977269442151219m_-4231212021672405905h5">
<div>On 20 Sep 2017, at 17:03, Stephen Whitmarsh <<a href="mailto:stephen.whitmarsh@gmail.com" target="_blank">stephen.whitmarsh@gmail.com</a>> wrote:</div>
<br class="m_-3401491848187119960m_-6991840200554205228m_-8962977269442151219m_-4231212021672405905m_-8996364354202601774Apple-interchange-newline">
</div>
</div>
<div>
<div>
<div class="m_-3401491848187119960m_-6991840200554205228m_-8962977269442151219m_-4231212021672405905h5">
<div dir="ltr"><span style="font-size:12.8px">Dear all,</span>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">I having some problems in normalizing MRIs for my study. Some have improper segmentation for which changing individual brain/scalp thresholds works in many cases but not all, e.g. when the scalp 'bleeds' into some noise outside
 of the head. Also, changing parameters in spm8 for normalization, such as number of iterations (directly in in spm_normalize, since FT does not pass these parameters) <span style="font-size:12.8px">improves the transformation.</span></div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">However, some scans I cannot deal with, either because they have noise from outsides of the head 'bleed' onto the scalp, thereby preventing optimal scalp-segmentation and thereby normalization. Others have an inappropriate contrast
 MRI sequence.</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">Some fMRI researchers advised me to use SPM12, because of its improved preprocessing procedures. However, it does not seem supported in FT yet. Does anyone have experience with this, and can perhaps share how they extracted the
 transformation matrix from the resulting nifti's? </div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">Thanks,</div>
<div style="font-size:12.8px">Stephen</div>
</div>
</div>
</div>
<span>______________________________<wbr>_________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">https://mailman.science.ru.nl/<wbr>mailman/listinfo/fieldtrip</a></span></div>
</blockquote>
</div>
<br>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/<wbr>mailman/listinfo/fieldtrip</a><br>
</blockquote>
</div>
<br>
</div>
</div>


</div></blockquote><blockquote type="cite"><div><span>______________________________<wbr>_________________</span><br><span>fieldtrip mailing list</span><br><span><a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a></span><br><span><a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">https://mailman.science.ru.nl/<wbr>mailman/listinfo/fieldtrip</a></span></div></blockquote></div></div></div><br>______________________________<wbr>_________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/<wbr>mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/<wbr>mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/<wbr>mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>