Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DeProj
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
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
IAH public
DeProj
Commits
cfd62f5a
Commit
cfd62f5a
authored
5 years ago
by
Sebastien Herbert
Browse files
Options
Downloads
Patches
Plain Diff
Updates output table
parent
06fcfbb7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
MainScripts/formatTableOuputSurfaceCombine.m
+22
-22
22 additions, 22 deletions
MainScripts/formatTableOuputSurfaceCombine.m
with
22 additions
and
22 deletions
MainScripts/formatTableOuputSurfaceCombine.m
+
22
−
22
View file @
cfd62f5a
function
[
tableOutputDeproj
,
tableOutputBell
]
=
formatTableOuputSurfaceCombine
(
dataCells
,
dataSeg
)
function
tableOutputDeproj
=
formatTableOuputSurfaceCombine
(
dataCells
,
dataSeg
)
% Format the important variables into a table output for simpler handling
tableOutputDeproj
=
table
;
tableOutputBell
=
table
;
%
tableOutputBell = table;
%% Cell numbering
tableOutputDeproj
.
Numbers
=
dataCells
.
numbers
;
tableOutputBell
.
Numbers
=
dataSeg
.
CELLS
.
numbers
(
dataCells
.
numbers
);
tableOutputDeproj
.
cellIdx
=
dataCells
.
cellIdx
'
;
%
tableOutputBell.Numbers = dataSeg.CELLS.numbers(dataCells.
cellIdx
);
%% Cell center (ellipse real)
for
bioCell
=
1
:
numel
(
dataCells
.
numbers
)
for
bioCell
=
1
:
numel
(
dataCells
.
cellIdx
)
EllipseRealCenter
(
bioCell
,:)
=
dataCells
.
cellContour3D
{
bioCell
}
.
ellipseReal
.
center
;
end
tableOutputDeproj
.
EllipseRealCenter
=
EllipseRealCenter
;
%% Cell areas
for
bioCell
=
1
:
numel
(
dataCells
.
numbers
)
for
bioCell
=
1
:
numel
(
dataCells
.
cellIdx
)
areaEllReal
(
bioCell
)
=
dataCells
.
cellContour3D
{
bioCell
}
.
ellipseRotViaOri
.
areaEllipse
;
areaEllProj
(
bioCell
)
=
dataCells
.
cellContour2D
{
bioCell
}
.
ellipseProj
.
areaEllipse
;
end
...
...
@@ -25,26 +25,26 @@ tableOutputDeproj.AreaReal = cell2mat(dataCells.area.areaRealTot);
tableOutputDeproj
.
AreaProj
=
cell2mat
(
dataCells
.
area
.
areaProjTot
);
tableOutputDeproj
.
AreaEllReal
=
areaEllReal
'
;
tableOutputDeproj
.
AreaEllProj
=
areaEllProj
'
;
tableOutputBell
.
AreaBell
=
dataSeg
.
CELLS
.
areas
(
dataCells
.
numbers
);
%
tableOutputBell.AreaBell = dataSeg.CELLS.areas(dataCells.
cellIdx
);
%% Cell neighbours
tableOutputDeproj
.
nbrNeighbours
=
dataSeg
.
CELLS
.
n_neighbors
(
dataCells
.
numbers
);
tableOutputBell
.
nbrNeighbours
=
dataSeg
.
CELLS
.
n_neighbors
(
dataCells
.
numbers
);
%
tableOutputDeproj.nbrNeighbours = dataSeg.CELLS.n_neighbors(dataCells.
cellIdx
);
%
tableOutputBell.nbrNeighbours = dataSeg.CELLS.n_neighbors(dataCells.
cellIdx
);
%% Cell anisotropy (Bellaiche style) % Change for precalculated values !
for
bioCell
=
1
:
numel
(
dataCells
.
numbers
)
for
bioCell
=
1
:
numel
(
dataCells
.
cellIdx
)
elongationReal
(
bioCell
)
=
dataCells
.
cellContour3D
{
bioCell
}
.
ellipseRotViaOri
.
semiMajAx
/
...
dataCells
.
cellContour3D
{
bioCell
}
.
ellipseRotViaOri
.
semiMinAx
;
elongationProj
(
bioCell
)
=
dataCells
.
cellContour2D
{
bioCell
}
.
ellipseProj
.
semiMajAx
/
...
dataCells
.
cellContour2D
{
bioCell
}
.
ellipseProj
.
semiMinAx
;
elongationBell
(
bioCell
)
=
dataSeg
.
CELLS
.
anisotropies
(
dataCells
.
numbers
(
bioCell
));
%
elongationBell(bioCell) = dataSeg.CELLS.anisotropies(dataCells.
cellIdx
(bioCell));
end
tableOutputDeproj
.
anisostropyReal
=
1
-
1.
/
elongationReal
'
;
tableOutputDeproj
.
anisotropyProj
=
1
-
1.
/
elongationProj
'
;
tableOutputBell
.
anisotropyBell
=
elongationBell
'
;
%
tableOutputBell.anisotropyBell = elongationBell';
%% Cell longer axis
for
bioCell
=
1
:
numel
(
dataCells
.
numbers
)
for
bioCell
=
1
:
numel
(
dataCells
.
cellIdx
)
semiMajorAxisReal
(
bioCell
)
=
dataCells
.
cellContour3D
{
bioCell
}
.
ellipseRotViaOri
.
semiMajAx
;
semiMajorAxisProj
(
bioCell
)
=
dataCells
.
cellContour2D
{
bioCell
}
.
ellipseProj
.
semiMajAx
;
end
...
...
@@ -52,19 +52,19 @@ tableOutputDeproj.semiMajAxisReal = semiMajorAxisReal';
tableOutputDeproj
.
semiMajAxisProj
=
semiMajorAxisProj
'
;
%% Cell angle (Projected only)
for
bioCell
=
1
:
length
(
dataCells
.
numbers
)
for
bioCell
=
1
:
length
(
dataCells
.
cellIdx
)
% angleReal(bioCell) =
% dataCells.cellContour3D{bioCell}.ellipseRotViaOri.alpha; => Not
% calculated yet
angleProj
(
bioCell
)
=
dataCells
.
cellContour2D
{
bioCell
}
.
ellipseProj
.
alpha
;
angleBell
(
bioCell
)
=
dataSeg
.
CELLS
.
orientations
(
dataCells
.
numbers
(
bioCell
));
%
angleBell(bioCell) = dataSeg.CELLS.orientations(dataCells.
cellIdx
(bioCell));
end
% tableOutputDeproj.angleReal = angleReal';
tableOutputDeproj
.
angleProj
=
angleProj
'
;
tableOutputBell
.
angleBell
=
angleBell
'
;
%
tableOutputBell.angleBell = angleBell';
%% Cell orientation real
for
bioCell
=
1
:
numel
(
dataCells
.
numbers
)
% Only keep the end point of the vector. The beginning is the ellipse center
for
bioCell
=
1
:
numel
(
dataCells
.
cellIdx
)
% Only keep the end point of the vector. The beginning is the ellipse center
if
isnan
(
dataCells
.
cellContour3D
{
bioCell
}
.
ellipseReal
.
normOrientation
(
1
,
1
))
EllipseRealOrient
(
bioCell
,:)
=
dataCells
.
cellContour3D
{
bioCell
}
.
ellipseReal
.
normOrientation
(
1
,
1
);
else
...
...
@@ -75,7 +75,7 @@ end
tableOutputDeproj
.
EllipseRealOrient
=
EllipseRealOrient
;
%% Cell perimeters
for
bioCell
=
1
:
length
(
dataCells
.
numbers
)
for
bioCell
=
1
:
length
(
dataCells
.
cellIdx
)
perimeterReal
(
bioCell
)
=
dataCells
.
cellContour3D
{
bioCell
}
.
perimeterReal
;
perimeterProj
(
bioCell
)
=
dataCells
.
cellContour2D
{
bioCell
}
.
perimeterProj
;
perimeterEllipseReal
(
bioCell
)
=
dataCells
.
cellContour3D
{
bioCell
}
.
ellipseRotViaOri
.
perimeterEllipse
;
...
...
@@ -83,13 +83,13 @@ end
tableOutputDeproj
.
perimeterReal
=
perimeterReal
'
;
tableOutputDeproj
.
perimeterProj
=
perimeterProj
'
;
tableOutputDeproj
.
perimeterEllipseReal
=
perimeterEllipseReal
'
;
tableOutputBell
.
perimeterBell
=
dataSeg
.
CELLS
.
perimeters
(
dataCells
.
numbers
);
%
tableOutputBell.perimeterBell = dataSeg.CELLS.perimeters(dataCells.
cellIdx
);
%% Field naming
tableOutputDeproj
.
Properties
.
VariableNames
=
{
'cellID'
'centerEllipseReal'
'AreaReal'
'AreaProj'
'AreaEllipseReal'
'AreaEllipseProj'
...
'NbrNeighbours'
'AnisotropyReal'
'AnisotropyProj'
'semiMajAxReal'
'semiMajAxProj'
'AngleProj'
'OrientationEllipseReal'
...
'AnisotropyReal'
'AnisotropyProj'
'semiMajAxReal'
'semiMajAxProj'
'AngleProj'
'OrientationEllipseReal'
...
'PerimeterReal'
'PerimeterProj'
'PerimeterEllipseReal'
};
tableOutputBell
.
Properties
.
VariableNames
=
{
'cellID'
'AreaBell'
'NbrNeighbours'
'AnisotropyBell'
'AngleBell'
...
'PerimeterBell'
};
%
tableOutputBell.Properties.VariableNames = {'cellID' 'AreaBell' 'NbrNeighbours' 'AnisotropyBell' 'AngleBell'...
%
'PerimeterBell'};
end
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