@@ -180,7 +180,7 @@ function GUI_OpeningFcn(hObj, eventdata, handles, varargin)
180180 % The mode_index and the filename for the test are extracted from the
181181 % cell structure varargin. varargin stores the input arguments for the
182182 % whole Matlab application
183- addpath(' gui_graphics' , ' icc_profiles' , ' tasks' );
183+ addpath(' gui_graphics' , ' icc_profiles' , ' tasks' , ' stages/Prior ' , ' stages/Ludl ' );
184184 handles_old = varargin{1 };
185185 handles.Administrator_Input_Screen = handles_old .Administrator_Input_Screen ;
186186 myData = handles_old .myData ;
@@ -198,7 +198,6 @@ function GUI_OpeningFcn(hObj, eventdata, handles, varargin)
198198 handles.reticle = 1 ;
199199 settings = myData .settings ;
200200 guidata(handles .GUI , handles )
201-
202201 % Open communications to camera and begin preview
203202 % Open communications to stage
204203 switch myData .mode_desc
@@ -213,13 +212,7 @@ function GUI_OpeningFcn(hObj, eventdata, handles, varargin)
213212 % close(cam_figure)
214213
215214 % Open communications to stage
216- stage_label = handles .myData .stage .label ;
217- if strcmp(stage_label(end - 4 : end ),' Prior' )
218- handles.myData.stage = stage_open_prior(handles .myData .stage .label );
219- else
220215 handles.myData.stage = stage_open(handles .myData .stage .label );
221- end
222- % handles.myData.stage = stage_open(handles.myData.stage.label);
223216 % To close:
224217 % delete(handles.stage)
225218 % If communications with the stage cannot be established,
@@ -562,13 +555,7 @@ function NextButtonPressed(hObj, eventdata, handles) %#ok<DEFNU>
562555 end
563556 taskinfo.stage_x = stage_new(1 );
564557 taskinfo.stage_y = stage_new(2 );
565- stage_label = handles .myData .stage .label ;
566- if strcmp(stage_label(end - 4 : end ),' Prior' )
567- myData.stage = stage_move_prior(myData .stage ,stage_new , myData .stage .handle );
568- else
569- myData.stage = stage_move(myData .stage ,stage_new , myData .stage .handle );
570- end
571- % myData.stage = stage_move(myData.stage,stage_new, myData.stage.handle);
558+ myData.stage = stage_move(myData .stage ,stage_new , myData .stage .handle );
572559 taskimage_load(hObj );
573560 handles = guidata(handles .GUI );
574561 set(handles .iH ,' visible' ,' off' );
@@ -736,13 +723,7 @@ function ResetViewButtonPressed(hObj, eventdata, handles) %#ok<DEFNU>
736723 set(handles .NextButton ,' enable' ,' off' );
737724 set(handles .Fast_Register_Button ,' enable' ,' off' );
738725 set(handles .Best_Register_Button ,' enable' ,' off' );
739- stage_label = handles .myData .stage .label ;
740- if strcmp(stage_label(end - 4 : end ),' Prior' )
741- handles.myData.stage = stage_move_prior(handles .myData .stage ,target_pos ,handles .myData .stage .handle );
742- else
743- handles.myData.stage = stage_move(handles .myData .stage ,target_pos ,handles .myData .stage .handle );
744- end
745- % handles.myData.stage = stage_move(handles.myData.stage,target_pos,handles.myData.stage.handle);
726+ handles.myData.stage = stage_move(handles .myData .stage ,target_pos ,handles .myData .stage .handle );
746727 set(handles .NextButton ,' enable' ,currentNextStatus );
747728 set(handles .Fast_Register_Button ,' enable' ,' on' );
748729 set(handles .Best_Register_Button ,' enable' ,' on' );
@@ -798,13 +779,7 @@ function Fast_Register_Button_Callback(hObject, eventdata, handles) %#ok<DEFNU>
798779 [roi_h , roi_w ] = size(roi_image );
799780
800781 % Get the stage position
801- stage_label = handles .myData .stage .label ;
802- if strcmp(stage_label(end - 4 : end ),' Prior' )
803- handles.myData.stage = stage_get_pos_prior(handles .myData .stage ,myData .stage .handle );
804- else
805- handles.myData.stage = stage_get_pos(handles .myData .stage ,myData .stage .handle );
806- end
807- % handles.myData.stage = stage_get_pos(handles.myData.stage,myData.stage.handle);
782+ handles.myData.stage = stage_get_pos(handles .myData .stage ,myData .stage .handle );
808783 stage_current = int64(handles .myData .stage .Pos );
809784
810785 % Cross correlate the stage and wsi images
@@ -833,12 +808,7 @@ function Fast_Register_Button_Callback(hObject, eventdata, handles) %#ok<DEFNU>
833808 stage_new = stage_current + offset_roi ;
834809 offset_stage = int64(myData .settings .offset_stage );
835810 stage_new = stage_new - offset_stage ;
836- if strcmp(stage_label(end - 4 : end ),' Prior' )
837- handles.myData.stage = stage_move_prior(handles .myData .stage ,stage_new , handles .myData .stage .handle );
838- else
839- handles.myData.stage = stage_move(handles .myData .stage ,stage_new , handles .myData .stage .handle );
840- end
841- % handles.myData.stage = stage_move(handles.myData.stage,stage_new, handles.myData.stage.handle);
811+ handles.myData.stage = stage_move(handles .myData .stage ,stage_new , handles .myData .stage .handle );
842812catch ME
843813 error_show(ME )
844814end
@@ -1102,25 +1072,12 @@ function Best_Register_Button_Callback(hObject, eventdata, handles)
11021072 [roi_h , roi_w ] = size(roi_image );
11031073
11041074 % Get the stage position and snap a picture: cam_image
1105- stage_label = handles .myData .stage .label ;
1106- if strcmp(stage_label(end - 4 : end ),' Prior' )
1107- handles.myData.stage = stage_get_pos_prior(handles .myData .stage ,handles .myData .stage .handle );
1108- else
1109- handles.myData.stage = stage_get_pos(handles .myData .stage ,handles .myData .stage .handle );
1110- end
1111- % handles.myData.stage = stage_get_pos(handles.myData.stage,handles.myData.stage.handle);
1075+ handles.myData.stage = stage_get_pos(handles .myData .stage ,handles .myData .stage .handle );
11121076 stage_current = int64(handles .myData .stage .Pos );
11131077 offset_stage = int64(myData .settings .offset_stage );
11141078 stage_new = stage_current + offset_stage ;
1115- if strcmp(stage_label(end - 4 : end ),' Prior' )
1116- handles.myData.stage = stage_move_prior(handles .myData .stage ,stage_new ,handles .myData .stage .handle );
1117- handles.myData.stage = stage_get_pos_prior(handles .myData .stage ,handles .myData .stage .handle );
1118- else
1119- handles.myData.stage = stage_move(handles .myData .stage ,stage_new ,handles .myData .stage .handle );
1120- handles.myData.stage = stage_get_pos(handles .myData .stage ,handles .myData .stage .handle );
1121- end
1122- % handles.myData.stage = stage_move(handles.myData.stage,stage_new,handles.myData.stage.handle);
1123- % handles.myData.stage = stage_get_pos(handles.myData.stage,handles.myData.stage.handle);
1079+ handles.myData.stage = stage_move(handles .myData .stage ,stage_new ,handles .myData .stage .handle );
1080+ handles.myData.stage = stage_get_pos(handles .myData .stage ,handles .myData .stage .handle );
11241081 stage_current = int64(handles .myData .stage .Pos );
11251082 cam_image = camera_take_image(handles .cam );
11261083
@@ -1174,12 +1131,7 @@ function Best_Register_Button_Callback(hObject, eventdata, handles)
11741131 stage_new = stage_current + offset_roi ;
11751132 offset_stage = int64(myData .settings .offset_stage );
11761133 stage_new = stage_new - offset_stage ;
1177- if strcmp(stage_label(end - 4 : end ),' Prior' )
1178- handles.myData.stage = stage_move_prior(handles .myData .stage ,stage_new , handles .myData .stage .handle );
1179- else
1180- handles.myData.stage = stage_move(handles .myData .stage ,stage_new , handles .myData .stage .handle );
1181- end
1182- % handles.myData.stage = stage_move(handles.myData.stage,stage_new, handles.myData.stage.handle);
1134+ handles.myData.stage = stage_move(handles .myData .stage ,stage_new , handles .myData .stage .handle );
11831135catch ME
11841136 error_show(ME )
11851137end
0 commit comments