Changeset 883 for trunk/src/series.m
- Timestamp:
- Mar 13, 2015, 8:19:39 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series.m
r882 r883 639 639 set(handles.series,'UserData',[])%refresh the stored info 640 640 end 641 for iview=1:size(InputTable,1) 641 nbview=size(InputTable,1); 642 for iview=1:nbview 642 643 RootPath=fullfile(InputTable{iview,1},InputTable{iview,2}); 643 644 if ~exist(RootPath,'dir') 644 645 i1_series=[]; 645 %RootPath=fileparts(RootPath); %will try the upper folder646 646 RootFile=''; 647 647 else %scan the input folder … … 662 662 end 663 663 end 664 665 %% update MinIndex_i and MaxIndex_i if the input table content has been reduced in line nbre 666 MinIndex_i_table=get(handles.MinIndex_i,'Data');%retrieve the min indices in the table MinIndex 667 set(handles.MinIndex_i,'Data',MinIndex_i_table(1:nbview,:)); 668 MinIndex_j_table=get(handles.MinIndex_j,'Data');%retrieve the min indices in the table MinIndex 669 set(handles.MinIndex_j,'Data',MinIndex_j_table(1:nbview,:)); 670 MaxIndex_i_table=get(handles.MaxIndex_i,'Data');%retrieve the min indices in the table MinIndex 671 set(handles.MaxIndex_i,'Data',MaxIndex_i_table(1:nbview,:)); 672 MaxIndex_j_table=get(handles.MaxIndex_j,'Data');%retrieve the min indices in the table MinIndex 673 set(handles.MaxIndex_j,'Data',MaxIndex_j_table(1:nbview,:)); 674 PairString=get(handles.PairString,'Data');%retrieve the min indices in the table MinIndex 675 set(handles.PairString,'Data',PairString(1:nbview,:)); 676 TimeTable=get(handles.TimeTable,'Data');%retrieve the min indices in the table MinIndex 677 set(handles.TimeTable,'Data',TimeTable(1:nbview,:)); 678 664 679 %% enable field and veltype menus, in accordance with the current action 665 680 ActionName_Callback([],[], handles) … … 766 781 SeriesData.Time={}; 767 782 end 768 SeriesData.i1_series(iview+1:end)=[]; 783 if isfield(SeriesData,'i1_series') 784 SeriesData.i1_series(iview+1:end)=[]; 769 785 SeriesData.i2_series(iview+1:end)=[]; 770 786 SeriesData.j1_series(iview+1:end)=[]; … … 773 789 SeriesData.FileInfo(iview+1:end)=[]; 774 790 SeriesData.Time(iview+1:end)=[]; 775 InputTable(iview,:)=[{RootPath},{SubDir},{RootFile},{NomType},{FileExt}]; 791 end 792 InputTable(iview,:)=[{RootPath},{SubDir},{RootFile},{NomType},{FileExt}]; 776 793 if iview >1 777 794 set(handles.InputLine,'String',num2str(iview)) … … 1411 1428 Param=read_GUI_series(handles);%displayed parameters 1412 1429 SeriesData=get(handles.series,'UserData');%hidden parameters 1430 if isfield(SeriesData,'TransformInput') 1431 Param.TransformInput=SeriesData.TransformInput; 1432 end 1413 1433 if ~isfield(SeriesData,'i1_series') 1414 1434 errormsg='The input field series needs to be refreshed: press REFRESH'; … … 2403 2423 end 2404 2424 set(handles.OutputSubDir,'String',SubDirOut) 2425 set(handles.OutputSubDir,'BackgroundColor',[1 1 1])% set edit box to white color to indicate refreshment 2405 2426 set(handles.OutputDirExt,'Visible',OutputDirVisible) 2406 2427 set(handles.OutputSubDir,'Visible',OutputDirVisible) … … 2971 2992 set(handles.TransformName,'UserData',TransformPathList); 2972 2993 2994 %% create the function handle of the selected fct 2995 if ~isempty(TransformName) 2996 current_dir=pwd;%current working dir 2997 cd(TransformPathList{TransformIndex}) 2998 transform_handle=str2func(TransformName); 2999 cd(current_dir) 3000 Field.Action.RUN=0;% indicate that the transform fct is called only to get input param 3001 DataOut=feval(transform_handle,Field,[]);% execute the transform fct to get the required conditions 3002 if isfield(DataOut,'TransformInput')% used to add transform parameters at selection of the transform fct 3003 SeriesData=get(handles.series,'UserData'); 3004 SeriesData.TransformInput=DataOut.TransformInput; 3005 set(handles.series,'UserData',SeriesData) 3006 end 3007 end 3008 2973 3009 %------------------------------------------------------------------------ 2974 3010 % --- fct activated by the upper bar menu ExportConfig … … 3034 3070 Param.ActionInput.ConfigSource=filexml;% record the source of config for future info 3035 3071 SeriesData.ActionInput=Param.ActionInput; 3072 end 3073 if isfield(Param,'TransformInput')% introduce parameters specific to a transform fct 3074 SeriesData.TransformInput=Param.TransformInput; 3036 3075 end 3037 3076 if isfield(Param,'ProjObject') %introduce projection object if relevant … … 3471 3510 set(handles.InputTable,'Data',InputTable); 3472 3511 end 3512 set(handles.REFRESH,'BackgroundColor',[1 0 1])% set REFRESH button to magenta color to indicate that input refr 3473 3513 3474 3514
Note: See TracChangeset
for help on using the changeset viewer.