%% FAST TRACKING %%2

datapath = ['/home/mcm/Desktop/testdataset/'] % finishing by a /
cd(datapath)

ew_mask_FS % relies on the Otsu thresholding and erotion/delatation to select
% cells from the average of initial and final brightfield images
% stored in Pos1/


dirlist = dir('*-*'); %list of folder names

for i = 1:length(dirlist)
    
    currentf = dirlist(i).name;
    fname = dirlist(i).name;    
    
    IMG = generatePosListfast_cells(datapath,currentf,fname); 
    % generate list of peak positions
    % saves the list in datapath/Tracks, PosList contains x,y,and time step
    % peak_details and fitP contains other informations of the peaks
end