Commit 65e19731 authored by Andrew Cohen's avatar Andrew Cohen

debug flags on Mitosis.findFamily, build with new HIP, denoise uses HIP.rnlmeans,

parent c3caeaa0
function [mitosisNode,imCache]=findFamily(conn,CONSTANTS,d1CellID,imCache,minAreaRatio)
function [mitosisNode,imCache]=findFamily(conn,CONSTANTS,d1CellID,imCache,minAreaRatio,bDebug)
if ~exist('minAreaRatio','var')
minAreaRatio=1;
end
if ~exist('bDebug','var')
bDebug=false;
end
mitosisNode.ratioD1D2=Inf;
mitosisNode.parentCellID=-1;
mitosisNode.siblingCellID=-1;
......@@ -26,7 +29,7 @@ d1Centroid=jsondecode(q{2})';
cmd=['select max(time) from tblCells where trackID=' num2str(d1CellID)];
q=ljsFetch(conn,cmd);
t1=q{1};
if (t1-time)<5
if (t1-time)<5 && ~bDebug
return
end
......@@ -34,7 +37,7 @@ end
cmd=['select cellID_parent from tblFamilies where cellID_child1=' num2str(d1CellID)...
' or cellID_child2=' num2str(d1CellID)];
q=ljsFetch(conn,cmd);
if ~isempty(q)
if ~isempty(q) && ~bDebug
return
end
......@@ -70,7 +73,7 @@ mitosisNode.ratioD1D2=costs(idx).ratioD1D2;
cmd=['select cellID_parent from tblFamilies where cellID_child1=' num2str(costs(idx).parentDaughterCID(2))...
' or cellID_child2=' num2str(costs(idx).parentDaughterCID(2))];
q=ljsFetch(conn,cmd);
if ~isempty(q)
if ~isempty(q) && ~bDebug
return;
end
......@@ -78,7 +81,7 @@ end
cmd=['select max(time) from tblCells where trackID IN(' num2str(costs(idx).parentDaughterTID(2)), ',' num2str(costs(idx).parentDaughterCID(2)) ') '];
q=ljsFetch(conn,cmd);
t1=q{1};
if (t1-time)<5
if (t1-time)<5 && ~bDebug
return
end
......
......@@ -59,20 +59,21 @@ if false==bFilter
im=mat2gray(im);
return
end
global USE_CUDA
szFilter=size(im)./3;
if is3D(im)
% 3D
if USE_CUDA
imx = medfilt3(im)-HIP.Cuda.Gaussian(im,szFilter,1,[]);
% imx = medfilt3(im)-HIP.Cuda.Gaussian(im,szFilter,1,[]);
imx=HIP.NLMeans(im,0.1,6,3,[]);
else
imx = medfilt3(im)-imgaussfilt3(im,szFilter);
end
else
% 2D
if USE_CUDA
szFilter(3)=0;
imx = medfilt3(im)-HIP.Cuda.Gaussian(im,szFilter,1,[]);
if USE_CUDA
imx=HIP.NLMeans(im,0.1,6,3,[]);
else
imx=medfilt2(im)-imgaussfilt(im,szFilter);
end
......
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