classdef (Abstract) Scapula < handle %SCAPULA Summary of this class goes here % This class defines the scapula. Landmarks are used to define its % coordinate system. It includes the glenoid object. properties angulusInferior % Landmark Angulus Inferior read from amira angulusInferiorLocal % Same as above, expressed the scapular coordinate system rather than the CT coordinate system trigonumSpinae % Landmark Trigonum Spinae Scapulae (the midpoint of the triangular surface on the medial border of the scapula in line with the scaoular spine read from amira processusCoracoideus % Landmark Processus Coracoideus (most lateral point) read from amira acromioClavicular % Landmark Acromio-clavicular joint (most lateral part on acromion)read from amira angulusAcromialis % Landmark Angulus Acromialis (most laterodorsal point) read from amira spinoGlenoidNotch % Landmark Spino-glenoid notch read from amira pillar % 5 landmarks on the pillar groove % 5 landmarks on the scapula (supraspinatus) groove friedmansLine % Line that goes through trigonumSpinae end the glenoid center coordSys % Scapular coordinate system plane % Plane class segmentation % either none 'N', manual 'M' or automatic 'A' surface % surface points and triangles of the scapula glenoid % Glenoid class acromion % Acromion class comment % any comment shoulder end methods (Abstract) load(obj); createGlenoid(obj); end methods (Access = protected) function obj = Scapula(shoulder) %SCAPULA Construct an instance of this class % Constructor of the scapula object, sets all properties to % zero. obj.shoulder = shoulder; obj.angulusInferior = []; obj.angulusInferiorLocal = []; obj.trigonumSpinae = []; obj.processusCoracoideus = []; obj.acromioClavicular = []; obj.angulusAcromialis = []; obj.spinoGlenoidNotch = []; obj.pillar = []; obj.groove = []; obj.coordSys = CoordinateSystemScapula(); obj.plane = Plane(); obj.segmentation = 'N'; obj.surface = []; obj.createGlenoid(); obj.acromion = Acromion(obj); obj.acromion.scapula = obj; obj.comment = ''; end end methods function output = coordSysSet(obj) try obj.setCoordinateSystemWithLandmarks(); catch ME warning(ME.message); output = 0; end % To enable retro compatibility with scapula.coordSysSet former % implementation, the two following commands are called here obj.setShoulderSideWithCoordinateSystem; obj.angulusInferiorLocal = obj.coordSys.express(obj.angulusInferior); output = 1; end function measurePlane(obj) % Scapular plane is fitted on 3 points (angulusInferior, % trigonumSpinae, most laretal scapular goove landmark). inferior = obj.angulusInferior; medial = obj.trigonumSpinae; mostLateralGrooveIndex = findLongest3DVector(medial-obj.groove); mostLateralGroovePoint = obj.groove(mostLateralGrooveIndex(1),:); obj.plane.fit([inferior; medial; mostLateralGroovePoint]); anterior = obj.processusCoracoideus; posterior = obj.angulusAcromialis; obj.plane.normal = orientVectorToward(obj.plane.normal,(anterior-posterior)); end function setShoulderSideWithCoordinateSystem(obj) % The scapula coordinate system is right-handed for the right shoulder only if obj.coordSys.isRightHanded obj.shoulder.side = 'R'; return elseif obj.coordSys.isLeftHanded obj.shoulder.side = 'L'; return end warning(['Couldn''t find the shoulder side by evaluating the scapula',... 'coordinate system.']); end end end