Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IAH public
DeProj
Commits
b2b976c5
Commit
b2b976c5
authored
Jul 07, 2020
by
Jean-Yves TINEVEZ
Browse files
Method to export a deproj object to a table.
parent
e6bcc04b
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/@deproj/deproj.m
View file @
b2b976c5
...
@@ -17,7 +17,12 @@ classdef deproj
...
@@ -17,7 +17,12 @@ classdef deproj
%% Plotting routines.
%% Plotting routines.
methods
methods
%% Exports.
% Export masurements to a table.
T
=
to_table
(
obj
)
%% Generate figures.
%% Generate figures.
% Figure with the local plan orientation for a collection of epicells.
% Figure with the local plan orientation for a collection of epicells.
...
...
src/@deproj/to_table.m
0 → 100644
View file @
b2b976c5
function
T
=
to_table
(
obj
)
%TO_TABLE Export masurements to a table.
epicells
=
obj
.
epicells
;
id
=
vertcat
(
epicells
.
id
);
center
=
vertcat
(
epicells
.
center
);
xc
=
center
(
:
,
1
);
yc
=
center
(
:
,
2
);
zc
=
center
(
:
,
3
);
area
=
vertcat
(
epicells
.
area
);
perim
=
vertcat
(
epicells
.
perimeter
);
euler_angle
=
vertcat
(
epicells
.
euler_angles
);
euler_alpha
=
euler_angle
(
:
,
1
);
euler_beta
=
euler_angle
(
:
,
2
);
euler_gamma
=
euler_angle
(
:
,
3
);
ellipse_fit
=
vertcat
(
epicells
.
ellipse_fit
);
ellipse_x0
=
ellipse_fit
(
:
,
1
);
ellipse_y0
=
ellipse_fit
(
:
,
2
);
ellipse_z0
=
ellipse_fit
(
:
,
3
);
ellipse_a
=
ellipse_fit
(
:
,
4
);
ellipse_b
=
ellipse_fit
(
:
,
5
);
ellipse_sigma
=
ellipse_fit
(
:
,
6
);
eccentricity
=
vertcat
(
epicells
.
eccentricity
);
proj_direction
=
vertcat
(
epicells
.
proj_direction
);
uncorrected_area
=
vertcat
(
epicells
.
uncorrected_area
);
uncorrected_perimeter
=
vertcat
(
epicells
.
uncorrected_perimeter
);
T
=
table
(
...
id
,
...
xc
,
...
yc
,
...
zc
,
...
area
,
...
perim
,
...
euler_alpha
,
...
euler_beta
,
...
euler_gamma
,
...
ellipse_x0
,
...
ellipse_y0
,
...
ellipse_z0
,
...
ellipse_a
,
...
ellipse_b
,
...
ellipse_sigma
,
...
eccentricity
,
...
proj_direction
,
...
uncorrected_area
,
...
uncorrected_perimeter
);
T
.
Properties
.
VariableDescriptions
=
{
'Unique identifier'
'Cell center X position'
'Cell center Y position'
'Cell center Z position'
'Cell area (deprojected)'
'Cell perimeter (deprojected)'
'First Euler angle for the cell plane (rotation around Z)'
'Second Euler angle for the cell plane (rotation around X
''
)'
'Third Euler angle for the cell plane (rotation around Z
''
)'
'Ellipse fit center X position'
'Ellipse fit center Y position'
'Ellipse fit center Z position'
'Ellipse fit semi-major axis length'
'Ellipse fit semi-minor axis length'
'Ellipse fit angle with X
''
(see Euler angles) axis'
'Eccentricity from ellipse fit'
'Cell main direction projected on the XY plane'
'Cell area projected on the XY plane'
'Cell perimeter projected on the XY plane'
};
T
.
Properties
.
VariableUnits
=
{
''
obj
.
units
obj
.
units
obj
.
units
sprintf
(
'%s^2'
,
obj
.
units
)
obj
.
units
'radians'
'radians'
'radians'
obj
.
units
obj
.
units
obj
.
units
obj
.
units
obj
.
units
'radians'
''
'radians'
sprintf
(
'%s^2'
,
obj
.
units
)
obj
.
units
};
T
.
Properties
.
Description
=
sprintf
(
'Data generated from Deproj software, exported on %s.'
,
...
datestr
(
now
)
);
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment