Skip to content

Commit

Permalink
update getBeadParams (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Landauer committed Jun 10, 2020
1 parent d10a7b4 commit 4ca2adf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions SL_3D_TFM_code/SL3DTFM_runfile.m
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,11 @@
[beadParam{multipoint},findParams] = getBeadParams(deconvName{multipoint},maxhist,beadParam{multipoint});
end
end

cur_beadParam{1} = beadParam{multipoint};
% Track Particles with TPT
[x0{multipoint}, x1{multipoint}, x{multipoint}, track{multipoint}, u{multipoint}] = ...
funRunTPT(deconvName{multipoint}, curBeadParam, tptParam, runMode, um2px, multipoint_names{multipoint});
funRunTPT(deconvName{multipoint}, cur_beadParam, tptParam, runMode, um2px, multipoint_names{multipoint});

end

Expand Down
16 changes: 8 additions & 8 deletions SL_3D_TFM_code/getBeadParams.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
load(deconvName{1});

% Parameters
minPixels = beadParam{1}.minSize; %Minimum pixel count in blob for bead
maxPixels = beadParam{1}.maxSize; %Maximum pixel count in blob for bead
minPixels = beadParam.minSize; %Minimum pixel count in blob for bead
maxPixels = beadParam.maxSize; %Maximum pixel count in blob for bead

%normalize and binarize (input I in locateParticles is similarly normalized)
vol = vol/max(vol(:));
BW = vol>beadParam{1}.thres;
BW = vol>beadParam.thres;

%use same process as the locateParticles script
CC = bwconncomp(BW);
Expand All @@ -59,20 +59,20 @@
close;

if ~isempty(thresh)
beadParam{1}.thres = thresh;
beadParam.thres = thresh;
else
thresh = beadParam{1}.thres;
thresh = beadParam.thres;
end
if ~isempty(min_r)
beadParam{1}.minSize = min_r;
beadParam.minSize = min_r;
end
if ~isempty(max_r)
beadParam{1}.maxSize = max_r;
beadParam.maxSize = max_r;
end


%rerun to check thresh param
BW = vol>beadParam{1}.thres;
BW = vol>beadParam.thres;

%use same process as the locateParticles script
CC = bwconncomp(BW);
Expand Down

0 comments on commit 4ca2adf

Please sign in to comment.