Commit 5404fcb5 authored by ac 20's avatar ac 20

thresholdImages log aiOpen size, split cell 3d ensemble fix

parent cb955e9b
......@@ -40,7 +40,7 @@ for i=1:size(q,1)
cx=Ensemble.makeEnsembleCell(q(i,:));
cx=Read.setCellsIdxPts(cx,CONSTANTS);
Cells=[Cells;cx];
overlap(i)=length(intersect(cellSrc.idxPts,cx.idxPts))/length(cx.idxPts);
overlap(i)=length(intersect(cellSrc.idxPts,cx.idxPts))/length(unique(cx.idxPts));
end
Cells(find(overlap<0.95),:)=[];
if isempty(Cells)
......
......@@ -11,3 +11,14 @@ Cell.channel=qi.channel;
Cell.area=qi.area;
Cell.iRadius=qi.iRadius;
verts=typecast([qi.verts{:}],'single');
verts=reshape(verts,3,[])';
Cell.verts=verts;
faces=typecast([qi.faces{:}],'uint32');
faces=reshape(faces,3,[])';
Cell.faces=faces;
Cell.edges=typecast([qi.edges{:}],'uint32');
Cell.edges=reshape(Cell.edges,2,[])';
Cell.normals=typecast([qi.normals{:}],'single');
Cell.normals=reshape(Cell.normals,3,[])';
......@@ -14,7 +14,7 @@ end
if sensitivity>1 && round(sensitivity)==sensitivity
lm=multithresh(imLog,sensitivity);
bwLog=logical(imLog>lm(end));
bwLog=Segment.aiAreaOpen(bwLog,2*min_radius_pixels);
bwLog=Segment.aiAreaOpen(bwLog,min_radius_pixels);
lm=multithresh(im,sensitivity);
bw=logical(im>lm(end));
bw=Segment.aiAreaOpen(bw,min_radius_pixels);
......@@ -25,7 +25,7 @@ if is3D(im)
nsz=2*floor(size(im)/16)+1;
T=adaptthresh(imLog,0.5,'NeighborhoodSize',nsz,'statistic','gaussian');
bwLog=imbinarize(imLog,T);
bwLog=Segment.aiAreaOpen(bwLog,2*min_radius_pixels);
bwLog=Segment.aiAreaOpen(bwLog,min_radius_pixels);
nsz=4*floor(size(im)/16)+1;
T=adaptthresh(im,sensitivity,'NeighborhoodSize',nsz,'statistic','gaussian');
......
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