Brain extraction using Kmeans and connectivity.
3 次查看(过去 30 天)
显示 更早的评论
Hello, I'm trying to perform a brain extraction of a slice from a NIFTI volume. I wrote a k means segmentation code, and that way I have gotten as far as:

and now I am trying to use connectivity, based on this tutorial but I'm not sure if something similar can be done if the parts I want to extract are not in the borders. In the image, the brain is separated from the skull and there's an empty region between them. Is there a way of separating these regions? I tried something like this but got stuck after I got the connected components structure.
Thanks in advance
4 个评论
Kirby Fears
2015-12-2
You should be able to get each one by accessing the PixelIdxList field.
cc = bwconncomp(bw, 4)
grain = false(size(bw));
% instead of 50 try 1, 2, 3, etc :
grain(cc.PixelIdxList{50}) = true;
imshow(grain);
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Neuroimaging 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

