[FieldTrip] question About head model

Johanna Zumer johanna.zumer at donders.ru.nl
Wed May 22 09:30:17 CEST 2013


Dear Jing,

It is best to use the T1 MRI rather than the other scans.   To open a DICOM
format file, you can try one of these options:

% read the DICOM files
mri = ft_read_mri('single_file_of_DICOM_series.IMA');
 % or use a graphical file selection[f, p] = uigetfile
<http://www.mathworks.com/access/helpdesk/help/techdoc/ref/uigetfile.html>('*');
mri = ft_read_mri(fullfile
<http://www.mathworks.com/access/helpdesk/help/techdoc/ref/fullfile.html>(p,
f));


I copied the above from documentation on the FieldTrip wiki:
http://fieldtrip.fcdonders.nl/faq/how_can_i_convert_an_anatomical_mri_from_dicom_into_ctf_format

Then you can save the 'mri' into a *.mat file for future use with FieldTrip.

Best regards,
Johanna


2013/5/22 WangJing <13681530640 at 139.com>

> Hi
> I am a freshman about field trip.
> I am trying to build the forward model. but my mri data is different from
> the data in the tutorial. So I don't know how to bulid the head model. I
> use the date which is from the paper "Open Database of Epileptic EEG with
> MRI and Postoperational Assessment of Foci—a Real World Verification for
> the EEG Inverse Solutions",http://eeg.pl/epi. MRI recordings containing a
> T1, T2 or fluid attenuated inversion recovery (FLAIR) weighted brain scans
> with morphologic substrate of the epilepsy (mostly cortical dysplasias,
> dysplastic tumors etc.). In some cases there is also a scan with the
> gadolinium (GAD) contrast. The images were collected by Siemens Sonata 1.5T
> scanner. The data is stored in the Digital Imaging and Communications in
> Medicine (DICOM) format. The name of the scan’s folder indicates its
> weighting.The scans have the following resolutions: T1: 512 × 512 pixels,
> pixel spacing 0.4687 mm, slice thickness 1.2 mm, T2: 256 × 256 pixels,
> pixel spacing 0.9375 mm,slice thickness 2.5 mm.
> In the tutorial,the mri data stored in only one file, while the data which
> I used have many files, I don't know how to process. who can help me,Thanks1
>  Thanks very much!
> Best Reagards
> Jing Wang
>
>
>
>
>
> ------------------------------
> ----The following is the content of the forwarded email----
> From:fieldtrip-request<fieldtrip-request at science.ru.nl>
> To:fieldtrip<fieldtrip at science.ru.nl>
> Date:2013-05-21 23:59:18
> Subject:fieldtrip Digest, Vol 30, Issue 29
>
> Send fieldtrip mailing list submissions to
> fieldtrip at science.ru.nl
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> or, via email, send a message with subject or body 'help' to
> fieldtrip-request at science.ru.nl
>
> You can reach the person managing the list at
> fieldtrip-owner at science.ru.nl
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of fieldtrip digest..."
>
>
> Today's Topics:
>
>    1. Re: problem in connectivityanalysis (Gabriel Gonzalez Escamilla)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 21 May 2013 17:52:21 +0200
> From: Gabriel Gonzalez Escamilla <ggonesc at upo.es>
> To: FieldTrip discussion list <fieldtrip at science.ru.nl>
> Subject: Re: [FieldTrip] problem in connectivityanalysis
> Message-ID: <1348f6433edc26f9.519bb455 at upo.es>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Thank you so much for your answer J?rn,
>
>
> Now I got it, so, I will let the 'fourier' as input to ft_connectivityanalysis, because for some indices I will need the auto-spectrum, and if I fully undertood what you said, it will be the same, as they always take the phase information from the fourier transform. And fieltrip will automatically compute the csd if the input is the frequency data.
>
>
> Nevertheless, it give me some error when I tried to use the output from 'powandcsd' of freqanalysis, always gives me a matrix dimensions error, and when I use the output 'fourier' from connectivityanalysis, it computes almost all indices to ok, raging from? -1 to 1 (I'm saw that they are signed, so this is ok), the problem are the ImC ranging from -inf to inf, and the PLV values ranging from 0 to inf, but when I use the 'fourier' the values are. Which for me is really weird.
>
>
>
> I have checked internally, and even when I always use the 'fourier' as input, when it internally calculates cross-spectrum for the ImC and PLV, the data.crsspctrm is different, e.g:
> data.dimord = 'rpt_rpt_chan_chan_freq'
> ans size(data.crsspctrm) = [1 7 59 59];
>
> So, both are apparently the same, but the data inside this matrices is different,
>
>
> for example, when calculating the ImC the first 7 columns for the first two rows are:
> val(:,:,1,1)
> ?[0.9323? 0.3679? 0.8629? 1.6436? 0.6404? 1.8782? 0.1139]
> val(:,:,1,2)
>
> ?[0.8509-0.1555i? 0.2507-0.1066i? 0.8173-0.0290i? 1.4328-0.2427i? 0.5457-0.0500i? 1.6505-0.0161i? 0.0993+0.0016i]
>
> while when calculating the PLV are:
> val(:,:,1,1)
> ?[1? 1? 1? 1? 1? 1? 1]
> val(:,:,1,2)
>
> ?[0.9694-0.2133i? 0.7011-0.3564i? 0.9951-0.0104i? 0.9014-0.3481i? 0.9781-0.0819i? 0.9982-0.0046i? 0.9507-0.0483i]
>
>
>
> I'm pretty sure I'm doing something wrong here, but I don't really have a clue,
>
>
> If I use the fourier transform to calculate the 'csd' in ft_connectivity analysis and use this csd as input to all other ft_connectivityanalysis indices all of them are set to NaN or 1, not ranging between any numbers.
>
>
>
>
>
> On the other hand, I have seen searching on the net, that fieltrip is capable of create surrogate data, by shifting the phase information on every trial for only one electrode of each pair while using the original samples of each trials on the second channel, but I couldn't find on the manual how to do such a thing. Is there any way to compute this kind of surrogates for every sensor? or was it something that some one suggest to somebody?
>
>
> Many thanks in advanced,
> Gabriel.
>
>
>
>
> ----- Mensaje original -----
> De: "J?rn M. Horschig" <jm.horschig at donders.ru.nl>
> Fecha: Martes, 21 de Mayo de 2013, 9:03 am
> Asunto: Re: [FieldTrip] problem in connectivityanalysis
> A: FieldTrip discussion list <fieldtrip at science.ru.nl>
>
>
>
>
>
> > Dear Gabriel,
>        >
>
>        > A) As you             see, this makes an average over the epochs of each channel,             and not over the samples (which in this case are the 9             frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for                   each epoch (repetition) on all                   my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt,                 Is this possible?
>                         >
>
> >        No. You should think of coherence more as a measure for the       consistency of the phase relation between channels across trials,       so coherence is just not defined per trial,neither would it make       sense to compute coherence for a single trial.
>        >
>
>        > B)                     Another question I have is: for the Imaginary part                     of Coherence is not necessary to compute the                     cross-spectrum with 'powandcsd', only the FFT, but                     for the PLV, PPC or WPLI is that way too?       I see some terminology issues here. Let me try to explain in a       simple (aka least-mathematical I can think of) way:
>        >
>
> >        For all these connectivity measures, we need the phase information       from the Fourier transform (FFT) to compute the cross-spectral       density matrix (CSD). The CSD can be regarded as the equivalent in       the frequency domain to the covariance matrix in the time domain,       thus it is a measures how a certain channels activity is       co-modulated with another channels activity (for a particular       frequency) - makes pretty much sense to make use of this when       computing connectivity, right? :)
>
> >        As you might know, a Fourier transform returns complex numbers,       where the imaginary part of this number contains phase       information. When calling ft_freqanalysis, you can decide if it       shall only return the (squared) real part of the frequency       spectrum (cfg.output='pow'), or instead the full CSD (cfg.output =       'powandcsd'). Alternatively, you can also let ft_freqanalysis       return the raw Fourier coefficients (cfg.output='fourier'). From       the Fourier coefficients, however, you can easily obtain the CSD       or the power spectrum basically by multiplication the Fourier       matrix with itself (transposed). All of these measures quantify       the phase relation between channels across trials, and as phase       information is coded in the imaginary part of the fourier output,       thus for connectivityanalysis you need the CSD which can be       obtained either by 'powandcsd' or by 'fourier'.
>        >
> >        I hope that somehow clarifies your questions.
>        >
> >        Best,
> >        J?rn
>        >
> >        On 5/17/2013 5:45 PM, Gabriel Gonzalez Escamilla wrote:
>           > Dear Fieltrip experts,
>          >
>
> >          I have my continuous data imported to fieldtrip with matlab, I'm         looking for performing connectivity analysis between pairs of         sensors, I have succed as:
>
> >          data.trials {1xNepochs}; % Nepochs = 7,         each epoch with 59 channels and 2000 samples
> >          data.label {59x1};
> >          data.time {1xNepochs};
>          >
> >          then, calculate only the FFT of all sensors as:
> >          cfg=[];
> >          cfg.output='fourier';
> >          cfg.method='mtmfft';
> >          cfg.taper='hanning';
> >          cfg.foilim=[8.5 9.5];
> >          cfg.tapsmofrq=0;
> >          cfg.trials='all';
> >          cfg.keeptrials='yes';
> >          cfg.channel='all';
> >          fourier=ft_freqanalysis(cfg, data)
> >          as output I get:
> >          dimord = 'rpttap_chan_freq'
> >          freq= [1x9]
> >          fourierspctrm=[7x59x9 double]
>          >
> >          Then compute the imaginary part of coherency as:
>            > cfg=[];
>              > cfg.method ='cohe';
>              > cfg.complex='imag';
>                > cfg.channelcbm={'all'               'all'};
>              > coher = ft_connectivityanalysis (cfg, fourier)
>          > as output get:
>            > dimord='chan_chan_freq';
>              > cohspctrm=[59x59x9 double];
>              > dof=7;
>            >
>          > I have two main questions:
>          >
>
>          > A) As you see, this makes an average over the           epochs of each channel, and not over the samples (which in           this case are the 9 frequencies of the FFT), And I would like           to have the opposite, this is, to               get the imaginary                 part of coherence for each epoch (repetition)                 on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt,               Is this possible?
>                  >
>                  >
>                  >
>
>                  > B) Another question I have is: for the                   Imaginary part of Coherence is not necessary to                   compute the cross-spectrum with 'powandcsd', only the                   FFT, but for the PLV, PPC or WPLI is that way too?
>                  >
>                  >
>                  >
>                  >
> >                  Many thanks in advanced,
>                  > Gabriel.
>                  >
>                       >
>               >
>
>        > _______________________________________________ > fieldtrip mailing list >
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>      >
>
>      > --  > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour  > Centre for Cognitive Neuroimaging > Radboud University Nijmegen  > Neuronal Oscillations Group > FieldTrip Development Team >  > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands >  > Contact: > E-Mail:
> jm.horschig at donders.ru.nl > Tel:    +31-(0)24-36-68493 > Web:
> http://www.ru.nl/donders
>  >  > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands     > _______________________________________________
> > fieldtrip mailing list
> > fieldtrip at donders.ru.nl
> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
>
> <font size="3">--------------------------<br />PhD. student Gabriel Gonz?lez-Escamilla<br />Laboratory of Functional Neuroscience<br />Department of Physiology, Anatomy, and Cell Biology<br />University Pablo de Olavide<br />Ctra. de Utrera, Km.1<br />41013 - Seville<br />- Spain -<br /><br />Email:
> ggonesc at upo.es<br />http://www.upo.es/neuroaging/es/</font>
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130521/0886ac06/attachment.html
> >
>
> ------------------------------
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
> End of fieldtrip Digest, Vol 30, Issue 29
> *****************************************
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130522/190aa246/attachment-0001.html>


More information about the fieldtrip mailing list