diff --git a/plotting/matRad_plotVoiContourSlice.m b/plotting/matRad_plotVoiContourSlice.m index 604b774d6..02062341e 100644 --- a/plotting/matRad_plotVoiContourSlice.m +++ b/plotting/matRad_plotVoiContourSlice.m @@ -80,7 +80,7 @@ C = cst{s,7}{slice,plane}; else %If we do not have precomputed contours available, then compute them - mask = zeros(size(ct{ctIndex})); + mask = zeros(ct.cubeDim); mask(cst{s,4}{ctIndex}) = 1; if plane == 1 && any(any(mask(slice,:,:) > 0)) diff --git a/tools/matRad_plotSliceWrapper.m b/tools/matRad_plotSliceWrapper.m index feffef7a8..698e84dd4 100644 --- a/tools/matRad_plotSliceWrapper.m +++ b/tools/matRad_plotSliceWrapper.m @@ -117,7 +117,7 @@ %plot VOI contours if ~isempty(cst) - hContour = matRad_plotVoiContourSlice(axesHandle,cst,ct.cubeHU,cubeIdx,voiSelection,plane,slice,contourColorMap,varargin{:}); + hContour = matRad_plotVoiContourSlice(axesHandle,cst,ct,cubeIdx,voiSelection,plane,slice,contourColorMap,varargin{:}); if boolPlotLegend visibleOnSlice = (~cellfun(@isempty,hContour));