Hello,<br><br>I got a kind of big problem as follows. <br><br><b>I can easly normalize, interpolate and plot my LCMV-Beamformer results on an MRI and plot with that anatomy:</b><br><br>template = '/media/sonja1/MatlabAnalysis/<div>
Martin/WFU_PickAtlas/spm8/canonical/single_subj_T1.nii';<br>
<br>template_mri = ft_read_mri(template);<br><br>cfg = [];<br>% cfg.coordsys = 'spm';<br>cfg.method = 'fiducial'; %'interactive';<br>cfg.fiducial.nas = [45 106 17]; %position of nasion<br>cfg.fiducial.lpa = [88 49 11]; %position of LPA<br>
cfg.fiducial.rpa = [3 49 11]; %position of RPA<br>mri = ft_volumerealign(cfg, template_mri);<br><br>load(sourcesOutFile); <br><br>cfg = [];<br>cfg.downsample = 1;<br>cfg.parameter = {'avg.pow', 'avg.logpowDiff'}; <br>
<br>sourceDiffInt = ft_sourceinterpolate(cfg, sourceDiff , mri);<br><br><br>Works without any problem! And can be plotted afterwords kind of nicely on an anatomy.<br><br><b><br>Now what doesn't work:</b><br><br>%Load functional data<br>
load(['/media/sonja1/Patienten/Parkinson/grandAVG_SourceDiff_OHNEdysphagie__beta.mat']);<br><br>%avg.avg.pow to avg.pow<br>powtemp = grandavg.avg.avg.pow;<br>grandavg = rmfield(grandavg, 'avg');<br>grandavg.avg.pow = powtemp;<br>
<br>%Load template MRI<br>template = '/media/sonja1/MatlabAnalysis/Martin/WFU_PickAtlas/spm8/canonical/single_subj_T1.nii';<br>template_mri = ft_read_mri(template);<br><br>%Segment and Interpolate MRI<br>cfg = [];<br>
cfg.method = 'fiducial'; %'interactive';<br>cfg.fiducial.nas = [45 106 17]; %position of nasion<br>cfg.fiducial.lpa = [88 49 11]; %position of LPA<br>cfg.fiducial.rpa = [3 49 11]; %position of RPA<br>
mri_realign = ft_volumerealign(cfg, template_mri);<br>
<br>% match up volumetric source result matrix with anatomical volume <br>cfg = [];<br>cfg.downsample = 1;<br>cfg.parameter = 'avg.pow';<br>sourceDiff_int = ft_sourceinterpolate(cfg, grandavg , mri_realign);<br>
<br>%Plot MRI<br>cfg = [];<br>cfg.method = 'ortho';<br>cfg.interactive = 'yes';<br>cfg.funparameter = 'avg.pow';<br><br>figure; ft_sourceplot(cfg, grandavg);<br><br><br>- it starts to interpolate over hours and hours... and the results are worng at the end. <br>
<br><br><b>I tried also this way (this worked with another experiment where we got individual MRI's for each subject):</b><br><br>%load GAVG-Results<br>load(['/media/sonja1/Patienten/Parkinson/grandAVG_SourceDiff_OHNEdysphagie__beta.mat']);<br>
<br>%Remove the avg.avg field<br>powtemp = grandavg.avg.avg.pow;<br>grandavg = rmfield(grandavg, 'avg');<br>grandavg.avg.pow = powtemp;<br><br>%Load an anatomy from the normalized subjects which have been interpolated<br>
load(['/media/sonja1/Patienten/Parkinson/P0390/P0390-vol-f.ds/sourceDiffNormalized.mat']);<br><br>%Plot with anatomy from normalized subject<br>cfg = [];<br>cfg.method = 'ortho';<br>cfg.interactive = 'yes';<br>
cfg.funparameter = 'avg.pow';<br>grandavg.anatomy = sourceDiffIntNorm_beta.anatomy;<br><br>figure; ft_sourceplot(cfg, grandavg);<br><br><br>That prints the following error:<br><br>??? Attempted to access dim(3); index out of bounds because numel(dim)=2.<br>
<br>Error in ==> ft_plot_slice at 207<br> if all(ori==[0 1 0]), xplane = 1:dim(1); yplane = loc(2); zplane = 1:dim(3); end<br><br>Error in ==> ft_plot_ortho at 119<br> hx = ft_plot_slice(dat, varargin{:});<br>
<br>Error in ==> ft_sourceplot at 781<br> ft_plot_ortho(ana, 'transform', eye(4), 'location', ijk, 'style', 'subplot', 'parents', [h1 h2<br> h3].*update, 'doscale', false);<br>
<br>Error in ==> mw_ft_plot_GrandAVGa at 19<br>figure; ft_sourceplot(cfg, grandavg);<br><br>I also upladed the data here:<br><br>
<a href="http://www.sendspace.com/file/zkbgqz" target="_blank">http://www.sendspace.com/file/zkbgqz</a><br><br>Does anybody have any suggestions?<br><br>(I
send this to the Email-System and the Bug-System maybe I'm just doing
something wrong and somebody faced the same problem some time ago)<br>
<br>Thanks,<br><br>Martin Winkels<br>Universität Münster</div>