function [cornerMap_dt,cornerStrength_dt,dt_time,cornerMap_dt_nms] = classifyDataSetAccordingToSUSAN(dataset, threshold, strengthMaps)
%Hassan Nahas
%Sarah Meshreqy
%This functions applies the SUSAN detector to every image in a dataset. A
%strengthmap is generated and a threshold is used to control the number of
%corners detected.

%initialize containers
cornerMap_dt = cell(1, length(dataset));
cornerMap_dt_nms = cell(1, length(dataset));
cornerStrength_dt = cell(1, length(dataset));
if length(threshold) > 1
    thresholds = threshold;
else
    thresholds = ones(length(dataset),1)*threshold;
end
% thresholds
tic;
for i = 1 : length(dataset)
    %filename = strcat('/Users/sarahhenry/Desktop/Project/Datasets/box/frames/',srcFiles(i).name);  
    %dataset{i} = readpng(strcat(filename));
    
    %Test Pixel-by-Pixel Decision Tree
    
    
    
    if (isempty(strengthMaps))
        [ cornerStrength_dt{i} ] = classifyImageAccordingToSUSAN( dataset{i}, 4,7,0.20  );
    else
        cornerStrength_dt{i} = strengthMaps{i};
    end
    
    strengthi = cornerStrength_dt{i};
    strengthi(strengthi < thresholds(i)) = 0;
    strengthi(strengthi >= thresholds(i)) = 1;
    cornerMap_dt{i} = strengthi;
    %cornerMap_dt{i} = classifyImageAccordingToTree( Tree,dataset{i},thresholds(i),[] );
    
    [ cornerMap_dt_nms{i} ] = nonmaximalsuppression( cornerStrength_dt{i}.* cornerMap_dt{i});
    
end
dt_time = toc;
end
