Thanks a lot, Eugenio!
The script for flipping clusters is awesome! Very helpful!
I might also use your other script for decomposing clusters in future, but unfortunately, the array of clusters I would like to decomopose in masks with single clusters is all coded with 1 (and not in numbers from 1 to n). Similarly, it would also be interesting to decomopose arrays of clusters where the voxels have different Z-values.
I know that one can save results in SPM as an image with n-ary clusters (coded with numbers), but don't know if there is a way do decompose them from an already given image. Maybe someone knows a function that separates every cluster (with voxel values > 0) based on non-adjacency of voxels/clusters.
If I remember correctly there is a function in FSL and I might try it there, but maybe it can also be easily done in SPM?
Thanks!
Stefan
|