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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenSource
LEVER
Commits
0862de99
Commit
0862de99
authored
Mar 27, 2013
by
Mark Winter
Browse files
Options
Downloads
Patches
Plain Diff
Added Phenotype colors field and an arbitrary color in FixupOldFileVersions.
parent
31c0bcb0
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/MATLAB/+Load/FixOldFileVersions.m
+12
-3
12 additions, 3 deletions
src/MATLAB/+Load/FixOldFileVersions.m
src/MATLAB/+UI/DrawTree.m
+12
-14
12 additions, 14 deletions
src/MATLAB/+UI/DrawTree.m
with
24 additions
and
17 deletions
src/MATLAB/+Load/FixOldFileVersions.m
+
12
−
3
View file @
0862de99
...
...
@@ -36,6 +36,12 @@ function bNeedsUpdate = FixOldFileVersions()
end
end
% Add color field to phenotype structure as of ver 7.2
if
(
~
isfield
(
CellPhenotypes
,
'colors'
)
)
CellPhenotypes
.
colors
=
hsv
(
length
(
CellPhenotypes
.
descriptions
));
CellPhenotypes
.
colors
(
1
,:)
=
[
0
0
0
];
end
% Add imagePixels field to CellHulls structure (and resave in place)
if
(
~
isfield
(
CellHulls
,
'imagePixels'
)
)
fprintf
(
'\nAdding Image Pixel Information...\n'
);
...
...
@@ -51,12 +57,14 @@ function bNeedsUpdate = FixOldFileVersions()
end
% Remove HashedCells.editedFlag field as of ver 7.0
if
(
~
isempty
(
HashedCells
)
&&
isfield
(
HashedCells
{
1
},
'editedFlag'
)
)
if
(
~
isempty
(
HashedCells
)
)
for
t
=
1
:
length
(
HashedCells
)
if
(
isfield
(
HashedCells
{
t
},
'editedFlag'
)
)
HashedCells
{
t
}
=
rmfield
(
HashedCells
{
t
},
'editedFlag'
);
end
bNeedsUpdate
=
1
;
end
end
end
if
(
isempty
(
GraphEdits
)
)
GraphEdits
=
sparse
([],
[],
[],
size
(
Costs
,
1
),
size
(
Costs
,
2
),
round
(
0.1
*
size
(
Costs
,
2
)));
...
...
@@ -95,6 +103,7 @@ function bNeedsUpdate = FixOldFileVersions()
bNeedsUpdate
=
1
;
end
% Get rid of timer handle in Log
for
i
=
1
:
length
(
Log
)
if
(
isfield
(
Log
(
i
),
'figures'
))
if
(
isfield
(
Log
(
i
)
.
figures
,
'advanceTimerHandle'
))
...
...
This diff is collapsed.
Click to expand it.
src/MATLAB/+UI/DrawTree.m
+
12
−
14
View file @
0862de99
...
...
@@ -69,9 +69,7 @@ hold on
trackHeights
=
containers
.
Map
(
'KeyType'
,
'uint32'
,
'ValueType'
,
'uint32'
);
computeTrackHeights
(
trackID
,
trackHeights
);
phenoColors
=
hsv
(
length
(
CellPhenotypes
.
descriptions
));
phenoLength
=
length
(
CellPhenotypes
.
descriptions
);
[
xTracks
bFamHasPheno
]
=
simpleTraverseTree
(
trackID
,
0
,
phenoLength
,
trackHeights
);
[
xTracks
bFamHasPheno
]
=
simpleTraverseTree
(
trackID
,
0
,
trackHeights
);
xMin
=
min
(
xTracks
(:,
2
));
xMax
=
max
(
xTracks
(:,
2
));
...
...
@@ -85,7 +83,7 @@ for i=1:size(xTracks,1)
end
for
i
=
1
:
size
(
xTracks
,
1
)
drawVerticalEdge
(
xTracks
(
i
,
1
),
xTracks
(
i
,
2
)
,
phenoColors
);
drawVerticalEdge
(
xTracks
(
i
,
1
),
xTracks
(
i
,
2
));
end
if
(
Figures
.
cells
.
showInterior
)
...
...
@@ -114,7 +112,7 @@ for i=1:length(hasPhenos)
color
=
[
0
0
0
];
sym
=
'o'
;
else
color
=
phenoC
olors
(
hasPhenos
(
i
),:);
color
=
CellPhenotypes
.
c
olors
(
hasPhenos
(
i
),:);
sym
=
's'
;
end
...
...
@@ -171,8 +169,8 @@ function hLine = drawHorizontalEdge(xMin,xMax,y,trackID)
plot
([
xMin
xMax
],[
y
y
],
'-k'
,
'UserData'
,
trackID
,
'uicontextmenu'
,
Figures
.
tree
.
contextMenuHandle
);
end
function
labelHandles
=
drawVerticalEdge
(
trackID
,
xVal
,
phenoColors
)
global
CellTracks
Figures
function
labelHandles
=
drawVerticalEdge
(
trackID
,
xVal
)
global
CellTracks
CellPhenotypes
Figures
labelHandles
=
[];
bDrawLabels
=
strcmp
(
'on'
,
get
(
Figures
.
tree
.
menuHandles
.
labelsMenu
,
'Checked'
));
...
...
@@ -203,7 +201,7 @@ if ( phenotype ~= 1 )
cPheno
=
[];
if
(
phenotype
>
0
)
cPheno
=
phenoC
olors
(
phenotype
,:);
cPheno
=
CellPhenotypes
.
c
olors
(
phenotype
,:);
end
if
isempty
(
cPheno
)
...
...
@@ -224,7 +222,7 @@ if ( phenotype ~= 1 )
scaleMarker
=
1.2
;
end
;
color
=
phenoC
olors
(
phenotype
,:);
color
=
CellPhenotypes
.
c
olors
(
phenotype
,:);
labelHandles
=
[
labelHandles
plot
(
xVal
,
yMin
,
's'
,
...
'MarkerFaceColor'
,
color
,
...
'MarkerEdgeColor'
,
'w'
,
...
...
...
@@ -279,10 +277,10 @@ else
end
end
function
[
xTracks
bFamHasPheno
]
=
simpleTraverseTree
(
trackID
,
xVal
,
phenoLength
,
trackHeights
)
global
CellTracks
function
[
xTracks
bFamHasPheno
]
=
simpleTraverseTree
(
trackID
,
xVal
,
trackHeights
)
global
CellTracks
CellPhenotypes
bFamHasPheno
=
false
(
phenoLength
,
1
);
bFamHasPheno
=
false
(
length
(
CellPhenotypes
.
descriptions
)
,
1
);
phenoType
=
Tracks
.
GetTrackPhenotype
(
trackID
);
if
(
phenoType
>
0
)
bFamHasPheno
(
phenoType
)
=
1
;
...
...
@@ -303,10 +301,10 @@ function [xTracks bFamHasPheno] = simpleTraverseTree(trackID, xVal, phenoLength,
rightChild
=
1
;
end
[
xTracks
bLeftChildHasPheno
]
=
simpleTraverseTree
(
CellTracks
(
trackID
)
.
childrenTracks
(
leftChild
),
xVal
,
phenoLength
,
trackHeights
);
[
xTracks
bLeftChildHasPheno
]
=
simpleTraverseTree
(
CellTracks
(
trackID
)
.
childrenTracks
(
leftChild
),
xVal
,
trackHeights
);
leftMax
=
max
(
xTracks
(:,
2
));
[
xChild
bRightChildHasPheno
]
=
simpleTraverseTree
(
CellTracks
(
trackID
)
.
childrenTracks
(
rightChild
),
leftMax
+
1
,
phenoLength
,
trackHeights
);
[
xChild
bRightChildHasPheno
]
=
simpleTraverseTree
(
CellTracks
(
trackID
)
.
childrenTracks
(
rightChild
),
leftMax
+
1
,
trackHeights
);
xTracks
=
[
xTracks
;
xChild
];
bFamHasPheno
=
(
bFamHasPheno
|
bLeftChildHasPheno
|
bRightChildHasPheno
);
...
...
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