How can I get all the cells connected to each individual cells of a Voronoi diagram?
I need this to get access to each connected cells while going through all the cells in the image. For example for cell 30 in (fig1), Frist I need to find all the connected object to this cells (e.g. 27,34,42…).
Then I need to call them in a pair (like fig 2) and use them as the mask (m file is attached) over the original image.
I have tried finding closest neighbor (nearestneighbour, good for center points but not the binary objects) and connected regions(bwconncomp) function. I would appreciate getting some advice.
% find the connected objects
[label,n] = bwlabel(maskofVron4Inve);Bdum=0;%imshow(label2rgb(label));
for j=1%: max(max (n)) %or NumMask
clearvars 'Cells_ROI_mask' 'totalNoArea' 'Cell_ROI_prop' 'OneByOneLabels' 'BC' % get each label instead of region of intrest
each_ROI=(label==j); mask_em = bwareaopen(each_ROI, 40);%imshow(OneByOneLabels3);
% SegImofFibArea=OneByOneLabels3.*BW_FibMask;
% ImFibMaskinOneRow=sum(SegImofFibArea);
% get the blood ves area and filter its location based on the fib mask
%CenterofVels=(OneByOneLabels3).*(BW_outROIfrombloodV);%BW_outROIfrombloodV2
% ImBloodVesMaskinOneRow=sum(CenterofVels);
end
Best Answer