problems with segmentation
Jan Hirschmann
Jan.Hirschmann at MED.UNI-DUESSELDORF.DE
Wed Dec 30 16:03:46 CET 2009
Hi there,
I am having trouble segmenting an MRI scan using volumesegment on a realigned scan (obtained by volumerealign). Actually, I think this not really a fieldtrip but a spm problem. It seems there are nans or infs in some covariance matrix calculated by spm_segment, but honestly, I don't really see through this. Strangely, it did work once but then found no gray nor white matter but only CSF. Maybe it depends on how I choose the fiducials... If someone has any experience with this I would be really glad for any clue, as I am completley stuck. Thanks in advance! Here's the code and the error message:
addpath('/data/apps/spm/spm2')
cd('/net/avidya/storage/home/jan/seidel_dicom/S00002/SER00002');
mrifilename = 'I00001';
mri = read_mri(mrifilename);
cfg=[];
cfg.interactive='yes';
seg_mri=volumerealign(cfg,mri);
cd('/net/avidya/storage/home/jan/seidel_dicom/mat_anatomy_files');
save mri_realigned mri
cfg = [];
cfg.template = '/data/apps/spm/spm2/templates/T1.mnc';
cfg.coordinates = 'ctf';
cfg.write = 'no';
cfg.name = 'temp';
[segmentedmri] = volumesegment(cfg, mri);
??? Error using ==> schur
Input to SCHUR must not contain NaN or Inf.
Error in ==> sqrtm at 33
[Q, T] = schur(A,'complex'); % T is complex Schur form.
Error in ==> spm_segment>get_p at 552
dst = (cor-ones(size(cor,1),1)*CP.mn(:,i)')/sqrtm(CP.cv(:,:,i));
Error in ==> spm_segment>run_segment at 335
[P,ll0] = get_p(cor,msk,s,sums,CP,bf);
Error in ==> spm_segment at 106
[CP,BP,SP] = run_segment(CP,BP,SP,VF,sums,x1,x2,x3);
Error in ==> ft_volumesegment at 176
spm_segment(Va,cfg.template,flags);
Error in ==> volumesegment at 17
[varargout{1:nargout}] = funhandle(varargin{:});
----------------------------------
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20091230/049d0366/attachment-0001.html>
More information about the fieldtrip
mailing list