Download this file

26 lines (19 with data), 691 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
function createLabels(baseLabels,unwantedValues,numSegs,fid1,segType)
%CREATELABELS makes a set of labels for a text file
% Takes a file descriptor, a segmentationType, and a set of baseLabels to
% create the first line of headers
%size of base labels
baseSize = size(baseLabels,2);
%generate labels
for i=1:numSegs
for j=1:baseSize
fn = baseLabels{j};
if (~ismember(fn,unwantedValues))
newLabel = strcat(fn,segType,num2str(i));
fprintf(fid1,'%s,',newLabel);
end
end
end
%insert newline
fprintf(fid1,'%s\n', 'ImageName');
end