csg-toolkit

csg-toolkit

1.4.0 2025-04-16

A GNU Octave package for analyzing the long bone diaphyseal cross-sectional geometry of Humerus, Ulna, Femur, and Tibia bones from 3D triangular meshes stored in Wavefront OBJ file format.

Select Category:

CSG Analysis

longbone_Analysis A wrapper for batch processing with longbone_*Geometry functions.
longbone_AnatomicalNormals Compute the normals of the transverse and coronal planes.
longbone_AnatomicalPosition Rotate into anatomical posistion.
longbone_CustomGeometry This function analyzes the cross-sectional geometry of an intact humerus, ulna, femur, or tibia bone along its longitudinal axis at custom intervals.
longbone_FragmentGeometry This function analyzes the cross-sectional geometry of any diaphyseal long bone fragment at custom intervals defined by user defined points on the bone's surface.
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_Measurements Measurement names of long bone geometry data.
longbone_Registration Determine long bone type and register initial alignment points.
simple_polygon3D This function takes the 3D coordinates of a planar cross section along with with its normal and calculates some of its geometric properties such as cross sectional area, perimeter and principal second moments of area.

Mesh Operations

longbone_maxDistance Calculate the maximum distance of a long bone 3D model.
longbone_Scaling Scale triangular meshes stored in Wavefront OBJ format.
meshArea Compute the surface area of a triangular mesh based on itsvertices and faces provided as input arguments.
meshBarycenter Compute the 3D coordinates of the polygon barycenter of a triangular 3D Mesh based on its vertices and faces provided as input arguments.
meshRotation Rotate a 3D mesh.
meshSection Compute the sectioning points of triangular 3D mesh.
read_MeshlabPoints Read 3D coordinates from a MeshLab PickedPoints file.
write_MeshlabPoints Write 3D coordinates in a MeshLab PickedPoints file.
readObj This function reads a triangular 3D Mesh from Wavefront OBJ file and returns its elements into a variable number of output arguments.
renameObj Rename an OBJ file containing a pure triangular mesh in Wavefront 3D model file format and its associated material library and texture map files.
writeObj This function saves a triangular 3D Mesh in a Wavefront OBJ file format according to its elements provided as input arguments.

Utilities

LongBone Class for manipulating 3-D triangular meshes of human long bones.
longbone_Sex This function analyzes the geometry of an intact humerus, ulna, femur, or tibia bone using the 'longbone_Geometry' function and estimates the biological sex of the individual the bone belongs to.

Visualization

inspect_CSG Batch inspect the CSG properties of previously analyzed long bones.
visualize_CrossSections Plot cross sectional contours and their CSG properties for a given sample.