Changeset 668 for trunk/src/series/civ_input.m
- Timestamp:
- Jul 15, 2013, 2:50:47 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/civ_input.m
r666 r668 155 155 set(handles.ListPairCiv2,'Value',1) 156 156 set(handles.ListPairCiv2,'String',{''}) 157 if isfield(Param,'ActionInput')158 fill_GUI(Param.ActionInput,hObject);%fill the GUI with the parameters retrieved from the input Param159 end160 157 161 158 %% prepare the GUI with input parameters … … 229 226 if isfield(SeriesData,'Time') && ~isempty(SeriesData.Time{1}) 230 227 time=SeriesData.Time{1}; 231 %transform .Time to a column vector if it is a line vector thenomenclature uses a single index: correct possible bug in xml232 % if isequal(MaxIndex_i,1) && ~isequal(MaxIndex_j,1)% .Time is a line vector233 % if numel(nom_type_read)>=2 && isempty(regexp(nom_type_read(2:end),'\D','once'))234 % time=time';235 % MaxIndex_i=MaxIndex_j;236 % MaxIndex_j=1;237 % end238 % end239 228 end 240 229 if isfield(Param.IndexRange,'TimeUnit')&&~isempty(Param.IndexRange.TimeUnit) … … 287 276 ListPairMode_Callback([], [], handles) 288 277 ListPairCiv1_Callback(hObject, eventdata, handles) 289 % for movies don't modify except if the current ref is outside index bounds 290 %if strcmp(ExtInput,'.nc')|| ~(strcmp(FileType,'mmreader')||strcmp(FileType,'VideoReader') && num_ref_i<=MaxIndex_i && num_ref_j<=MaxIndex_j) 291 % if ~isempty(i1)% if i1 has been selected by the input 292 % num_ref_i=i1;%default ref index 293 % if ~isempty(i2) 294 % num_ref_i=floor((num_ref_i+i2)/2); 295 % end 296 % if ~isempty(j1) 297 % num_ref_j=j1; 298 % if ~isempty(j2) 299 % num_ref_j=floor((num_ref_j+j2)/2); 300 % end 301 % end 302 % end 303 % if num_ref_i>MaxIndex_i||num_ref_i<MinIndex_i 304 % num_ref_i=round((MinIndex_i+MaxIndex_i)/2); 305 % end 306 % if ~isempty(num_ref_j)&&~isempty(MaxIndex_j)&& ~isempty(MinIndex_j) 307 % if (num_ref_j>MaxIndex_j||num_ref_j<MinIndex_j) 308 % num_ref_j=round((MinIndex_j+MaxIndex_j)/2); 309 % end 310 % end 311 % if isempty(num_ref_j) 312 % num_ref_j=1; 313 % end 314 % 278 279 %% introduce the stored parameters if relevant 280 if isfield(Param,'ActionInput') 281 fill_GUI(Param.ActionInput,hObject);%fill the GUI with the parameters retrieved from the input Param 282 end 283 315 284 %% set the GUI to modal: wait for OK to close 316 285 set(handles.civ_input,'WindowStyle','modal')% Make the GUI modal … … 327 296 %------------------------------------------------------------------------ 328 297 % Get default command line output from handles structure 329 varargout{1} = handles.output; 330 delete(handles.civ_input) 298 varargout{1}=[];% default output when civ_input is canceled (no 'OK') 299 if ~isempty(handles) 300 varargout{1} = handles.output; 301 delete(handles.civ_input) 302 end 331 303 332 304 % --- Executes when user attempts to close get_field. … … 910 882 find_pair_indices(PairString); 911 883 hseries=findobj(allchild(0),'Tag','series'); 912 %SeriesData=get(hseries,'UserData');913 884 hhseries=guidata(hseries); 914 885 set(hhseries.num_first_j,'String',num2str(ind1)); 915 886 set(hhseries.num_last_j,'String',num2str(ind2)); 916 887 set(hhseries.num_incr_j,'String',num2str(ind2-ind1)); 917 918 % displ_num=get(handles.ListPairCiv1,'UserData'); 919 % list_pair2=get(handles.ListPairCiv2,'String');%get the menu of image pairs 920 % if index_pair<=length(list_pair2) 921 % set(handles.ListPairCiv2,'Value',index_pair); 922 % end 923 924 925 %update MinIndex_i and last_i according to the chosen image pairs 926 % mode_list=get(handles.ListPairMode,'String'); 927 % mode_value=get(handles.ListPairMode,'Value'); 928 % mode=mode_list{mode_value}; 929 % if isequal(mode,'series(Di)') 930 % MinIndex_i=str2double(get(handles.MinIndex_i,'String')); 931 % last_i=str2double(get(handles.last_i,'String')); 932 % incr_i=str2double(get(handles.incr_i,'String')); 933 % num_i=MinIndex_i:incr_i:last_i; 934 % lastfield=str2double(get(handles.MaxIndex_i,'String')); 935 % if ~isnan(lastfield) 936 % test_find=(num_i-floor(index_pair/2)*ones(size(num_i))>0)& ... 937 % (num_i+ceil(index_pair/2)*ones(size(num_i))<=lastfield); 938 % num_i=num_i(test_find); 939 % end 940 % set(handles.MinIndex_i,'String',num2str(num_i(1))); 941 % set(handles.last_i,'String',num2str(num_i(end))); 942 % elseif isequal(mode,'series(Dj)') 943 % MinIndex_j=str2double(get(handles.MinIndex_j,'String')); 944 % last_j=str2double(get(handles.last_j,'String')); 945 % incr_j=str2double(get(handles.incr_j,'String')); 946 % num_j=MinIndex_j:incr_j:last_j; 947 % lastfield2=str2double(get(handles.MaxIndex_j,'String')); 948 % if ~isnan(lastfield2) 949 % test_find=(num_j-floor(index_pair/2)*ones(size(num_j))>0)& ... 950 % (num_j+ceil(index_pair/2)*ones(size(num_j))<=lastfield2); 951 % num_j=num_j(test_find); 952 % end 953 % set(handles.MinIndex_j,'String',num2str(num_j(1))); 954 % set(handles.last_j,'String',num2str(num_j(end))); 955 % end 888 set(handles.ListPairCiv2,'Value',get(handles.ListPairCiv1,'Value'))%civ2 selection the same as civ& by default 889 956 890 957 891 %------------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.