longbone_Geometry
This function analyzes the cross-sectional geometry of an intact humerus, ulna, femur, or tibia bone at 20%, 35%, 50%, 65% and 80% along the bone’s maximum length.
longbone_Geometry (filename)
will analyze the 3D model specified
in filename provided that it conforms to the Wavefront OBJ file format
and it is a pure tringular mesh. The function will automatically determine
the type of long bone in filename and register the required initial
alignment points according to the bone type. The 3D model is assumed to be in
units and present in the working directory.
folder, which must be a char string, defines the relative or absolute path to the directory containing the 3D model in filename. When omitted, the current working directory is assumed.
bones must be cell array of strings specifying one or more long bones
that should be analyzed. longbone_Geometry
will only analyze the 3D
model if it matches one of the bones named in bones.
Valid options are:
"Humerus"
"Ulna"
"Femur"
"Tibia"
"All"
If the user want to define the initial alignment points, this can be done
with a side-car Meshlab PickedPoints file with the same base filename and in
same directory as the 3D model. In such case, longbone_Geometry
skips
the automatic initial point registration and uses the first two points in the
side-car file for optimizing the bone’s mediolateral axis.
Note: The function automatically optimizes the local extremal points of the mediolateral axis based on the initial points and subsequently use the optimized coronal plane orientation for computing the second moments of area. However, the initial alignment point for ulna is not optimized. The optimized alignment points are appended in the existing MPP file or saved in newly created, accordingly.
When longbone_Geometry
is called without any output arguments, it
stores all geometric properties in CSV files as described in the following
section. Each OBJ file must explicitly contain a single 3D bone model.
Assuming a 3D model named "bone_ID.obj"
, the following files are
generated:
Filename | Description | |
---|---|---|
Dgeometry-bone_ID.csv | It contains the properties of
area (measured in ), perimeter (measured in
), centroid (returned as [x,y,z]
coordinates in units), as well as the sectioning and orientation
normals (returned as an [x,y,z] vectors). Each row
of the CSV file corresponds to a different cross section at 20%, 35%, 50%,
65%, and 80% along the bone’s maximum length. The aforementioned properties
for each cross section are stored as a row vector with the respective order
in columns [:,[2],[3],[4:6],[7:9],[10:12]]. The first column contains the
ratios of the sectioning points’ distance from the proximal end to the bone’s
maximum length. | |
Dinertia-bone_ID.csv | It contains the properties of
Ix , Iy Ixy , Imin , and Imax , all
measured in , as well as theta , measured in degrees.
Accordingly, they are saved as row vectors [2:7] with the first column
containing the ratios of the sectioning points’ distance from the proximal
end to the bone’s maximum length. | |
Dpolyline2D-bone_ID.csv | It contains the 2D coordinates (on an arbitrary x,y local axis) for each cross section as an matrix, where is the number of points for each cross-sectional polygon at 20%, 35%, 50%, 65%, and 80% along the bone’s maximum length. These polygons are ordered as 5 column duplets, i.e. [[1:2],[3:4],[5:6],[7:8],[9:10]]. Polygon coordinates start from the second row ([2:end],:), while the first row contains the relevant ratios at columns (1, [1,3,5,7,9]). | |
Dpolyline3D-bone_ID.csv | It contains the 3D model coordinates for each cross section as an matrix, where is the number of points for each cross-sectional polygon at 20%, 35%, 50%, 65%, and 80% along the bone’s maximum length. These polygons are ordered as 5 column triplets, i.e. [[1:3],[4:6],[7:9],[10:12],[13:15]]. Polygon coordinates start from the second row ([2:end],:), while the first row contains the relevant ratios at columns (1, [1,4,7,10,13]). |
[GEOM, SMoA, bone] = longbone_Geometry (…)
may also return up to three output arguments. GEOM and SMoA are
structure arrays containing the cross-sectrional geometric
properties and the second moments of area, respectively. Each element of the
structure arrays corresponds to 20%, 35%, 50%, 65%, and 80% cross sections.
For more information about the contents of the returned structure arrays, see
simple_polygon3D
. When longbone_Geometry
is called with output
arguments, then no CSV files are generated.
See also: longbone_CustomGeometry, longbone_FragmentGeometry, visualize_CrossSections, simple_polygon3D
Source Code: longbone_Geometry