Function Reference: longbone_Geometry

csg-toolkit: longbone_Geometry (filename)
csg-toolkit: longbone_Geometry (filename, bones)
csg-toolkit: longbone_Geometry (folder, filename)
csg-toolkit: longbone_Geometry (folder, filename, bones)
csg-toolkit: [GEOM, SMoA, bone, EXTRA, data] = 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 mm units and present in the working directory.

folder, which must be a character vector, 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 character vectors 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, unless the 'Force' option is also selected, in which case the user must specify a single bone such as in {'Force', 'Humerus'}. Valid options are:

  1. 'Humerus'
  2. 'Ulna'
  3. 'Femur'
  4. 'Tibia'
  5. 'All'
  6. 'Force'

Note: When 'Force' is included, initial alignment points are also required and it is the user’s responsibility to ensure the appropriate bone is being analyzed. This option is provided so that damaged or heaviliy deformed bones, which may turn out as undefined, can be analyzed.

If the user wants 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.

  1. For the humerus, these points must be positioned anteriorly on the trochlea and capitulum at the distal end of the humerus.
  2. For the ulna, only a single initial alignment point is required that must be placed at the anterior tip of the coronoid process.
  3. For the femur, these points must be located posteriorly on the medial and lateral condyles at the distal end of the femur.
  4. For the tibia, these points must be positioned posteriorly of the medial and lateral condyles at the proximal end of the tibia.

Note: The function automatically optimizes the local extremal points of the mediolateral axis based on the initial points and subsequently uses 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:

FilenameDescription
Dgeometry-bone_ID.csvIt contains the properties of area (measured in mm^2), perimeter (measured in mm), centroid (returned as [x,y,z] coordinates in mm 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.csvIt contains the properties of Ix, Iy Ixy, Imin, and Imax, all measured in mm^4, 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.csvIt contains the 2D coordinates (on an arbitrary x,y local axis) for each cross section as an N×2 matrix, where N 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.csvIt contains the 3D model coordinates for each cross section as an N×3 matrix, where N 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, EXTRA, data] = longbone_Geometry (…) may also return up to five output arguments. GEOM and SMoA are 5×1 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. bone is a character vector containing the name of the bone as inferred by the longbone_Registration function. If a 3D model is not recognized, then bone is returned as 'undefined', unless the 'Force' has been opted by the user.

EXTRA is an additional scalar structure with the following fields:

  1. maxDistance
  2. maxd_V1
  3. maxd_V2
  4. MLA_opt_point_A
  5. MLA_opt_point_B
  6. diaphyseal_bending
  7. angle_20_35
  8. angle_35_50
  9. angle_50_65
  10. angle_65_80
  11. ArPerIndex20
  12. ArPerIndex35
  13. ArPerIndex50
  14. ArPerIndex65
  15. ArPerIndex80

maxDistance refers to the bone’s maximum distance measurement, as defined by the 3D points in maxd_V1 and maxd_V2. Optimized mediolateral axis points are returned in the MLA_opt_point_* fields. diaphyseal_bending contains the sum of dihedral angles (in degrees) between each pair of consecutive cross-sectional planes, which are also returned in the angle_$$_$$ fields. ArPerIndex$$ the Area-Perimeter Index for each consecutive cross section.

data is a numeric row vector containing all the measurements computed by the longbone_Geometry in tabular form to facilitate further processing. Use the longbone_Measurements function to obtain a cell array of character vectors with the definitions of the measurements in data.

When longbone_Geometry is called with output arguments, then no CSV files are generated. When called with more than three output arguments, then saving the optimized alignment points to an existing or new MPP file is also skipped.

See also: longbone_CustomGeometry, longbone_FragmentGeometry, longbone_Measurements, longbone_Registration, simple_polygon3D

Source Code: longbone_Geometry