Download this file

36 lines (31 with data), 1.2 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
function [ images ] = createMasks(images)
%extractNodules takes the original image and all segmentations on the image
%and extracts the structure provided by the segmentation
% param orgImage
% a the original image that will be segmented
%
%
% param segmentedImages
% a cell array of each image segmentation
%
%% Pre-process
%Get the size of images
dimensions = size(images);
imageTotal = dimensions(2);
%% Extraction of the nodules
%I want a factory
for i=1:imageTotal
%check to see if otsu and extract that
if(strcmp(images(i).segmentationType,'otsu'))
%run through all otsu image segmentations and extract the nodule
images(i).masks = maskCreationOtsu( images(i).segmentations);
%check to see if region growing and run region growing
else if(strcmp(images(i).segmentationType,'rg'))
%run through all region growing image segmentations
%extract the nodule
images(i).masks = ...
maskCreationRegionGrowing(images(i).segmentations);
end
end
end
end