diff --git a/ShoulderCase/@Shoulder/Shoulder.m b/ShoulderCase/@Shoulder/Shoulder.m index 359303b..abbd871 100644 --- a/ShoulderCase/@Shoulder/Shoulder.m +++ b/ShoulderCase/@Shoulder/Shoulder.m @@ -1,101 +1,101 @@ classdef Shoulder < handle % Contains all the shoulder parts (bones) and their measurements. % % Can be used to plot an overview of the case. properties side = ""; % R or L landmarksAcquisition = ""; + empty = true; scapula humerus rotatorCuff CTScan = ""; comment = ""; - empty = true; SCase end methods function obj = Shoulder(SCase, shoulderSide, landmarksAcquisition) obj.side = shoulderSide; obj.landmarksAcquisition = landmarksAcquisition; obj.SCase = SCase; if not(isfolder(obj.dataPath())) mkdir(obj.dataPath()); end obj.humerus = Humerus(obj); obj.rotatorCuff = RotatorCuff(obj); if landmarksAcquisition == "auto" obj.scapula = ScapulaAuto(obj); elseif landmarksAcquisition == "manual" obj.scapula = ScapulaManual(obj); end end function output = get.empty(obj) output = isempty(obj); end function output = isempty(obj) % None of the shoulder measurements can be made with an empty scapula. % Scapula emptiness is due to missing landmarks coordinates. output = isempty(obj.scapula); end function output = explicitSide(obj) explicitSide = obj.side; explicitSide = replace(explicitSide, "R", "right"); explicitSide = replace(explicitSide, "L", "left"); output = explicitSide; end function output = dataPath(obj) output = fullfile(... obj.SCase.dataMatlabPath,... "shoulders",... obj.explicitSide,... obj.landmarksAcquisition); end function loadData(obj) Logger.newDelimitedSection("Load data"); Logger.logn(""); recursiveMethodCall(obj, "loadData", {obj.SCase}); Logger.closeSection(); end function morphology(obj) Logger.newDelimitedSection("Morphology"); Logger.logn(""); recursiveMethodCall(obj, "morphology", {obj.SCase}); Logger.closeSection(); end function measureFirst(obj) Logger.newDelimitedSection("First measurements"); Logger.logn(""); recursiveMethodCall(obj, "measureFirst", {obj.SCase}); Logger.closeSection(); end function measureSecond(obj) Logger.newDelimitedSection("Second measurements"); Logger.logn(""); recursiveMethodCall(obj, "measureSecond", {obj.SCase}); Logger.closeSection(); end function measureThird(obj) Logger.newDelimitedSection("Third measurements"); Logger.logn(""); recursiveMethodCall(obj, "measureThird", {obj.SCase}); Logger.closeSection(); end function measureDensity(obj) obj.scapula.genoid.calcDensity(); end function measureMuscles(obj) obj.rotatorCuff.sliceAndSegment(); obj.rotatorCuff.measure("rotatorCuffMatthieu", "autoMatthieu"); end end end