Skip to content
Snippets Groups Projects
Commit bee98609 authored by Walt Mankowski's avatar Walt Mankowski
Browse files

added time parameter to Segmentation.PartialImageSegment()

parent 8d450bad
No related branches found
No related tags found
No related merge requests found
......@@ -279,7 +279,7 @@ function objs = partialSegObjs(chkPoint, time)
filename = Helper.GetFullImagePath(time);
img = Helper.LoadIntensityImage(filename);
objs = Segmentation.PartialImageSegment(img, chkPoint, 200, 1.0);
objs = Segmentation.PartialImageSegment(img, chkPoint, 200, 1.0, time);
end
function updateLocalTracking(newHulls, hullTime)
......
......@@ -57,7 +57,7 @@ function parentHull = addParentHull(midpoint, time, mitosisPoints)
filename = Helper.GetFullImagePath(time);
img = Helper.LoadIntensityImage(filename);
objs = Segmentation.PartialImageSegment(img, midpoint, 200, 1.0);
objs = Segmentation.PartialImageSegment(img, midpoint, 200, 1.0, time);
pointCounts = zeros(1,length(objs));
for i=1:length(objs)
......
......@@ -14,7 +14,7 @@ function [addedHull costMatrix nextHulls] = AddSegmentation(prevHull, costMatrix
guessPoint = [CellHulls(prevHull).centerOfMass(2) CellHulls(prevHull).centerOfMass(1)];
newObj = Segmentation.FindNewSegmentation(img, guessPoint, 200, 1.0, CellHulls(prevHull).indexPixels);
newObj = Segmentation.FindNewSegmentation(img, guessPoint, 200, 1.0, CellHulls(prevHull).indexPixels, time);
if ( isempty(newObj) )
if ( ~bAggressive )
......@@ -22,7 +22,7 @@ function [addedHull costMatrix nextHulls] = AddSegmentation(prevHull, costMatrix
end
for tryAlpha = 0.95:(-0.05):0.5
newObj = Segmentation.FindNewSegmentation(img, guessPoint, 200, tryAlpha, CellHulls(prevHull).indexPixels);
newObj = Segmentation.FindNewSegmentation(img, guessPoint, 200, tryAlpha, CellHulls(prevHull).indexPixels, time);
if ( ~isempty(newObj) )
break;
end
......
......@@ -30,12 +30,12 @@ function newTrackID = AddNewSegmentHull(clickPt, time)
filename = Helper.GetFullImagePath(time);
img = Helper.LoadIntensityImage(filename);
[newObj newFeat] = Segmentation.FindNewSegmentation(img, clickPt, 200, 1.0);
[newObj newFeat] = Segmentation.FindNewSegmentation(img, clickPt, 200, 1.0, [], time);
% Aggressive add segmentation
if ( isempty(newObj) )
for tryAlpha = 1.25:(-0.05):0.5
[newObj newFeat] = Segmentation.FindNewSegmentation(img, clickPt, 200, tryAlpha);
[newObj newFeat] = Segmentation.FindNewSegmentation(img, clickPt, 200, tryAlpha, [], time);
if ( ~isempty(newObj) )
break;
end
......
function [hull feature] = FindNewSegmentation(img, centerPt, subSize, alpha, overlapPoints)
function [hull feature] = FindNewSegmentation(img, centerPt, subSize, alpha, overlapPoints, time)
if ( ~exist('overlapPoints', 'var') )
overlapPoints = [];
end
[objs features] = Segmentation.PartialImageSegment(img, centerPt, subSize, alpha);
[objs features] = Segmentation.PartialImageSegment(img, centerPt, subSize, alpha, time);
if ( isempty(overlapPoints) )
bInHull = Hulls.CheckHullsContainsPoint(centerPt, objs);
......
......@@ -25,7 +25,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [hulls features] = PartialImageSegment(img, centerPt, subSize, alpha)
function [hulls features] = PartialImageSegment(img, centerPt, subSize, alpha, time)
global CONSTANTS
if ( length(subSize) < 2 )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment