diff --git a/ShoulderCase/@Glenoid/Glenoid.m b/ShoulderCase/@Glenoid/Glenoid.m index e0deba7..8f9c06d 100644 --- a/ShoulderCase/@Glenoid/Glenoid.m +++ b/ShoulderCase/@Glenoid/Glenoid.m @@ -1,100 +1,101 @@ classdef (Abstract) Glenoid < handle %GLENOID Summary of this class goes here % Detailed explanation goes here % Need to load surface points from Amira (or auto-segment) % Need to set anatomical calculation, and use the scapular coord.Syst % TODO % loadMatlab() properties surface % points of the glenoid surface load glenoid surface center % Glenoid center in CT coordinate system centerLocal % Glenoid center in scapula coordinate system radius centerLine posteroAnteriorLine inferoSuperiorLine depth width height anteroSuperiorAngle versionAmplitude versionOrientation version inclination retroversion + rimInclination density comment fittedSphere scapula walch end methods (Abstract) load(obj); end methods (Access = protected) % Only Scapula is allowed to construct a Glenoid function obj = Glenoid(scapula) %GLENOID Construct an instance of this class % Detailed explanation goes here obj.surface = []; obj.center = []; obj.centerLocal.x = []; obj.centerLocal.y = []; obj.centerLocal.z = []; obj.radius = []; obj.depth = []; obj.width = []; obj.height = []; obj.anteroSuperiorAngle = []; obj.versionAmplitude = []; obj.versionOrientation = []; obj.version = []; obj.inclination = []; obj.density = []; obj.comment = []; obj.fittedSphere = Sphere(); obj.scapula = scapula; obj.walch = []; end end methods function outputArg = morphology(obj) % Calculate morphological properties of the glenoid from its surface: % center, center line, radius, depth, width, height, % versionAmpl, versionOrient, version, inclination, % antero-superior angle outputArg = 1; try obj.fittedSphere.fitTo(obj.surface.points); obj.measureCenter; obj.measureCenterLocal; obj.measureCenterLine; obj.measureRadius; obj.measureDepth; obj.measureWidthAndHeight; obj.measureVersionAndInclination; obj.measureAnteroSuperiorAngle; catch outputArg = 0; end end end end diff --git a/ShoulderCase/@Glenoid/measureRimInclination.m b/ShoulderCase/@Glenoid/measureRimInclination.m new file mode 100644 index 0000000..603f82a --- /dev/null +++ b/ShoulderCase/@Glenoid/measureRimInclination.m @@ -0,0 +1,18 @@ +function measureRimInclination(obj) + % Glenoid rim inclination is the angle between the glenoid infero-superior line + % and the line that goes through Trigonum Spinae and Spino-Glenoid notch. + % + % obj.measureInferoSuperiorLine() must have been run before measuring the + % glenoid retroversion. + TStoSG = Vector(obj.scapula.trigonumSpinae, obj.scapula.spinoGlenoidNotch); + + rimInclinationRotation = vrrotvec(obj.inferoSuperiorLine.vector, TStoSG.vector); + + % Unlike glenoid retroversion angle, glenoid rim inclination method doesn't set + % the sign of this angle which should be compared to the rotation axis alignment + % with scapular PA axis. However, this alignement depends on the shoulder side. + % It's assumed that glenoid infero-superior line will always be aligned with + % scapular IS axis, and TStoSG line will always be aligned with scapular ML + % axis. Therefore glenoid rim inclination angle will always be a positive number. + obj.rimInclination = rad2deg(rimInclinationRotation(4)); +end \ No newline at end of file