Commit fc2c79d1 authored by Turnhout, M.C. van's avatar Turnhout, M.C. van
Browse files

add disappearing droplet checks to BF and fluo analysis (many thanks to Ayla...

add disappearing droplet checks to BF and fluo analysis (many thanks to Ayla for her keen debugging), requires similar checks in tracing scripts etc.
parent 3d5f0c88
......@@ -69,10 +69,19 @@ for t = 1:nframe/param.nchan
for n = 1:size(BF, 1)
idx = find(D(n, :) == min(D(n, :)));
if ~isempty(idx)
% check distance
if D(n, idx) <= BF(n, 4+5*(t-2))*param.maxmove && ...
isempty( find( BF(n, 4:5:4+5*(t-2)) == 0, 1) ) % check disappearance
% add detected droplet
BF(n, 1+5*(t-1)) = idx;
BF(n, 2+5*(t-1):3+5*(t-1)) = C(idx, :);
BF(n, 4+5*(t-1)) = R(idx);
BF(n, 5+5*(t-1)) = D(n, idx);
else
fprintf('\t\t\tdroplet %3i disappeared\n', n)
end
end
end
......
......@@ -74,6 +74,8 @@ for t = 1:nframe/param.nchan
% analyse fluorescence
for n = 1:size(BF, 1)
if BF(n, 1+5*(t-1)) > 0
% get mask
mask = DMA_dropletmask(x, y, BF(n, 2+5*(t-1):4+5*(t-1)) );
......@@ -115,7 +117,7 @@ for t = 1:nframe/param.nchan
obA((n-1)*param.maxcells+1:n*param.maxcells, ...
c+numel(param.fluo)*(t-1)) = mi(:, 4);
end
end
end
end
......
......@@ -7,6 +7,8 @@ r = sqrt( (x-c(1)).^2 + (y-c(2)).^2 );
r(r > c(3)) = 0; % zeros outside droplet
r(r > 0) = 1; % ones inside droplet
nargout
if nargout > 1
% get bounding box
q = regionprops(r, 'BoundingBox');
......
......@@ -256,7 +256,7 @@ update_plot
% pre-processed data
[~, f] = DMA_preprocessfluo(F, mask, c, param);
elseif style == 4
% idenified cells
% identified cells
if param.cellminIraw > 0
[raw, ~, bw] = DMA_preprocessfluo(F, mask, c, param);
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment