diff --git a/ShoulderCase/@MusclesContainer/plot.m b/ShoulderCase/@MusclesContainer/plot.m index 4c7d85c..01485e5 100644 --- a/ShoulderCase/@MusclesContainer/plot.m +++ b/ShoulderCase/@MusclesContainer/plot.m @@ -1,39 +1,39 @@ function output = plot(obj,varargin) % For now this function is specific to plotting the rotator cuff segmentation % results if nargin == 2 error('Provide the slice name and the mask name or provide nothing (auto slice and segmentations will be plotted).') elseif nargin == 3 sliceName = [varargin{1} '_ForSegmentation.png']; - maskName = [varargin{2} '.png']; + maskName = [varargin{2} '_Mask.png']; else - sliceName = 'rotatorCuff_ForSegmentation.png'; - maskName = 'auto_Mask.png'; + sliceName = 'rotatorCuffMatthieu_ForSegmentation.png'; + maskName = 'autoMatthieu_Mask.png'; end SCase = obj.shoulder.SCase; muscleNames = fields(obj.list); rotatorCuffCrossSection = imread(fullfile(obj.slicesDataPath,sliceName)); leg = {}; plotHandle(1) = imshow(rotatorCuffCrossSection); hold on colors = {'g','r','b','y'}; for i = 1:length(muscleNames) try segmentedImage = imread(fullfile(obj.list.(muscleNames{i}).maskDataPath,maskName)); catch continue end if (max(segmentedImage,[],'all') > 0) % if segmentation result is not empty leg{end+1} = muscleNames{i}; [~,plotHandle(i+1)] = contour(segmentedImage,'color',colors{i}); end end plotHandle(i+2) = legend(leg); output = plotHandle; end