Ignore:
Timestamp:
Mar 10, 2010, 11:03:36 AM (11 years ago)
Author:
sommeria
Message:

-relabel_i_j: improve the question dlg box for image transform
-aver_stat,time_series,merge_proj: include modification of field transform and call of set_object.
-series: introduce a browser for set_object
-ima2vol: create volume images (png images of a slice concacened along y) for PIV 3D
-set_object: suppress TITLE, introduce Tooltip helps for parameters
-civ: fixed bug on BATCH sequences

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series/merge_proj.m

    r29 r41  
    2323WaitbarPos=get(hseries.waitbar_frame,'Position'); %positiopn of waitbar frame
    2424%-------------------------------------------------
     25
     26%projection object
     27test_object=get(hseries.GetObject,'Value');
     28if test_object
     29    hset_object=findobj(allchild(0),'Name','set_object');
     30    ProjObject=read_set_object(guidata(hset_object));
     31    if ~isfield(ProjObject,'Style')
     32            msgbox_uvmat('ERROR','Undefined projection object style')
     33            return
     34    end
     35    if ~isequal(ProjObject.Style,'plane')
     36            msgbox_uvmat('ERROR','The projection object must be a plane')
     37            return
     38    end
     39    %answeryes=questdlg({['field series projected on ' Series.ProjObject.Style]});
     40    answeryes=msgbox_uvmat('INPUT_Y-N',['field series projected on ' ProjObject.Style]);
     41    if ~isequal(answeryes,'Yes')
     42        return
     43    end
     44end
    2545
    2646%numbers of view fields (nbre of inputs in RootPath)
     
    125145end
    126146
     147% coordinate transform or other user defined transform
     148transform_fct=[];%default
     149if isfield(Series,'transform_fct')
     150    transform_fct=Series.transform_fct;
     151end
     152
    127153% Field and velocity type (the same for all views)
    128154Field_str=get(hseries.FieldMenu,'String');
     
    170196    testcivx=testnc;
    171197end
     198
    172199%name of output files and directory:
    173200% res_subdir=fullfile(Series.RootPath{1},[Series.SubDir{1} '_STAT']);
     
    178205if isequal(length(RootPath),1)
    179206    fulldir=RootPath{1};
    180     subdir='GRID';
     207    subdir='merge_proj';
    181208    res_subdir=fullfile(fulldir,subdir);
    182209else
     
    209236filebasesub=fullfile(res_subdir,Series.RootFile{1});
    210237filebase_merge=fullfile(res_subdir,'merged');%root name for the merged files
    211 
    212 %projection object
    213 if isfield(Series,'sethandles')
    214     if ishandle(Series.sethandles.set_object)
    215         Series.ProjObject=read_set_object(Series.sethandles);
    216         if ~isfield(Series.ProjObject,'Style')
    217             msgbox_uvmat('ERROR','Undefined projection object style')
    218             return
    219         end
    220         if ~isequal(Series.ProjObject.Style,'plane')
    221             msgbox_uvmat('ERROR','The projection object must be a plane')
    222             return
    223         end
    224     end
    225 end
    226238
    227239    %MAIN LOOP
     
    271283                Field{iview}.ZIndex=mod(num_i1{iview}(ifile)-1,NbSlice_calib{1})+1;
    272284            end
    273             if ~isequal(transform,'')
    274                 Field{iview}=feval(Series.CoordType,Field{iview},XmlData{iview});%transform to phys if requested
     285            if ~isempty(transform_fct)
     286                Field{iview}=transform_fct(Field{iview},XmlData{iview});%transform to phys if requested
    275287            end
    276288            if testcivx
     
    279291
    280292            %projection on object (gridded plane)
    281             if isfield(Series,'ProjObject')
    282                 Field{iview}=proj_field(Field{iview},Series.ProjObject);
     293            if test_object
     294                Field{iview}=proj_field(Field{iview},ProjObject);
    283295            end
    284296        end   
Note: See TracChangeset for help on using the changeset viewer.