Changeset 399 for trunk/src/uvmat.m


Ignore:
Timestamp:
Apr 27, 2012, 12:28:47 PM (9 years ago)
Author:
sommeria
Message:

implementation of thin plate interpolation (proj on planes with mode 'filter'), rationalisation of variable formats in civ_matlab

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/uvmat.m

    r398 r399  
    310310        end
    311311        if isfield(input,'FieldsString')
    312 %             set(handles.Fields,'Value',1)
    313312            UvData.FieldsString=input.FieldsString;
    314313        end
     
    486485    handles_NomType=handles.NomType;
    487486    handles_FileExt=handles.FileExt;
    488     handles_Fields=handles.Fields;
     487%     handles_Fields=handles.Fields;
    489488elseif index==2
    490489    handles_RootPath=handles.RootPath_1;
     
    494493    handles_NomType=handles.NomType_1;
    495494    handles_FileExt=handles.FileExt_1;
    496     handles_Fields=handles.Fields_1;
     495%     handles_Fields=handles.Fields_1;
    497496    set(handles.RootPath_1,'Visible','on')
    498497    set(handles.RootFile_1,'Visible','on')
     
    504503
    505504%% detect root name, nomenclature and indices in the input file name:
    506 %[RootPath,SubDir]=fileparts_uvmat(fileinput);
    507505[FilePath,FileName,FileExt]=fileparts(fileinput);
    508506% detect the file type, get the movie object if relevant, and look for the corresponding file series:
    509507% the root name and indices may be corrected by including the first index i1 if a corresponding xml file exists
    510508[RootPath,SubDir,RootFile,i1_series,i2_series,j1_series,j2_series,NomType,FileType,MovieObject,i1,i2,j1,j2]=find_file_series(FilePath,[FileName FileExt]);
    511 % if strcmp(NomType,'*')% movies will be opened at the first frame
    512 %     i1=1;
    513 %     i2=[];
    514 %     j1=[];
    515 %     j2=[];
    516 % end 
    517509
    518510%% open the file or fill the GUI uvmat according to the detected file type
     
    19641956    FieldName=[];%default
    19651957    VelType=[];%default
    1966     FileExt=get(handles.FileExt,'String');
     1958   % FileExt=get(handles.FileExt,'String');
    19671959    FileType=UvData.FileType{1};
    19681960    switch FileType
     
    22342226   UvData.Field=Field{1};
    22352227end
     2228UvData.Field.FieldList={FieldName}; % TODO: to generalise, used for proj_field with tps interpolation
    22362229
    22372230%% get bounds and mesh (needed for mouse action and to open set_object)
     
    38183811AxeData=UvData.axes3;% retrieve the current plotted data
    38193812PlotParam=read_GUI(handles.uvmat);
    3820 [PP,PlotParamOut]= plot_field(AxeData,handles.axes3,PlotParam);
     3813[tild,PlotParamOut]= plot_field(AxeData,handles.axes3,PlotParam);
    38213814write_plot_param(handles,PlotParamOut); %update the auto plot parameters
    38223815
     
    38263819%-------------------------------------------------------------------
    38273820UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface
    3828 test=get(handles.edit_object,'Value');
    3829 if test
     3821if get(handles.edit_object,'Value')
    38303822    set(handles.edit_object,'BackgroundColor',[1,1,0]) 
    38313823    %suppress the other options
     
    38383830        set(hhgeometry_calib.edit_append,'BackgroundColor',[0.7 0.7 0.7])
    38393831    end
     3832    hset_object=findobj(allchild(0),'Tag','set_object');
     3833    if isempty(hset_object)% open the GUI set_object with data of the currently selected object
     3834        ViewObject_Callback(hObject, eventdata, handles)
     3835        hset_object=findobj(allchild(0),'Tag','set_object');
     3836    end
     3837    hhset_object=guidata(hset_object);
     3838    set(hhset_object.PLOT,'enable','on');
    38403839else
    38413840    UvData.MouseAction='none';
    3842     set(handles.edit_object,'BackgroundColor',[0.7,0.7,0.7])   
    3843 end
    3844 set(handles.uvmat,'UserData',UvData);
    3845 hset_object=findobj(allchild(0),'Tag','set_object');
    3846 if ~isempty(hset_object)
    3847     hhset_object=guidata(hset_object);
    3848     if test
    3849         set(hhset_object.PLOT,'enable','on');
    3850     else
    3851        set(hhset_object.PLOT,'enable','off');
     3841    set(handles.edit_object,'BackgroundColor',[0.7,0.7,0.7]) 
     3842    hset_object=findobj(allchild(0),'Tag','set_object');
     3843    if ~isempty(hset_object)% open the
     3844        hhset_object=guidata(hset_object);
     3845        set(hhset_object.PLOT,'enable','off');
    38523846    end
    38533847end
     
    45674561end
    45684562
     4563%------------------------------------------------------------------------
    45694564% --- Executes on button press in ViewObject.
    45704565function ViewObject_Callback(hObject, eventdata, handles)
     4566%------------------------------------------------------------------------
    45714567IndexObj=get(handles.ListObject,'Value');
    45724568IndexObj=IndexObj(end); %keeps only the secodn value
Note: See TracChangeset for help on using the changeset viewer.