diff --git a/ShoulderCase/@Glenoid/Glenoid.m b/ShoulderCase/@Glenoid/Glenoid.m index 887c3a2..4b8005d 100644 --- a/ShoulderCase/@Glenoid/Glenoid.m +++ b/ShoulderCase/@Glenoid/Glenoid.m @@ -1,110 +1,114 @@ 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 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 = []; beta = []; density = []; comment = []; walch = []; fittedSphere = []; scapula = []; end methods function obj = Glenoid(scapula) obj.fittedSphere = Sphere(); obj.scapula = scapula; end function output = loadData(obj) % Call methods that can be run after the ShoulderCase object has % been instanciated. + if obj.scapula.isempty() + output = false; + return + end success = Logger.timeLogExecution(... "Glenoid load surface: ",... @(obj) obj.loadSurface(), obj); output = success; end function output = morphology(obj) % Call methods that can be run after loadData() methods has been run by % all ShoulderCase objects. success = Logger.timeLogExecution(... "Glenoid sphere fitting: ",... @(obj) obj.fittedSphere.fitTo(obj.surface.points), obj); success = success & Logger.timeLogExecution(... "Glenoid center: ",... @(obj) obj.measureCenter(), obj); success = success & Logger.timeLogExecution(... "Glenoid radius: ",... @(obj) obj.measureRadius(), obj); output = success; end function output = measureFirst(obj) % Call methods that can be run after morphology() methods has been run by % all ShoulderCase objects. success = Logger.timeLogExecution(... "Glenoid center local: ",... @(obj) obj.measureCenterLocal(), obj); success = success & Logger.timeLogExecution(... "Glenoid center line: ",... @(obj) obj.measureCenterLine(), obj); success = success & Logger.timeLogExecution(... "Glenoid depth: ",... @(obj) obj.measureDepth(), obj); success = success & Logger.timeLogExecution(... "Glenoid width and height: ",... @(obj) obj.measureWidthAndHeight(), obj); success = success & Logger.timeLogExecution(... "Glenoid version and inclination: ",... @(obj) obj.measureVersionAndInclination(), obj); success = success & Logger.timeLogExecution(... "Glenoid antero-superior angle: ",... @(obj) obj.measureAnteroSuperiorAngle(), obj); success = success & Logger.timeLogExecution(... "Glenoid infero-superior line: ",... @(obj) obj.measureInferoSuperiorLine(), obj); success = success & Logger.timeLogExecution(... "Glenoid beta angle: ",... @(obj) obj.measureBetaAngle(), obj); success = success & Logger.timeLogExecution(... "Glenoid postero-anterior line: ",... @(obj) obj.measurePosteroAnteriorLine(), obj); success = success & Logger.timeLogExecution(... "Glenoid rim inclination: ",... @(obj) obj.measureRimInclination(), obj); output = success; end function output = measureSecond(obj) % Call methods that can be run after measureFirst() methods has been run % by all ShoulderCase objects. success = Logger.timeLogExecution(... "Glenoid retroversion: ",... @(obj) obj.measureRetroversion(), obj); output = success; end end end