diff --git a/@Viewer/Viewer.m b/@Viewer/Viewer.m index 360cae18d99802f8a7faedc70590411ed1d88750..ed789acd46986137661b29cfff6d7947ea0a5130 100644 --- a/@Viewer/Viewer.m +++ b/@Viewer/Viewer.m @@ -15,9 +15,7 @@ classdef Viewer < handle h = [] im = [] ax = [] - lx = [] - ly = [] - + slices end @@ -112,19 +110,6 @@ classdef Viewer < handle obj.im = imagesc(obj.ax,obj.slices{cv{:}}); colormap gray; axis image; - x = obj.curPos(1); - y = obj.curPos(2); - - xmin = min(obj.ax.XLim); - xmax = max(obj.ax.XLim); - ymin = min(obj.ax.YLim); - ymax = max(obj.ax.YLim); - - hold on - obj.lx = plot(obj.ax,[x,x],[ymin,ymax],'r-','Visible','off'); - obj.ly = plot(obj.ax,[xmin,xmax],[y,y],'r-','Visible','off'); - hold off - obj.h.KeyPressFcn = @obj.KeyPressCallback; obj.h.WindowButtonDownFcn = @obj.ButtonDownCallback; obj.h.WindowButtonUpFcn = @obj.ButtonUpCallback; @@ -176,19 +161,6 @@ classdef Viewer < handle obj.im.AlphaData = double(any(~isnan(obj.im.CData),3)); obj.ax.CLim = obj.range_; - - x = obj.curPos(1); - y = obj.curPos(2); - - xmin = min(obj.ax.XLim); - xmax = max(obj.ax.XLim); - ymin = min(obj.ax.YLim); - ymax = max(obj.ax.YLim); - - obj.lx.XData = [x,x]; - obj.lx.YData = [ymin,ymax]; - obj.ly.XData = [xmin,xmax]; - obj.ly.YData = [y,y]; end end @@ -213,11 +185,6 @@ classdef Viewer < handle end function ButtonDownCallback(obj,~,~) - if strcmp(obj.h.SelectionType,'alt') - obj.lx.Visible = 'on'; - obj.ly.Visible = 'on'; - end - refView = obj.curView; refPos = obj.ax.CurrentPoint(1,[2 1]); @@ -226,11 +193,6 @@ classdef Viewer < handle end function ButtonUpCallback(obj,~,~) - if strcmp(obj.h.SelectionType,'alt') - obj.lx.Visible = 'off'; - obj.ly.Visible = 'off'; - end - obj.h.WindowButtonMotionFcn = ''; end