Back to the main page.
Bug 552 - ft_volumesegment gives a segmented structure with 3X1 dim
Status | CLOSED FIXED |
Reported | 2011-03-30 10:12:00 +0200 |
Modified | 2011-03-31 14:13:57 +0200 |
Product: | FieldTrip |
Component: | core |
Version: | unspecified |
Hardware: | PC |
Operating System: | Windows |
Importance: | P1 normal |
Assigned to: | Robert Oostenveld |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Lilla Magyari - 2011-03-30 10:12:40 +0200
Hi, I have resliced an mri volume with ft_volumresliced, then I have segmented it with ft_volumesegment with an output called seg. Afterwards I could run ft_prepare_singleshell only if the seg.dim was transposed (suggested by JM). cfg = []; cfg.coordinates = 'ctf'; seg = ft_volumesegment(cfg, seg); seg.dim = seg.dim(:)'; cfg=[]; vol = ft_prepare_singleshell(cfg,vol); I guess this is a bug. Script and all data is in roboos/data/lilmag/tutorial. Best, Lilla
Robert Oostenveld - 2011-03-30 10:38:58 +0200
around line 349 I changed it into % collect the results segment.dim = size(V(1).dat); segment.dim = segment.dim(:)'; % other fieldtrip functions expect a row vector segment.transform = original.transform; % use the original transformation-matrix segment.coordsys = mri.coordsys; if isfield(mri, 'unit') segment.unit = mri.unit; end which ensures that it is a row vector