Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LEVER
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenSource
LEVER
Commits
ef2ee940
Commit
ef2ee940
authored
12 years ago
by
Eric Wait
Browse files
Options
Downloads
Patches
Plain Diff
ChangeLabel only goes forward
parent
b44eb9fe
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/MATLAB/+Tracks/ChangeLabel.m
+6
-0
6 additions, 0 deletions
src/MATLAB/+Tracks/ChangeLabel.m
src/MATLAB/+Tracks/ChangeTrackID.m
+12
-8
12 additions, 8 deletions
src/MATLAB/+Tracks/ChangeTrackID.m
with
18 additions
and
8 deletions
src/MATLAB/+Tracks/ChangeLabel.m
+
6
−
0
View file @
ef2ee940
...
...
@@ -9,10 +9,16 @@
function
droppedTracks
=
ChangeLabel
(
currentTrack
,
desiredTrack
,
time
)
global
CellTracks
droppedTracks
=
[];
if
(
~
exist
(
'time'
,
'var'
))
time
=
CellTracks
(
currentTrack
)
.
startTime
;
end
if
(
time
<
CellTracks
(
desiredTrack
)
.
startTime
)
return
end
children
=
CellTracks
(
currentTrack
)
.
childrenTracks
;
%Pass the work off to the lower function
...
...
This diff is collapsed.
Click to expand it.
src/MATLAB/+Tracks/ChangeTrackID.m
+
12
−
8
View file @
ef2ee940
...
...
@@ -36,6 +36,10 @@ if (isempty(currentTrack) || isempty(desiredTrack))
error
(
'Need both tracks, currentTrack: %d, desiredTrack: %d'
,
currentTrack
,
desiredTrack
);
end
if
(
time
<
CellTracks
(
desiredTrack
)
.
startTime
)
error
(
'DesiredTrack %d has to exist prior to time %d'
,
desiredTrack
,
time
);
end
droppedTracks
=
[];
currentParent
=
[];
...
...
@@ -43,7 +47,7 @@ if(~exist('time','var'))
time
=
CellTracks
(
currentTrack
)
.
startTime
;
end
if
(
time
>=
CellTracks
(
desiredTrack
)
.
startTime
)
%
if (time>=CellTracks(desiredTrack).startTime)
%% The desiredTrack is before the currentTrack
% Remove any future track on the desiredTrack
if
(
time
<=
CellTracks
(
desiredTrack
)
.
endTime
)
...
...
@@ -53,13 +57,13 @@ if (time>=CellTracks(desiredTrack).startTime)
startHash
=
time
-
CellTracks
(
currentTrack
)
.
startTime
+
1
;
endHash
=
length
(
CellTracks
(
currentTrack
)
.
hulls
);
hulls
=
CellTracks
(
currentTrack
)
.
hulls
(
startHash
:
endHash
);
else
%% The currentTrack is before the desiredTrack
% Remove any future track on the currentTrack
currentParent
=
CellTracks
(
currentTrack
)
.
parentTrack
;
droppedTracks
=
[
droppedTracks
Families
.
RemoveFromTreePrune
(
currentTrack
,
time
)];
hulls
=
CellTracks
(
currentTrack
)
.
hulls
;
end
%
else
%
%% The currentTrack is before the desiredTrack
%
% Remove any future track on the currentTrack
%
currentParent = CellTracks(currentTrack).parentTrack;
%
droppedTracks = [droppedTracks Families.RemoveFromTreePrune(currentTrack,time)];
%
hulls = CellTracks(currentTrack).hulls;
%
end
if
(
any
(
droppedTracks
==
desiredTrack
))
% This means that the desired track is off the tree but still has all of
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment