Commit f446dea4 authored by ac 20's avatar ac 20

added membraneChannel support

parent 9b5a64cb
......@@ -70,6 +70,13 @@ end
[bw,bwLog]=Segment.thresholdImages(im,imLog,segParams, min_radius_pixels,min_area_pixels,...
medianMask);
if segParams.membraneChannel>0
bwMembrane=Segment.getMembrane(CONSTANTS,segParams.membraneChannel,t);
if ~isempty(bwMembrane)
bwLog=bwLog|bwMembrane;
end
end
% bw2 is all the pixels in our foreground image. after we mask, some
% of those pixels will be discarded in resolving the underlying cells.
% allocateShake (below) assigns each discarded pixel to it's closest
......
......@@ -2,7 +2,8 @@ function segParams=getDefaultSegParams()
segParams=[];
segParams.draw=false;
segParams.minimumRadius_um=[1.5,0.25,2.5];
segParams.channels=1; %[1CONSTANTS.imageData.NumberOfChannels];
segParams.channels=1;
segParams.membraneChannel=-1;
segParams.isPhase=false;
segParams.wellRadius=-1;
segParams.useCuda=true;
......
function bwMembrane=getMembrane(CONSTANTS,channel,t)
im = MicroscopeData.Reader('imageData',CONSTANTS.imageData, 'chanList',channel,...
'timeRange',[t t], 'outType','single','prompt',false);
if isempty(im) || all(im==0)
bwMembrane=[];
return;
end
imf=HIP.LoG(im,[3,3,0],[]);
imf(imf>0)=0;
imf=abs(imf);
bwMembrane=imbinarize(imf,adaptthresh(imf));
% bwMembrane=bwmorph(bwMembrane,'skel',Inf);
......@@ -10,7 +10,7 @@ nDimension=length(size(bw));
if is3D(bw)
minKernelArea=ceil(min_area_pixels/2); %
else
minKernelArea=9; %floor(min_area_pixels/4)+1;
minKernelArea=ceil(min_area_pixels/2);
end
if is3D(bw)
......
function [bw,bwLog]=thresholdImagess(im,imLog,segParams, min_radius_pixels,min_area_pixels,...
function [bw,bwLog]=thresholdImages(im,imLog,segParams, min_radius_pixels,min_area_pixels,...
medianMask)
imLog(imLog<0)=0;
......
......@@ -4,8 +4,8 @@
"type" : "segment",
"description" : "texture w/ recurvise partition",
"params" : {
"note":" - channels: use e.g. [3,2,1]. the first channel should be the primary -- the remainder contribute edges",
"channels":"[1]",
"channels":"1",
"membraneChannel":"-1",
"note_1":" - minimumRadius_um: for ensemble, use [start,step,end] e.g. [2,0.1,4]",
"minimumRadius_um":"4",
"useCuda":"true",
......
This diff is collapsed.
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