SPM8
Roemer van der Meij
r.vandermeij at DONDERS.RU.NL
Tue Jun 22 12:09:07 CEST 2010
Hi Andrea,
We are deeply honored by your betting choice! May good fortune come to
both of us!
Thanks for sharing your modifications. Right now most of my FieldTrip
time is going in writing the low-level functions for the spectral
estimation module (which eventually replace the current freqanalysis
implementation), but an obvious project for me after that is rewriting
the cluster-permutation code. It has evolved into its current from over
the past years, and our new low-level - high-level function structure
will clean it up and makes it easier to fix bugs. I hope I can find the
time to work on the bwlabeln functions, I will keep you updated.
I'll also add this e-mail to our bugzilla report on this, to keep track
of the possibilities.
Thanks again for sharing your suggestions, they are always welcome.
Best,
Roemer
On 6/21/2010 8:21 AM, Andrea Ostendorf wrote:
> Dear Roemer,
>
> Thanks a lot. I discussed this topic some months ago with Robert and he
> suggested that he/the Fieldtrip team could modify the code along the
> following lines (I copy this from his e-mail because I think he will not
> mind this)
> - - - - -
> I suggest to modify the low level code into two helper functions
> (findcluster_chanlevel and findcluster_sourcelevel), which both should check
> like this
>
>
> if hastoolbox('image', 1)
> % using image processing toolbox
> my_bwlabeln = @bwlabeln;
> elseif hastoolbox('spm8', 1)
> % using spm8 version
> my_bwlabeln = @spm8_bwlabeln;
> else
> error(...)
> end
> - - - -
>
> I have got SPM8 on my Matlab path and whenever I download a new Fieldtrip
> version, I have to edit clusterstat and findcluster because it is (or was)
> not sufficient to simply replace bwlabeln by spm_bwlabel. What I did is
> probably rather inelegant but I left it that way since it works:
>
> In findcluster:
> Before:
> % [labelmat(spatdimlev, :, :), num] = bwlabeln(reshape(onoff(spatdimlev, :,
> :), nfreq, ntime), 4);
> After:
> input_for_spm_bwlabel = reshape(onoff(spatdimlev, :, :), nfreq, ntime);
> input_for_spm_bwlabel = +input_for_spm_bwlabel; %convert from logical
> [labelmat(spatdimlev, :, :), num] = spm_bwlabel(input_for_spm_bwlabel , 6);
>
> In clusterstat:
> Before:
> %!!!posclusobs = bwlabeln(tmp, conndef(length(cfg.dim),'min'));
> After:
> [posclusobs,L] = spm_bwlabel(tmp, 6);
>
> Sorry for the late answer.
> By the way, I have got into trouble at work because we have a betting game
> going on and I predicted the Netherlands as the winner (not that I know
> anything about football but I chose the Netherlands because the Fieldtrip
> team is so nice)...
>
> All the best
> Andrea
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
>
--
Roemer van der Meij MSc
PhD student
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognition
P.O. Box 9104
6500 HE Nijmegen
The Netherlands
Tel: +31(0)24 3655932
E-mail: r.vandermeij at donders.ru.nl
----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
More information about the fieldtrip
mailing list