<div dir="ltr">Dear Jing,<div><br></div><div style>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:</div><div style><br></div><div style><pre class="" style="padding:0.5em;margin-top:0px;font-size:12px;border:1px dashed rgb(204,204,204);color:rgb(0,0,0);overflow:hidden;font-family:Consolas,'Andale Mono',Menlo,Monaco,monospace;background-color:rgb(247,249,250);white-space:pre-wrap;width:640px;text-align:justify">
<span class="" style="padding:0px;margin:0px;color:rgb(128,128,128);font-style:italic">% read the DICOM files </span>
mri = ft_read_mri<span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">(</span><span class="" style="padding:0px;margin:0px;color:rgb(128,128,128);font-style:italic">'single_file_of_DICOM_series.IMA'</span><span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">)</span>;
<span class="" style="padding:0px;margin:0px;color:rgb(128,128,128);font-style:italic">% or use a graphical file selection</span>
<span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">[</span>f, p<span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">]</span> = <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/uigetfile.html" title="" style="padding:0px;margin:0px;color:rgb(0,136,204);text-decoration:none"><span class="" style="padding:0px;margin:0px;color:rgb(0,0,0);font-weight:bold">uigetfile</span></a><span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">(</span><span class="" style="padding:0px;margin:0px;color:rgb(128,128,128);font-style:italic">'*'</span><span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">)</span>;
mri = ft_read_mri<span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">(</span><a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/fullfile.html" title="" style="padding:0px;margin:0px;color:rgb(0,136,204);text-decoration:none"><span class="" style="padding:0px;margin:0px;color:rgb(0,0,0);font-weight:bold">fullfile</span></a><span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">(</span>p, f<span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">)</span><span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">)</span>;
</pre></div><div class="gmail_extra">I copied the above from documentation on the FieldTrip wiki: <a href="http://fieldtrip.fcdonders.nl/faq/how_can_i_convert_an_anatomical_mri_from_dicom_into_ctf_format">http://fieldtrip.fcdonders.nl/faq/how_can_i_convert_an_anatomical_mri_from_dicom_into_ctf_format</a></div>
<div class="gmail_extra"><br></div><div class="gmail_extra" style>Then you can save the 'mri' into a *.mat file for future use with FieldTrip.</div><div class="gmail_extra"><br></div><div class="gmail_extra" style>
Best regards,</div><div class="gmail_extra" style>Johanna</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/5/22 WangJing <span dir="ltr"><<a href="mailto:13681530640@139.com" target="_blank">13681530640@139.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="font-size:13px;font-family:宋体">
<div style="font-size:13px;font-family:宋体">Hi</div>
<div style="font-size:13px;font-family:宋体">I am a freshman about field trip.</div>
<div style="font-size:13px;font-family:宋体">I am trying to build the <a name="13eca0b69aadcf1b_the_forward_model_and_lead_field_matrix">forward model. but my mri data </a>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",<a href="http://eeg.pl/epi" target="_blank">http://eeg.pl/epi</a>. 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.</div>
<div style="font-size:13px;font-family:宋体">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</div>
<div style="font-size:13px;font-family:宋体"></div>
<div style="font-size:13px;font-family:宋体">Thanks very much!</div>
<div style="font-size:13px;font-family:宋体">Best Reagards</div>
<div style="font-size:13px;font-family:宋体">Jing Wang</div><br></div>
<div style="clear:both"><br></div>
<div><br><br></div>
<div></div><br style="clear:both">
<hr>
<div>----The following is the content of the forwarded email----<br>From:fieldtrip-request<<a href="mailto:fieldtrip-request@science.ru.nl" target="_blank">fieldtrip-request@science.ru.nl</a>><br>To:fieldtrip<<a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a>><br>
Date:<a href="tel:2013-05-21%C2%A023" value="+12013052123" target="_blank">2013-05-21 23</a>:59:18<br>Subject:fieldtrip Digest, Vol 30, Issue 29<br><br>Send fieldtrip mailing list submissions to<br><a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a><br>
<br>To subscribe or unsubscribe via the World Wide Web, visit<br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:fieldtrip-request@science.ru.nl" target="_blank">fieldtrip-request@science.ru.nl</a><br><br>You can reach the person managing the list at<br><a href="mailto:fieldtrip-owner@science.ru.nl" target="_blank">fieldtrip-owner@science.ru.nl</a><br>
<br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of fieldtrip digest..."<br><br><br>Today's Topics:<br><br> 1. Re: problem in connectivityanalysis (Gabriel Gonzalez Escamilla)<br>
<br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Tue, 21 May 2013 17:52:21 +0200<br>From: Gabriel Gonzalez Escamilla <<a href="mailto:ggonesc@upo.es" target="_blank">ggonesc@upo.es</a>><br>
To: FieldTrip discussion list <<a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a>><br>Subject: Re: [FieldTrip] problem in connectivityanalysis<br>Message-ID: <<a href="mailto:1348f6433edc26f9.519bb455@upo.es" target="_blank">1348f6433edc26f9.519bb455@upo.es</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br><br>Thank you so much for your answer J?rn,<br><br>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.<br>
<br>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.<br>
<br><br>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: <br>data.dimord = 'rpt_rpt_chan_chan_freq'<br>
ans size(data.crsspctrm) = [1 7 59 59]; <br>So, both are apparently the same, but the data inside this matrices is different,<br><br>for example, when calculating the ImC the first 7 columns for the first two rows are: <br>
val(:,:,1,1)<br>?[0.9323? 0.3679? 0.8629? 1.6436? 0.6404? 1.8782? 0.1139] <br>val(:,:,1,2)<br>?[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]<br><br>while when calculating the PLV are:<br>
val(:,:,1,1)<br>?[1? 1? 1? 1? 1? 1? 1] <br>val(:,:,1,2)<br>?[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]<br><br><br>I'm pretty sure I'm doing something wrong here, but I don't really have a clue, <br>
<br>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.<br>
<br><br><br><br>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?<br>
<br><br>Many thanks in advanced,<br>Gabriel.<br><br><br><br><br>----- Mensaje original -----<br>De: "J?rn M. Horschig" <<a href="mailto:jm.horschig@donders.ru.nl" target="_blank">jm.horschig@donders.ru.nl</a>><br>
Fecha: Martes, 21 de Mayo de 2013, 9:03 am<br>Asunto: Re: [FieldTrip] problem in connectivityanalysis<br>A: FieldTrip discussion list <<a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a>><br>
<br><br> <br><br> <br>> Dear Gabriel,<br> > <br> > 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?<br>
> <br>> 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.<br>
> <br> > 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:<br>
> <br>> 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? :)<br>
> 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'. <br>
> <br>> I hope that somehow clarifies your questions.<br> > <br>> Best,<br>> J?rn<br> > <br>> On 5/17/2013 5:45 PM, Gabriel Gonzalez Escamilla wrote:<br>
> Dear Fieltrip experts,<br> > <br>> 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:<br>
> data.trials {1xNepochs}; % Nepochs = 7, each epoch with 59 channels and 2000 samples<br>> data.label {59x1};<br>> data.time {1xNepochs};<br> > <br>> then, calculate only the FFT of all sensors as:<br>
> cfg=[];<br>> cfg.output='fourier';<br>> cfg.method='mtmfft';<br>> cfg.taper='hanning';<br>> cfg.foilim=[8.5 9.5];<br>> cfg.tapsmofrq=0;<br>
> cfg.trials='all';<br>> cfg.keeptrials='yes';<br>> cfg.channel='all';<br>> fourier=ft_freqanalysis(cfg, data)<br>> as output I get:<br>
> dimord = 'rpttap_chan_freq'<br>
> freq= [1x9]<br>> fourierspctrm=[7x59x9 double]<br> > <br>> Then compute the imaginary part of coherency as:<br> > cfg=[];<br> > cfg.method ='cohe';<br>
> cfg.complex='imag';<br> > cfg.channelcbm={'all' 'all'};<br> > coher = ft_connectivityanalysis (cfg, fourier)<br> > as output get: <br>
> dimord='chan_chan_freq';<br> > cohspctrm=[59x59x9 double];<br> > dof=7;<br> > <br> > I have two main questions:<br> > <br> > 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?<br>
> <br> > <br> > <br> > 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?<br>
> <br> > <br> > <br> > <br>> Many thanks in advanced,<br> > Gabriel.<br> > <br> > <br>
> <br> > _______________________________________________ > fieldtrip mailing list > <a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a> <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a> <br>
> <br> > -- > 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: <a href="mailto:jm.horschig@donders.ru.nl" target="_blank">jm.horschig@donders.ru.nl</a> > Tel: <a href="tel:%2B31-%280%2924-36-68493" value="+31243668493" target="_blank">+31-(0)24-36-68493</a> > Web: <a href="http://www.ru.nl/donders" target="_blank">http://www.ru.nl/donders</a> > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > _______________________________________________<br>
> fieldtrip mailing list<br>> <a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>> <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<br><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: <a href="mailto:ggonesc@upo.es" target="_blank">ggonesc@upo.es</a><br /><a href="http://www.upo.es/neuroaging/es/" target="_blank">http://www.upo.es/neuroaging/es/</a></font><br>
<br><br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <<a href="http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130521/0886ac06/attachment.html" target="_blank">http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130521/0886ac06/attachment.html</a>><br>
<br>------------------------------<br><br>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<br>End of fieldtrip Digest, Vol 30, Issue 29<br>*****************************************<br></div><br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div></div>