<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear Michael,<div><br></div><div>Thanks for reporting this; we'll look into it.</div><div><br></div><div>Best,</div><div><br></div><div>JM</div><div><br><div><div>On Jun 2, 2011, at 1:18 PM, <a href="mailto:michael.wibral@web.de">michael.wibral@web.de</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div bgcolor="#FFFFFF" style="font-size:12px;background-color:#FFFFFF;font-family:Verdana, Arial, sans-serif;">Dear FT'ers,<br><br>Davide Rivolta posted a problem with ft_volumesegment a while ago. We have meanwhile solved this problem.<br><br>There is (FT from may 31st) a problem with the handling of the<br><span><br>cfg.smooth<br><br>option.<br><br>It's default is 'no', according to the function HELP.<br>However</span> in line 434 of ft_volumesegment, this option is put into a numerical array - this makes sense for a smoothing value. Also if no specification is given at all, then a NaN is inserted into the array. However if "no" is set explicitely then ft_getopt tries to insert the string 'no' into the array which leads to an error. Below is a script that is running and the error is once again detailed in the commets.<br>In my opinion this could be fixed by simply updating te function HELP.<br><br>Michael<br><span style="font-size: 10pt; font-family: "Courier New";"> </span><br><blockquote style="border-left: 2px solid blue; margin-left: 5px; padding-left: 5px; padding-top: 5px;"><div><div class="WordSection1"><p class="MsoNormal"><span>%%Brain segmentation – MRI</span></p><div><span> </span><br class="webkit-block-placeholder"></div><p class="MsoNormal"><span>mri = ft_read_mri('NPD18_V2.mri');</span></p><p class="MsoNormal"><span>cfg = [];</span></p><p class="MsoNormal"><span>cfg.spmversion = 'spm8';</span></p><p class="MsoNormal"><span>cfg.output = 'tpm'; </span></p><p class="MsoNormal"><span>cfg.template = 'T1.nii';</span></p><p class="MsoNormal"><span>cfg.units = 'mm';</span></p><p class="MsoNormal"><span>cfg.write = 'no';</span></p><p class="MsoNormal"><span>cfg.coordsys = 'ctf';</span></p><p class="MsoNormal"><span>cfg.downsample = 2;</span></p><p class="MsoNormal"><span>cfg.smooth = NaN; % works. option 'no' as recommended (!) in the function HELP throws an</span></p><p class="MsoNormal"><span> % error because ft_getopt on line 434 of ft_volumesegment </span></p><p class="MsoNormal"><span> % tries to put a string of length two into an array that is for numbers</span></p><p class="MsoNormal"><span> % leaving out this option also worked, but some</span></p><p class="MsoNormal"><span> % people might try to use this option</span></p><p class="MsoNormal"><span>segmentedmri = ft_volumesegment(cfg, mri);</span></p><p class="MsoNormal"><span>save ('segmentedmri');</span></p></div></div></blockquote></div> _______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Dr. J.M. (Jan-Mathijs) Schoffelen </div><div>Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands</div><div><a href="mailto:J.Schoffelen@donders.ru.nl">J.Schoffelen@donders.ru.nl</a></div><div>Telephone: 0031-24-3614793</div></div></span></div></span> </div><br></div></body></html>