Skip to content
Snippets Groups Projects
Commit 82317ca5 authored by Nathan Spaeth's avatar Nathan Spaeth
Browse files

Fix errors in previous commit

parent f4bd3b7a
No related branches found
No related tags found
No related merge requests found
...@@ -19,25 +19,6 @@ while ( ~bOpened ) ...@@ -19,25 +19,6 @@ while ( ~bOpened )
[sigDigits imageDataset] = Helper.ParseImageName(settings.imageFile); [sigDigits imageDataset] = Helper.ParseImageName(settings.imageFile);
<<<<<<< Updated upstream
if (~isfield(CONSTANTS,'datasetName'))
CONSTANTS.datasetName = imageDataset;
elseif (~strcmp(imageDataset,CONSTANTS.datasetName))
if (strcmp(imageDataset,[CONSTANTS.datasetName '_']))
CONSTANTS.datasetName = [CONSTANTS.datasetName '_'];
else
answer = questdlg('Image does not match dataset would you like to choose another?','Image Selection','Yes','No','Close LEVer','Yes');
switch answer
case 'Yes'
continue;
case 'No'
CONSTANTS.imageNamePattern = '';
case 'Close LEVer'
return
otherwise
continue;
end
=======
if (strcmp(imageDataset,[CONSTANTS.datasetName '_'])) if (strcmp(imageDataset,[CONSTANTS.datasetName '_']))
CONSTANTS.datasetName = [CONSTANTS.datasetName '_']; CONSTANTS.datasetName = [CONSTANTS.datasetName '_'];
bOpened = 1; bOpened = 1;
...@@ -53,7 +34,6 @@ while ( ~bOpened ) ...@@ -53,7 +34,6 @@ while ( ~bOpened )
return return
otherwise otherwise
continue; continue;
>>>>>>> Stashed changes
end end
end end
......
% GraphEditSetEdge(trackID, nextTrackID, time)
% Set an edge edit in GraphEdits structure.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Copyright 2011 Andrew Cohen, Eric Wait and Mark Winter
%
% This file is part of LEVer - the tool for stem cell lineaging. See
% https://pantherfile.uwm.edu/cohena/www/LEVer.html for details
%
% LEVer is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% LEVer is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with LEVer in file "gnu gpl v3.txt". If not, see
% <http://www.gnu.org/licenses/>.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function GraphEditSetEdge(trackID, nextTrackID, time, bLongDistance)
global GraphEdits CachedCostMatrix CellTracks
<<<<<<< HEAD
if(exist('bLongDistance', 'var') && bLongDistance)
=======
if (~exist('bLongDistance','var'))
bLongDistance = 0;
end
if(bLongDistance)
>>>>>>> 7948920483a8db2fd45c372532e731888ea05a8b
track = CellTracks(trackID);
if(isempty(track.hulls)) %check for valid track
trackHull = 0;
else
for i=length(track.hulls):-1:1 %search backward through hulls for last edit or first hull
trackHull = track.hulls(i);
if(trackHull)
if(any(GraphEdits(trackHull,:)) || any(GraphEdits(:,trackHull)))
break
end
end
end
end
else
trackHull = Helper.GetNearestTrackHull(trackID, time-1, -1);
end
nextHull = Helper.GetNearestTrackHull(nextTrackID, time, 1);
if ( trackHull == 0 || nextHull == 0 )
return;
end
GraphEdits(trackHull,:) = 0;
GraphEdits(:,nextHull) = 0;
GraphEdits(trackHull,nextHull) = 1;
% Update cached cost matrix
CachedCostMatrix(trackHull,:) = 0;
CachedCostMatrix(:,nextHull) = 0;
CachedCostMatrix(trackHull,nextHull) = eps;
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment