Commit 9556d93b authored by actb's avatar actb

Merge branch 'fsIntensity' of https://git-bioimage.coe.drexel.edu/bioimage/leverjs into fsIntensity

parents 6d4d3078 9b5a64cb
......@@ -8,7 +8,7 @@ qL=origL;
% nDimension is 2 for 2-D, 3 for 3-D used for concat'ing
nDimension=length(size(bw));
if is3D(bw)
minKernelArea=27;
minKernelArea=ceil(min_area_pixels/2); %
else
minKernelArea=9; %floor(min_area_pixels/4)+1;
end
......
......@@ -4,21 +4,27 @@ function [bw,bwLog]=thresholdImagess(im,imLog,segParams, min_radius_pixels,min_a
imLog(imLog<0)=0;
imLog=mat2gray(imLog);
nsz=4*floor(size(im)/16)+1;
T=adaptthresh(imLog,0.5,'NeighborhoodSize',nsz,'statistic','gaussian');
bwLog=imbinarize(imLog,T);
bwLog=bwareaopen(bwLog,4*min_area_pixels);
if is3D(im)
nsz=2*floor(size(im)/16)+1;
T=adaptthresh(imLog,0.5,'NeighborhoodSize',nsz,'statistic','gaussian');
bwLog=imbinarize(imLog,T);
bwLog=bwareaopen(bwLog,4*min_area_pixels);
T=adaptthresh(im,0.4,'NeighborhoodSize',nsz,'statistic','gaussian');
bw=imbinarize(im,T);
bw=bwareaopen(bw,min_area_pixels);
return;
end
if segParams.isPhase~=0
% bright interior phase
% else (not 3d)
nsz=4*floor(size(im)/16)+1;
T=adaptthresh(imLog,0.5,'NeighborhoodSize',nsz,'statistic','gaussian');
bwLog=imbinarize(imLog,T);
bwLog=bwareaopen(bwLog,4*min_area_pixels);
if segParams.isPhase
se=strel('disk',1);
se2=strel('disk',ceil(min_radius_pixels));
if segParams.isPhase>0
......
No preview for this file type
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