Closed maedoc closed 5 years ago
57 dist(:,2)=((repmat(coor(ind2,:),length(ind),1)-coor).^2)*[1;1;1];
K>> whos
Name Size Bytes Class Attributes
a1 1x1 8 double
b1 1x1 8 double
c1 1x1 8 double
coor 1x3 24 double
curr_max 1x1 8 double
dist 1x2 16 double
i 1x1 8 double
ind 1x1 8 double
ind1 1x1 8 double
ind2 0x0 0 double
ind_max 1x1 8 double
ind_surf 1x2 16 double
max_val 1x1 8 double
pair 1x2 16 double
sz 1x3 24 double
vol 126x114x69 7928928 double
ind2
is 0x0..
K>> pair
pair =
667111 681475
K>> ind
ind =
667111
K>> ind2=find(pair(2)==ind)
ind2 =
[]
ah, the problem appears to begin with vol
,
K>> find(vol)
ans =
667111
681475
When I move up the callstack (in the recursive algorithm) back to subparcel
, I finally see length(find(vol))==13428
, but below that vol
only has 1 or 2 non-zeros, which seems to be the source of the problem.
I hate this one. I already got it several times, it seems to be related to the fact the brain is not entirely in the MRI volume, as it is sometimes the case in Marseille DTI data. A temporary fix I tried that worked sometimes was to put 0 everywhere on the border line ( 8f0bafbf085 in subparcel.m). The problem is that it goes into the subdivision algorithm that I didn't wrote, so I would have to go into that.
I have the commit that add zeros.. we can discuss the algo this afternoon?
yep
After understanding the algorithm a little better, I am wondering if the single voxel split is due to non-contiguous region?
In any case, I'd prefer using a k-means with k depending on preferring subdivision size, if that would be reasonable. An advantage would be no recursion and in the config, one could specify a target subparcel area instead of a number of subdivisions.
What do you think?
I realized that a simple k-means on voxel positions won't work because the subparcels should reflect the cortical folding. Any chance we could form the subparcels on the surface parcellation instead of the volumetric? Otherwise we can use a clustering method like affinity propagation or DBSCAN which would follow the folds in the volume.
New volumetric subparcellation scheme.