a b/Image Segmentation/Image Utility Functions/extraction/maskCreationRegionGrowing.m
1
function [ masks ] = maskCreationRegionGrowing(segmentedImages)
2
%noduleExtractionRegionGrowing Summary of this function goes here
3
%   param orgImage
4
%       a the original image that will be segmented
5
% 
6
% 
7
%   param segmentedImages
8
%       a cell array of each image segmentation
9
% 
10
% 
11
%     
12
13
    %% Pre-process
14
15
    %Get the number of segmentations
16
    dimensions = size(segmentedImages);
17
    segTotal = dimensions(2);
18
    
19
    %set up cell array for images
20
    masks{segTotal} = [];
21
    
22
23
    %% extract nodule
24
    for i=1:segTotal
25
        
26
        %get segmented image
27
        s = segmentedImages{i};
28
        %fill holes in region growing
29
        s = imfill(s,'holes');
30
        %save the mask
31
        masks{i} = s;
32
33
        
34
    end
35
36
37
38
39
40
end
41