diff --git a/src/Administrator_Input_Screen.m b/src/Administrator_Input_Screen.m index b3afa848..279fe867 100644 --- a/src/Administrator_Input_Screen.m +++ b/src/Administrator_Input_Screen.m @@ -588,6 +588,7 @@ function ModeSelectionPopUpMenu_Callback(hObject, eventdata, handles) %#ok if handles.myData.stage.Pos == 0 return diff --git a/src/GUI.fig b/src/GUI.fig index e19f2d35..e2dd3739 100644 Binary files a/src/GUI.fig and b/src/GUI.fig differ diff --git a/src/GUI.m b/src/GUI.m index 10dee09c..49cb8143 100644 --- a/src/GUI.m +++ b/src/GUI.m @@ -430,6 +430,11 @@ function Initiate_GUI_Elements(handles) 'BackgroundColor',myData.settings.BG_color,... 'ForegroundColor',myData.settings.FG_color,... 'Visible', 'off'); + set(handles.Refine_Register_Button,... + 'FontSize', myData.settings.FontSize,... + 'BackgroundColor',myData.settings.BG_color,... + 'ForegroundColor',myData.settings.FG_color,... + 'Visible', 'off'); set(handles.videobutton,... 'FontSize', myData.settings.FontSize,... 'BackgroundColor',myData.settings.BG_color,... @@ -483,36 +488,47 @@ function NextButtonPressed(hObj, eventdata, handles) %#ok myData=handles.myData; set(handles.NextButton, 'Enable', 'off'); set(handles.Backbutton, 'Enable', 'on'); + st = dbstack; + + % Close out current task and record duration for all task except refine + % reigstration + if myData.refineRegistration == 0 + taskinfo = myData.tasks_out{myData.iter}; + handles.myData.EndTime = clock; + taskinfo.duration = etime(handles.myData.EndTime, handles.myData.StartTime)+taskinfo.duration; + handles.myData.tasks_out{handles.myData.iter} = taskinfo; + guidata(handles.GUI, handles); + % exort output file + if ~strcmp(st(2).name,'Backbutton_Callback') - % Close out current task and record duration - taskinfo = myData.tasks_out{myData.iter}; - handles.myData.EndTime = clock; - taskinfo.duration = etime(handles.myData.EndTime, handles.myData.StartTime)+taskinfo.duration; - handles.myData.tasks_out{handles.myData.iter} = taskinfo; - guidata(handles.GUI, handles); + taskinfo.calling_function = st(1).name; + handles.myData.taskinfo = taskinfo; + guidata(handles.GUI, handles); + taskinfo.task_handle(handles.GUI); + handles = guidata(handles.GUI); + exportOutput(handles.GUI); + handles = guidata(handles.GUI); - st = dbstack; - % exort output file - if ~strcmp(st(2).name,'Backbutton_Callback') - - taskinfo.calling_function = st(1).name; - handles.myData.taskinfo = taskinfo; - guidata(handles.GUI, handles); - taskinfo.task_handle(handles.GUI); - handles = guidata(handles.GUI); - exportOutput(handles.GUI); - handles = guidata(handles.GUI); - - end - % If the completed task was a 'finish' task, then return - switch taskinfo.id - case 'finish' - - close all force - return - - end + end + % If the completed task was a 'finish' task, then return + switch taskinfo.id + case 'finish' + + close all force + return + + end + else + handles.myData.refineRegistration = 0; + taskinfo = myData.taskinfo; + taskinfo.calling_function = st(1).name; + handles.myData.taskinfo = taskinfo; + guidata(handles.GUI, handles); + taskinfo.task_handle(handles.GUI); + handles = guidata(handles.GUI); + end + % Begin the next task handles.myData.iter = handles.myData.iter+1; guidata(handles.GUI, handles); @@ -567,8 +583,12 @@ function NextButtonPressed(hObj, eventdata, handles) %#ok % offset_stage was determined during stage allignment % it compensates for any misalignment between the eyepiece % cener and the reticle center in stage coordinates - offset = int64(myData.settings.offset_stage); - stage_new = stage_new' - offset; + + % eyepiece offset + offset_stage = int64(myData.settings.offset_stage); + % registration refine offset + offset_reg_refine = int64(myData.settings.offset_reg_refine{taskinfo.slot}); + stage_new = stage_new' - offset_stage + offset_reg_refine; end taskinfo.stage_x = stage_new(1); taskinfo.stage_y = stage_new(2); @@ -787,10 +807,12 @@ function ResetViewButtonPressed(hObj, eventdata, handles) %#ok set(handles.NextButton,'enable','off'); set(handles.Fast_Register_Button,'enable','off'); set(handles.Best_Register_Button,'enable','off'); + set(handles.Refine_Register_Button,'enable','off'); handles.myData.stage = stage_move(handles.myData.stage,target_pos,handles.myData.stage.handle); set(handles.NextButton,'enable',currentNextStatus); set(handles.Fast_Register_Button,'enable','on'); set(handles.Best_Register_Button,'enable','on'); + set(handles.Refine_Register_Button,'enable','on'); end @@ -1275,4 +1297,77 @@ function exportOutput(hObj) catch ME error_show(ME) end -end \ No newline at end of file +end + + +% --- Executes on button press in Refine_Register_Button. +function Refine_Register_Button_Callback(hObject, eventdata, handles) +% hObject handle to Refine_Register_Button (see GCBO) +% eventdata reserved - to be defined in a future version of MATLAB +% handles structure with handles and user data (see GUIDATA) + + myData=handles.myData; + % clean current task elements + taskinfo = myData.taskinfo; + st = dbstack; + taskinfo.calling_function = st(1).name; + handles.myData.taskinfo = taskinfo; + guidata(handles.GUI, handles); + taskinfo.task_handle(handles.GUI); + handles = guidata(handles.GUI); + myData=handles.myData; + + % only keep slot ID and create new taskinfo + taskinfo = myData.tasks_out{myData.iter}; + slot = taskinfo.slot; + taskinfo = struct; + taskinfo.slot = slot; + taskinfo.calling_function = st(1).name; + taskinfo.rotateback = 0; + taskinfo.task = 'refine registration'; + taskinfo.task_handle = str2func('@task_refine_registration'); + taskinfo.text = 'Refine registration for this slide'; + taskinfo.highMag = 1; + myData.taskinfo = taskinfo; + myData.refineRegistration = 1; + handles.myData = myData; + guidata(handles.GUI, handles); + + % load stage data for this slide + wsi_info = myData.wsi_files{taskinfo.slot}; + WSIfile=wsi_info.fullname; + temp = textscan(wsi_info.fullname, '%s %s', 'delimiter', '.'); + stagedata_file = [char(temp{1}),'.mat']; + load(stagedata_file) + % get WSI and stage position for the first anchor + WSIanchor1 = stagedata.wsi_positions(1,:); + Stageanchor1 = stagedata.stage_positions(1,:); + + % extract high resolution WSI anchor + highMagName = [myData.registration_images_dir, num2str(taskinfo.slot), 'HighRes.tif']; + Left = WSIanchor1(1)-400; + Top = WSIanchor1(2)-400; + success = ExtractROI_BIO(wsi_info, WSIfile, highMagName,... + Left, Top, 800, 800,... + 800, 800,... + handles.myData.settings.RotateWSI,... + wsi_info.rgb_lut); + taskinfo.highMagName = highMagName; + taskinfo.ROIname = highMagName; % default is high Mag image + taskinfo.Stageanchor1 = Stageanchor1; + + % use golbal registration first achor high resolution image as low resolution anchor + lowMagName = [myData.registration_images_dir,'hres_s', num2str(taskinfo.slot), 'p1_thumb.tif']; + taskinfo.lowMagName = lowMagName; + + myData.taskinfo = taskinfo; + handles.myData = myData; + guidata(handles.GUI, handles); + + % move stage to the anchor + myData.stage = stage_move(myData.stage,Stageanchor1, myData.stage.handle); + + % get into refine registration task + taskinfo.task_handle(handles.GUI); + handles = guidata(handles.GUI); +end diff --git a/src/Stage_Allighment.fig b/src/Stage_Allighment.fig index db879001..e4fddb70 100644 Binary files a/src/Stage_Allighment.fig and b/src/Stage_Allighment.fig differ diff --git a/src/Stage_Allighment.m b/src/Stage_Allighment.m index ac66c462..9daf4736 100644 --- a/src/Stage_Allighment.m +++ b/src/Stage_Allighment.m @@ -136,6 +136,9 @@ function Stage_Allighment_OpeningFcn(hObject, eventdata, handles, varargin) %#ok current.cam_extract_w = 0; current.cam_extract_h = 0; + % Initialize offset_stage_refine + settings.offset_reg_refine{slot_i} = [0,0]; + handles.output = hObject; current.load_stage_data = zeros(1,3); handles.current = current; @@ -791,12 +794,12 @@ function take_stage1_Callback(hObject, eventdata, handles) %#ok if handles.current.load_stage_data(1) == 1 display('automatically navigate to position 1') handles.myData.stage=stage_move(handles.myData.stage,handles.myData.stagedata.stage_positions(1,:)); + handles.myData.stagedata.oldStagePosition = handles.myData.stagedata.stage_positions(1,:); set(handles.take_stage1,'String','Take Stage Position 1'); handles.current.load_stage_data(1) = 2; guidata(handles.Stage_Allighment,handles); return end - set(handles.take_stage1,'Enable','off'); take_stage(hObject, eventdata, handles); handles = guidata(handles.Stage_Allighment); @@ -812,7 +815,9 @@ function take_stage1_Callback(hObject, eventdata, handles) %#ok set(handles.current.thumb_image_handle,... 'HitTest','on',... 'ButtonDownFcn', {@thumb_image_ButtonDownFcn,handles}); - + if handles.current.reg_flag == 1 + set(handles.onePointReg,'Enable','on'); + end guidata(handles.Stage_Allighment,handles); catch ME @@ -937,6 +942,7 @@ function take_wsi1_Callback(hObject, eventdata, handles) %#ok handles.myData.stagedata.wsi_positions(1,1) = handles.current.roi_x0; handles.myData.stagedata.wsi_positions(1,2) = handles.current.roi_y0; + handles.myData.stagedata.oldWSIPosition = handles.myData.stagedata.wsi_positions(1,:); set(handles.wsi_1x,'String',handles.current.roi_x0); set(handles.wsi_1y,'String',handles.current.roi_y0); @@ -1076,8 +1082,88 @@ function take_wsi3_Callback(hObject, eventdata, handles) %#ok end +%% One point registration +% --- Executes on button press in onePointReg. +function onePointReg_Callback(hObject, eventdata, handles) +% hObject handle to onePointReg (see GCBO) +% eventdata reserved - to be defined in a future version of MATLAB +% handles structure with handles and user data (see GUIDATA) +try + if handles.take_wsi_flag==0 + desc = 'Please click on the WSI at the location corresponding to the stage position.'; + h_errordlg = errordlg(desc,'Take WSI Position 1','modal'); %#ok + return; + end + + + set(handles.onePointReg,'Enable','off'); + set(handles.current.thumb_image_handle,'HitTest','off'); + Register_ROI(handles); + handles = guidata(handles.Stage_Allighment); + + if handles.current.registration_good==0 + % Refresh the image + handles.current.thumb_image_handle = ... + image(handles.current.thumb_image,'Parent',handles.thumb_axes); + axis(handles.thumb_axes,'image'); + set(handles.current.thumb_image_handle,'HitTest','off'); + + % Reset state to repeat registration + handles.take_wsi_flag = 0; + set(handles.take_stage1,'Enable','on'); + set(handles.onePointReg,'Enable','off'); + + guidata(handles.Stage_Allighment,handles); + return; + end + % calculate WSI shift + handles.myData.stagedata.wsi_positions(1,1) = handles.current.roi_x0; + handles.myData.stagedata.wsi_positions(1,2) = handles.current.roi_y0; + WSI_x_dif = handles.myData.stagedata.wsi_positions(1,1) - handles.myData.stagedata.oldWSIPosition(1,1); + WSI_y_dif = handles.myData.stagedata.wsi_positions(1,2) - handles.myData.stagedata.oldWSIPosition(1,2); + % calculate stage shift + stage_x_dif = handles.myData.stagedata.stage_positions(1,1) - handles.myData.stagedata.oldStagePosition(1,1); + stage_y_dif = handles.myData.stagedata.stage_positions(1,2) - handles.myData.stagedata.oldStagePosition(1,2); + % shift WSI second and third points postitons + handles.myData.stagedata.wsi_positions(2,1) = handles.myData.stagedata.wsi_positions(2,1) + WSI_x_dif; + handles.myData.stagedata.wsi_positions(2,2) = handles.myData.stagedata.wsi_positions(2,2) + WSI_y_dif; + handles.myData.stagedata.wsi_positions(3,1) = handles.myData.stagedata.wsi_positions(3,1) + WSI_x_dif; + handles.myData.stagedata.wsi_positions(3,2) = handles.myData.stagedata.wsi_positions(3,2) + WSI_y_dif; + % shift stage second and third points positions + handles.myData.stagedata.stage_positions(2,1) = handles.myData.stagedata.stage_positions(2,1) + stage_x_dif; + handles.myData.stagedata.stage_positions(2,2) = handles.myData.stagedata.stage_positions(2,2) + stage_y_dif; + handles.myData.stagedata.stage_positions(3,1) = handles.myData.stagedata.stage_positions(3,1) + stage_x_dif; + handles.myData.stagedata.stage_positions(3,2) = handles.myData.stagedata.stage_positions(3,2) + stage_y_dif; + stagedata = handles.myData.stagedata; + % update GUI + set(handles.wsi_1x,'String',handles.current.roi_x0); + set(handles.wsi_1y,'String',handles.current.roi_y0); + set(handles.wsi_2x,'String',handles.myData.stagedata.wsi_positions(2,1)); + set(handles.wsi_2y,'String',handles.myData.stagedata.wsi_positions(2,2)); + set(handles.wsi_3x,'String',handles.myData.stagedata.wsi_positions(3,1)); + set(handles.wsi_3y,'String',handles.myData.stagedata.wsi_positions(3,2)); + % Save the current stagedata + save(handles.myData.stagedata.stagedata_file,'stagedata'); + + % Prepare for the next step + % set(handles.refine_registration,'Enable','on'); - + % Report success to Admin_Input + handles_old = guidata(handles.Administrator_Input_Screen); + handles_old.current.success(handles.current.slot_i) = 1; + handles_old.myData = handles.myData; + guidata(handles.Administrator_Input_Screen,handles_old); + % Close the image preview figure + close(handles.cam_figure) + delete(handles.cam) + + close(handles.Stage_Allighment); + return + +catch ME + error_show(ME) +end +end %% -------- Abort button callback @@ -1371,7 +1457,7 @@ function adjust_camera_color(handles) 'Style', 'pushbutton',... 'Units', 'characters',... 'Position', position,... - 'String', 'Feature Centered in Eyepiece',... + 'String', 'Adjust color',... 'Callback', @adjustColor_callback); adjusting_color(handles.cam); catch ME @@ -1434,4 +1520,4 @@ function adjusting_color(cam) close(waitingBar); end end -end \ No newline at end of file +end diff --git a/src/tasks/task_checkMof4.m b/src/tasks/task_checkMof4.m index e20cba3f..dfa36fcf 100644 --- a/src/tasks/task_checkMof4.m +++ b/src/tasks/task_checkMof4.m @@ -157,7 +157,8 @@ function task_checkMof4(hObj) case {'NextButtonPressed', ... 'PauseButtonPressed',... - 'Backbutton_Callback'} % Clean up the task elements + 'Backbutton_Callback',... + 'Refine_Register_Button_Callback'} % Clean up the task elements % Hide image and management buttons taskmgt_default(handles, 'off'); diff --git a/src/tasks/task_count.m b/src/tasks/task_count.m index d7e51a1f..7412ccf9 100644 --- a/src/tasks/task_count.m +++ b/src/tasks/task_count.m @@ -63,7 +63,8 @@ function task_count(hObj) case {'NextButtonPressed', ... 'PauseButtonPressed',... - 'Backbutton_Callback'} % Clean up the task elements + 'Backbutton_Callback',... + 'Refine_Register_Button_Callback'} % Clean up the task elements % Hide image and management buttons diff --git a/src/tasks/task_count2_imagescope.m b/src/tasks/task_count2_imagescope.m index 9bcf1224..6770cf47 100644 --- a/src/tasks/task_count2_imagescope.m +++ b/src/tasks/task_count2_imagescope.m @@ -91,7 +91,8 @@ function task_count2_imagescope(hObj) uicontrol(handles.editCount); case {'NextButtonPressed',... 'PauseButtonPressed',... - 'Backbutton_Callback'} % Clean up the task elements + 'Backbutton_Callback',... + 'Refine_Register_Button_Callback'} % Clean up the task elements % Hide image and management buttons diff --git a/src/tasks/task_count_imagescope.m b/src/tasks/task_count_imagescope.m index 1536cf17..da06bffb 100644 --- a/src/tasks/task_count_imagescope.m +++ b/src/tasks/task_count_imagescope.m @@ -86,7 +86,8 @@ function task_count(hObj) case {'NextButtonPressed', ... 'PauseButtonPressed',... - 'Backbutton_Callback'} % Clean up the task elements + 'Backbutton_Callback',... + 'Refine_Register_Button_Callback'} % Clean up the task elements % Hide image and management buttons diff --git a/src/tasks/task_globalAndBestReg.m b/src/tasks/task_globalAndBestReg.m index 1c620b81..e9df2016 100644 --- a/src/tasks/task_globalAndBestReg.m +++ b/src/tasks/task_globalAndBestReg.m @@ -101,7 +101,8 @@ function task_globalAndBestRegPhoto(hObj) case {'NextButtonPressed',... 'PauseButtonPressed',... - 'Backbutton_Callback'} % Clean up the task elements + 'Backbutton_Callback',... + 'Refine_Register_Button_Callback'} % Clean up the task elements % Hide image and management buttons diff --git a/src/tasks/task_globalAndBestRegPhoto.m b/src/tasks/task_globalAndBestRegPhoto.m index d3ae092f..56fa167d 100644 --- a/src/tasks/task_globalAndBestRegPhoto.m +++ b/src/tasks/task_globalAndBestRegPhoto.m @@ -132,7 +132,8 @@ function task_globalAndBestRegPhoto(hObj) case {'NextButtonPressed',... 'PauseButtonPressed',... - 'Backbutton_Callback'} % Clean up the task elements + 'Backbutton_Callback',... + 'Refine_Register_Button_Callback'} % Clean up the task elements % Hide image and management buttons diff --git a/src/tasks/task_globalReg_test.m b/src/tasks/task_globalReg_test.m index 074e8056..9acdadaf 100644 --- a/src/tasks/task_globalReg_test.m +++ b/src/tasks/task_globalReg_test.m @@ -71,7 +71,8 @@ function task_globalReg_test(hObj) case {'NextButtonPressed', ... 'PauseButtonPressed',... - 'Backbutton_Callback'} % Clean up the task elements + 'Backbutton_Callback',... + 'Refine_Register_Button_Callback'} % Clean up the task elements % Hide image and management buttons diff --git a/src/tasks/task_mark1.m b/src/tasks/task_mark1.m index 5290e81e..961c44ac 100644 --- a/src/tasks/task_mark1.m +++ b/src/tasks/task_mark1.m @@ -194,7 +194,8 @@ function task_mark1(hObj) case {'NextButtonPressed', ... 'PauseButtonPressed',... - 'Backbutton_Callback'} % Clean up the task elements + 'Backbutton_Callback',... + 'Refine_Register_Button_Callback'} % Clean up the task elements % Hide image and management buttons taskmgt_default(handles, 'off'); diff --git a/src/tasks/task_mark1_out.m b/src/tasks/task_mark1_out.m index 838d32bd..83716a6d 100644 --- a/src/tasks/task_mark1_out.m +++ b/src/tasks/task_mark1_out.m @@ -189,7 +189,8 @@ function task_mark1_out(hObj) case {'NextButtonPressed', ... 'PauseButtonPressed',... - 'Backbutton_Callback'} % Clean up the task elements + 'Backbutton_Callback',... + 'Refine_Register_Button_Callback'} % Clean up the task elements % Hide image and management buttons taskmgt_default(handles, 'off'); diff --git a/src/tasks/task_mitotic_counts.m b/src/tasks/task_mitotic_counts.m index a6215814..d4558e5f 100644 --- a/src/tasks/task_mitotic_counts.m +++ b/src/tasks/task_mitotic_counts.m @@ -213,7 +213,8 @@ function task_mitotic_counts( hObj ) case {'NextButtonPressed', ... 'PauseButtonPressed',... - 'Backbutton_Callback'} % Clean up the task elements + 'Backbutton_Callback',... + 'Refine_Register_Button_Callback'} % Clean up the task elements % Hide image and management buttons diff --git a/src/tasks/task_mitotic_expert.m b/src/tasks/task_mitotic_expert.m index b8693262..de75d573 100644 --- a/src/tasks/task_mitotic_expert.m +++ b/src/tasks/task_mitotic_expert.m @@ -315,7 +315,8 @@ function task_mitotic_expert( hObj ) case {'NextButtonPressed', ... 'PauseButtonPressed',... - 'Backbutton_Callback'} % Clean up the task elements + 'Backbutton_Callback',... + 'Refine_Register_Button_Callback'} % Clean up the task elements taskmgt_default(handles, 'off'); handles = guidata(hObj); % Hide image and management buttons diff --git a/src/tasks/task_mitotic_train.m b/src/tasks/task_mitotic_train.m index b947afad..643c9bc9 100644 --- a/src/tasks/task_mitotic_train.m +++ b/src/tasks/task_mitotic_train.m @@ -309,7 +309,8 @@ function task_mitotic_train( hObj ) case {'NextButtonPressed', ... 'PauseButtonPressed',... - 'Backbutton_Callback'} % Clean up the task elements + 'Backbutton_Callback',... + 'Refine_Register_Button_Callback'} % Clean up the task elements taskmgt_default(handles, 'off'); handles = guidata(hObj); % Hide image and management buttons diff --git a/src/tasks/task_radio1of4.m b/src/tasks/task_radio1of4.m index cf87638b..58f3c7fa 100644 --- a/src/tasks/task_radio1of4.m +++ b/src/tasks/task_radio1of4.m @@ -89,7 +89,8 @@ function task_radio1of4(hObj) case {'NextButtonPressed', ... 'PauseButtonPressed',... - 'Backbutton_Callback'} % Clean up the task elements + 'Backbutton_Callback',... + 'Refine_Register_Button_Callback'} % Clean up the task elements % Hide image and management buttons taskmgt_default(handles, 'off'); diff --git a/src/tasks/task_registration_test.m b/src/tasks/task_registration_test.m index 2dea9191..c97eb62a 100644 --- a/src/tasks/task_registration_test.m +++ b/src/tasks/task_registration_test.m @@ -187,7 +187,8 @@ function task_registration_test(hObj) case {'NextButtonPressed',... 'PauseButtonPressed',... - 'Backbutton_Callback'} % Clean up the task elements + 'Backbutton_Callback',... + 'Refine_Register_Button_Callback'} % Clean up the task elements % Hide image and management buttons diff --git a/src/tasks/task_slider.m b/src/tasks/task_slider.m index d444a353..8e8ed170 100644 --- a/src/tasks/task_slider.m +++ b/src/tasks/task_slider.m @@ -123,7 +123,8 @@ function task_slider(hObj) case {'NextButtonPressed', ... 'PauseButtonPressed',... - 'Backbutton_Callback'} % Clean up the task elements + 'Backbutton_Callback',... + 'Refine_Register_Button_Callback'} % Clean up the task elements % Hide image and management buttons taskmgt_default(handles, 'off'); diff --git a/src/tasks/task_slider_imagescope.m b/src/tasks/task_slider_imagescope.m index e1e69db4..fc60304f 100644 --- a/src/tasks/task_slider_imagescope.m +++ b/src/tasks/task_slider_imagescope.m @@ -138,7 +138,8 @@ function task_slider(hObj) case {'NextButtonPressed', ... 'PauseButtonPressed',... - 'Backbutton_Callback'} % Clean up the task elements + 'Backbutton_Callback',... + 'Refine_Register_Button_Callback'} % Clean up the task elements % Hide image and management buttons taskmgt_default(handles, 'off'); diff --git a/src/tasks/taskmgt_default.m b/src/tasks/taskmgt_default.m index cb7e62fb..8edd9499 100644 --- a/src/tasks/taskmgt_default.m +++ b/src/tasks/taskmgt_default.m @@ -26,6 +26,7 @@ function taskmgt_default(handles, on_off) if strcmpi(handles.myData.mode_desc,'MicroRT') set(handles.Best_Register_Button, 'Visible',on_off); set(handles.Fast_Register_Button, 'Visible',on_off); + set(handles.Refine_Register_Button, 'Visible',on_off); set(handles.videobutton, 'Visible',on_off); elseif strcmpi(handles.myData.mode_desc,'TrackingView') set(handles.videobutton, 'Visible',on_off);