Changeset 1040


Ignore:
Timestamp:
May 4, 2018, 10:57:13 PM (7 years ago)
Author:
sommeria
Message:

get_field improved to select variables, uvmat rationalized with respect to input file types

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/get_field.m

    r1028 r1040  
    335335        return
    336336    end
    337     var_select=list_var{index};
    338     set(handles.attributes_txt,'String', ['attributes of ' var_select])
     337    VarName=list_var{index};
     338    set(handles.attributes_txt,'String', ['attributes of ' VarName])
    339339    if isfield(Field,'VarAttribute')&& length(Field.VarAttribute)>=index-1
    340         %         nbline=0;
    341340        VarAttr=Field.VarAttribute{index-1};
    342341        if isstruct(VarAttr)
     
    356355if ~isempty(Tabcell)
    357356    Tabchar=cell2tab(Tabcell,'=');
    358     %     Tabchar=[{''};Tabchar];
    359357end
    360358set(handles.attributes,'Value',1);% select the first item
     
    364362if isfield(Field,'ListDimName')
    365363    Tabdim={};%default
    366     if isequal(index,1)%list all dimensions
     364    if isequal(index,1)%list all dimensions if '*' is selected as the variable
    367365        dim_indices=1:length(Field.ListDimName);
    368366        set(handles.dimensions_txt,'String', 'dimensions')
    369     else
     367    else   % a specific variable has been selected
    370368        DimCell=Field.VarDimName{index-1};
    371369        if ischar(DimCell)
    372             DimCell={DimCell};
     370            DimCell={DimCell};% transform into a cell for a single dimension defined by a char string
    373371        end
    374372        dim_indices=[];
     
    378376            dim_indices=[dim_indices dim_index];
    379377        end
    380         set(handles.dimensions_txt,'String', ['dimensions of ' var_select])
     378        set(handles.dimensions_txt,'String', ['dimensions of ' VarName])
    381379    end
    382380    for iline=1:length(dim_indices)
     
    390388end
    391389
     390%% propose a plot by default if a variable has been selected
     391if ~isequal(index,1)
     392    if numel(DimCell)==1
     393        set(handles.FieldOption,'Value',1)%propose 1D plot
     394    else
     395        set(handles.FieldOption,'Value',2)%propose scalar plot
     396    end
     397    if numel(DimCell)<=2
     398        set(handles.Check3D,'Value',0)
     399    else
     400        set(handles.Check3D,'Value',1)
     401    end
     402    FieldOption_Callback(hObject, VarName, handles)
     403end
     404
    392405%------------------------------------------------------------------------
    393406% --- Executes on selection change in FieldOption.
    394407%------------------------------------------------------------------------
    395 function FieldOption_Callback(hObject, eventdata, handles)
     408function FieldOption_Callback(hObject, VarName, handles)
    396409
    397410Field=get(handles.get_field,'UserData');
     
    414427        set(handles.Coord_z,'Visible','off')
    415428        set(handles.Z_title,'Visible','off')
    416         ordinate_Callback(hObject, eventdata, handles)
     429        ordinate_Callback(hObject, VarName, handles)
    417430       
    418431    case {'scalar'}
     
    428441        set(handles.Coord_y,'Visible','on')
    429442        set(handles.Y_title,'Visible','on')
     443       
     444        if ~ischar(VarName)
     445           
    430446        %default scalar selection
    431447        test_coord=zeros(size(Field.Display.VarDimName)); %=1 when variable #ilist is eligible as structured coordiante
     
    447463        else
    448464            set(handles.scalar,'Value',scalar_index)
    449         end       
    450         scalar_Callback(hObject, eventdata, handles)
     465        end     
     466        end
     467        scalar_Callback(hObject,VarName, handles)
     468       
    451469             
    452470    case 'vectors'
     
    501519
    502520%------------------------------------------------------------------------
    503 function ordinate_Callback(hObject, eventdata, handles)
     521function ordinate_Callback(hObject, DimCell, handles)
    504522%------------------------------------------------------------------------
    505523Field=get(handles.get_field,'UserData');
     
    584602        set(handles.TimeName,'String',ListTime)
    585603end 
     604if ~ischar(DimCell)
    586605update_field(handles,YName)
     606end
    587607         
    588608%------------------------------------------------------------------------
    589609% --- Executes on selection change in scalar menu.
    590610%------------------------------------------------------------------------
    591 function scalar_Callback(hObject, eventdata, handles)
     611function scalar_Callback(hObject, VarName, handles)
    592612
    593613Field=get(handles.get_field,'UserData');
    594 scalar_index=get(handles.scalar,'Value');
    595614scalar_menu=get(handles.scalar,'String');
    596 ScalarName=scalar_menu{scalar_index};
     615if ischar(VarName)
     616    ScalarName=VarName;
     617    scalar_index=find(strcmp(VarName,scalar_menu));
     618    set(handles.scalar,'Value',scalar_index)
     619else
     620    scalar_index=get(handles.scalar,'Value');
     621        ScalarName=scalar_menu{scalar_index};
     622end
    597623
    598624%% set list of possible coordinates
     
    696722        set(handles.TimeName,'String',ListTime)
    697723end 
     724if ~ischar(VarName)
    698725update_field(handles,ScalarName)
     726end
    699727
    700728% --- Executes on button press in check_rgb.
     
    705733% --- Executes on selection change in vector_x.
    706734%------------------------------------------------------------------------
    707 function vector_x_Callback(hObject, eventdata, handles)
     735function vector_x_Callback(hObject, DimCell, handles)
    708736
    709737vector_x_menu=get(handles.vector_x,'String');
     
    711739vector_x=vector_x_menu{vector_x_index};
    712740vector_Callback(handles)
     741if ~ischar(DimCell)
    713742update_field(handles,vector_x)
     743end
    714744
    715745%------------------------------------------------------------------------
    716746% --- Executes on selection change in vector_x.
    717 function vector_y_Callback(hObject, eventdata, handles)
    718 %------------------------------------------------------------------------
     747%------------------------------------------------------------------------
     748function vector_y_Callback(hObject, DimCell, handles)
     749
    719750vector_y_menu=get(handles.vector_x,'String');
    720751vector_y_index=get(handles.vector_x,'Value');
    721752vector_y=vector_y_menu{vector_y_index};
    722753vector_Callback(handles)
     754if ~ischar(DimCell)
    723755update_field(handles,vector_y)
     756end
    724757
    725758%------------------------------------------------------------------------
    726759% --- Executes on selection change in vector_z.
    727 function vector_z_Callback(hObject, eventdata, handles)
     760function vector_z_Callback(hObject, DimCell, handles)
    728761%------------------------------------------------------------------------
    729762vector_z_menu=get(handles.vector_z,'String');
     
    731764vector_z=vector_z_menu{vector_z_index};
    732765vector_Callback(handles)
     766if ~ischar(DimCell)
    733767update_field(handles,vector_z)
    734 
     768end
    735769%------------------------------------------------------------------------
    736770% --- Executes on selection change in vec_color.
    737 function vec_color_Callback(hObject, eventdata, handles)
     771function vec_color_Callback(hObject, DimCell, handles)
    738772%------------------------------------------------------------------------
    739773index=get(handles.vec_color,'Value');
     
    741775VarName=string{index};
    742776vector_Callback(handles)
     777if ~ischar(DimCell)
    743778update_field(handles,VarName)
    744 
     779end
    745780%------------------------------------------------------------------------
    746781% --- Executes on selection change in vector_x or vector_y
     
    860895% --- Executes on selection change in Coord_x.
    861896%------------------------------------------------------------------------
    862 function Coord_x_Callback(hObject, eventdata, handles)
     897function Coord_x_Callback(hObject, DimCell, handles)
    863898
    864899index=get(handles.Coord_x,'Value');
    865900string=get(handles.Coord_x,'String');
    866901VarName=string{index};
     902if ~ischar(DimCell)
    867903update_field(handles,VarName)
    868 
     904end
    869905%------------------------------------------------------------------------
    870906% --- Executes on selection change in Coord_y.
    871907%------------------------------------------------------------------------
    872 function Coord_y_Callback(hObject, eventdata, handles)
     908function Coord_y_Callback(hObject, DimCell, handles)
    873909
    874910index=get(handles.Coord_y,'Value');
    875911string=get(handles.Coord_y,'String');
    876912VarName=string{index};
     913if ~ischar(DimCell)
    877914update_field(handles,VarName)
     915end
    878916
    879917%------------------------------------------------------------------------
    880918% --- Executes on selection change in Coord_z.
    881919%------------------------------------------------------------------------
    882 function Coord_z_Callback(hObject, eventdata, handles)
     920function Coord_z_Callback(hObject, DimCell, handles)
    883921
    884922index=get(handles.Coord_z,'Value');
    885923string=get(handles.Coord_z,'String');
    886924VarName=string{index};
     925if ~ischar(DimCell)
    887926update_field(handles,VarName)
     927end
    888928
    889929%------------------------------------------------------------------------
  • trunk/src/get_file_info.m

    r1033 r1040  
    2222%               ='civx': netcdf files provided by the obsolete program civx (in fortran)
    2323%               ='pivdata_fluidimage': PIV data from software 'fluidimage'
    24 %      .FileIndexing='on' for data files (when series of indexed files are  expected)
     24%      .FieldType='image' for all kinds of images and movies, =FileType  else
     25%      .FileIndexing='on'/'off', for data files (when series of indexed files are  expected)
    2526%      .Height: image height in pixels
    2627%      .Width:  image width in pixels
    2728%      .BitDepth: nbre of bits per pixel  (8 of 16)
    2829%      .ColorType: 'greyscale' or 'color'
    29 %      .NumberOfFrames
     30%      .NumberOfFrames: defined for images or movies
    3031%      .FrameRate: nbre of frames per second, =[] for images
    3132% VideoObject: in case of video
     
    5859    FileInfo.FileType='txt'; %default
    5960else
    60     FileInfo.FileType='';
     61    FileInfo.FileType='';% input file does not exist
    6162    return
    6263end
  • trunk/src/series.m

    r1037 r1040  
    21832183%% add a new function to the menu if 'more...' has been selected in the menu ActionName
    21842184if isequal(ActionName,'more...')
    2185     if isempty(ActionPath)
     2185    if ~ischar(ActionPath)
    21862186        ActionPath=get(handles.ActionPath,'String');
    21872187    end
  • trunk/src/uvmat.m

    r1033 r1040  
    31673167%% read the second field
    31683168if isempty(UvData.MovieObject)
    3169     [Field_b,ParamOut,errormsg] = read_field(imaname_1,UvData.FileType{index},[],num_frame);
    3170 else
    3171     [Field_b,ParamOut,errormsg] = read_field(imaname_1,UvData.FileType{1},UvData.MovieObject{1},num_frame);
     3169    [Field_b,ParamOut,errormsg] = read_field(imaname_1,UvData.FileInfo{index}.FileType,[],num_frame);
     3170else
     3171    [Field_b,ParamOut,errormsg] = read_field(imaname_1,UvData.FileInfo{1}.FileType,UvData.MovieObject{1},num_frame);
    31723172end
    31733173if ~isempty(errormsg)
     
    33043304%% test for need of tps
    33053305check_proj_tps=0;
    3306 if  (strcmp(UvData.FileType{1},'civdata')||strcmp(UvData.FileType{1},'civx'))
     3306if  (strcmp(UvData.FileInfo{1}.FileType,'civdata')||strcmp(UvData.FileInfo{1}.FileType,'civx'))
    33073307    for iobj=1:numel(UvData.ProjObject)
    33083308        if isfield(UvData.ProjObject{iobj},'ProjMode')&& strcmp(UvData.ProjObject{iobj}.ProjMode,'interp_tps')
     
    33183318FieldName='';%default
    33193319VelType='';%default
    3320 switch UvData.FileType{1}
     3320if strcmp(UvData.FileInfo{1}.FieldType,'image')
     3321    FieldName='image';
     3322    frame_index=1;%default
     3323    if UvData.FileInfo{1}.NumberOfFrames>1
     3324        if strcmp(NomType,'*')
     3325            if num_i1>UvData.FileInfo{1}.NumberOfFrames
     3326                errormsg='specified frame index exceeds file content';
     3327                return
     3328            else
     3329                frame_index=num_i1;%frame index from a single movies or multimage
     3330            end
     3331        else
     3332            if num_j1>UvData.FileInfo{1}.NumberOfFrames
     3333                errormsg='specified frame index exceeds file content';
     3334                return
     3335            else
     3336                frame_index=num_j1;% frame index from a set of indexed movies
     3337            end
     3338        end
     3339    end
     3340    if isfield(UvData,'MovieObject')
     3341        ParamIn=UvData.MovieObject{1};
     3342    end
     3343end
     3344switch UvData.FileInfo{1}.FileType
    33213345    case {'civx','civdata','netcdf','pivdata_fluidimage'};
    33223346        list_fields=get(handles.FieldName,'String');% list menu fields
     
    33383362            end
    33393363        end
    3340     case {'video','mmreader','rdvision','cine_phantom'}
    3341         FieldName='image';
    3342         ParamIn=UvData.MovieObject{1}; % movie object
    3343         if strcmp(NomType,'*')
    3344             frame_index=num_i1;%frame index from a single movies or multimage
    3345         else
    3346             frame_index=num_j1;% frame index from a set of indexed movies
    3347         end
    3348         if isempty(frame_index)
    3349             frame_index=1;
    3350         end
    3351     case 'multimage'
    3352         FieldName='image';
    3353         if ~strcmp(NomType,'*')
    3354             MaxIndex_j_cell=get(handles.MaxIndex_j,'String');
    3355             if num_j1>str2num(MaxIndex_j_cell{1})
    3356                 errormsg='specified frame index exceeds file content';
    3357                 return
    3358             else
    3359             frame_index=num_j1;%frame index for movies or multimage
    3360             end
    3361         else
    3362             MaxIndex_i_cell=get(handles.MaxIndex_i,'String');
    3363             if num_i1>str2num(MaxIndex_i_cell{1})
    3364                 errormsg='specified frame index exceeds file content';
    3365                 return
    3366             else
    3367             frame_index=num_i1;
    3368             end
    3369         end
    33703364    case 'vol' %TODO: update
    33713365        if isfield(UvData.XmlData,'Npy') && isfield(UvData.XmlData,'Npx')
     
    33763370            return
    33773371        end
    3378     case {'image','image_DaVis'}
    3379         FieldName='image'; 
    3380         frame_index=num_j1;%frame index for image pairs
    33813372end
    33823373if isstruct (ParamIn)
     
    33993390end
    34003391
    3401 [Field{1},ParamOut,errormsg] = read_field(FileName,UvData.FileType{1},ParamIn,frame_index);
     3392[Field{1},ParamOut,errormsg] = read_field(FileName,UvData.FileInfo{1}.FileType,ParamIn,frame_index);
    34023393if ~isempty(errormsg)
    34033394    errormsg=['uvmat / refresh_field / read_field( ' FileName ') / ' errormsg];
     
    34113402
    34123403%% choose and read a second field FileName_1 if defined
    3413 VelType_1=[];%default
    3414 FieldName_1=[];
    3415 ParamIn_1=[];
    34163404ParamOut_1=[];
    3417 frame_index_1=1;
    3418 if ~isempty(FileName_1)
    3419     if ~exist(FileName_1,'file')
    3420         errormsg=['second file ' FileName_1 ' does not exist'];
    3421         return
    3422     end
    3423     switch UvData.FileType{2}
    3424         case {'civx','civdata','netcdf'};
     3405if numel(UvData.FileInfo)>1
     3406    VelType_1=[];%default
     3407    FieldName_1=[];
     3408    ParamIn_1=[];
     3409 
     3410    frame_index_1=1;
     3411    if ~isempty(FileName_1)
     3412        if ~exist(FileName_1,'file')
     3413            errormsg=['second file ' FileName_1 ' does not exist'];
     3414            return
     3415        end
     3416    end
     3417    if isequal(get(handles.NomType_1,'Visible'),'on')
     3418        NomType_1=get(handles.NomType_1,'String');
     3419    else
     3420        NomType_1=get(handles.NomType,'String');
     3421    end
     3422    if strcmp(UvData.FileInfo{2}.FieldType,'image')
     3423        FieldName_1='image';
     3424        frame_index_1=1;%default
     3425        if UvData.FileInfo{2}.NumberOfFrames>1
     3426            if strcmp(NomType_1,'*')
     3427                if num_i1>UvData.FileInfo{2}.NumberOfFrames
     3428                    errormsg='specified frame index exceeds file content';
     3429                    return
     3430                else
     3431                    frame_index_1=num_i1;%frame index from a single movies or multimage
     3432                end
     3433            else
     3434                if num_j1>UvData.FileInfo{2}.NumberOfFrames
     3435                    errormsg='specified frame index exceeds file content';
     3436                    return
     3437                else
     3438                    frame_index_1=num_j1;% frame index from a set of indexed movies
     3439                end
     3440            end
     3441        end
     3442        if isfield(UvData,'MovieObject')
     3443            ParamIn_1=UvData.MovieObject{2};
     3444        end
     3445    end
     3446    switch UvData.FileInfo{2}.FileType
     3447        case {'civx','civdata','netcdf','pivdata_fluidimage'};
    34253448            list_fields=get(handles.FieldName_1,'String');% list menu fields
    3426             if ischar(list_fields),list_fields={list_fields};end
    34273449            FieldName_1= list_fields{get(handles.FieldName_1,'Value')}; % selected field
    34283450            if ~strcmp(FieldName_1,'get_field...')
    34293451                if get(handles.FixVelType,'Value')
    34303452                    VelTypeList=get(handles.VelType_1,'String');
    3431                     VelType_1=VelTypeList{get(handles.VelType_1,'Value')};% read the velocity type.
     3453                    VelType_1=VelTypeList{get(handles.VelType_1,'Value')};
    34323454                end
    34333455            end
    3434             if isempty(FieldName_1)
    3435                 FieldName_1=FieldName;% if blank reproduce the field name of the first field
    3436             end
    3437             if ~isempty(regexp(FieldName_1,'^vel', 'once'))&& strcmp(get(handles.ColorCode,'Visible'),'on')
     3456            % case of input vector field, get the scalar used for vector color
     3457            if ~isempty(regexp(FieldName_1,'^vec('))
    34383458                list_code=get(handles.ColorCode,'String');% list menu fields
    34393459                index_code=get(handles.ColorCode,'Value');% selected string index
     
    34413461                    list_code=get(handles.ColorScalar,'String');% list menu fields
    34423462                    index_code=get(handles.ColorScalar,'Value');% selected string index
    3443                     ParamIn_1.ColorVar= list_code{index_code}; % selected field for vector color display
     3463                    ParamIn_1.ColorVar= list_code{index_code}; % selected field
    34443464                end
    3445             end
    3446         case {'video','mmreader','cine_phantom'}
    3447             ParamIn_1=UvData.MovieObject{2};
    3448             if ~strcmp(NomType_1,'*')
    3449                 frame_index_1=j1_1;%frame index for movies or multimage
    3450             else
    3451                 frame_index_1=i1_1;
    3452             end
    3453          case 'multimage'
    3454             if strcmp(NomType_1,'*')%frame index for movies or multimage
    3455                 frame_index_1=i1_1;
    3456             else
    3457                 frame_index_1=j1_1;
    34583465            end
    34593466        case 'vol' %TODO: update
     
    34663473            end
    34673474    end
    3468     if isequal(get(handles.NomType_1,'Visible'),'on')
    3469         NomType_1=get(handles.NomType_1,'String');
    3470     else
    3471         NomType_1=get(handles.NomType,'String');
    3472     end
     3475    %     switch UvData.FileType{2}
     3476    %         case {'civx','civdata','netcdf'};
     3477    %             list_fields=get(handles.FieldName_1,'String');% list menu fields
     3478    %             if ischar(list_fields),list_fields={list_fields};end
     3479    %             FieldName_1= list_fields{get(handles.FieldName_1,'Value')}; % selected field
     3480    %             if ~strcmp(FieldName_1,'get_field...')
     3481    %                 if get(handles.FixVelType,'Value')
     3482    %                     VelTypeList=get(handles.VelType_1,'String');
     3483    %                     VelType_1=VelTypeList{get(handles.VelType_1,'Value')};% read the velocity type.
     3484    %                 end
     3485    %             end
     3486    %             if isempty(FieldName_1)
     3487    %                 FieldName_1=FieldName;% if blank reproduce the field name of the first field
     3488    %             end
     3489    %             if ~isempty(regexp(FieldName_1,'^vel', 'once'))&& strcmp(get(handles.ColorCode,'Visible'),'on')
     3490    %                 list_code=get(handles.ColorCode,'String');% list menu fields
     3491    %                 index_code=get(handles.ColorCode,'Value');% selected string index
     3492    %                 if  ~strcmp(list_code{index_code},'black') &&  ~strcmp(list_code{index_code},'white')
     3493    %                     list_code=get(handles.ColorScalar,'String');% list menu fields
     3494    %                     index_code=get(handles.ColorScalar,'Value');% selected string index
     3495    %                     ParamIn_1.ColorVar= list_code{index_code}; % selected field for vector color display
     3496    %                 end
     3497    %             end
     3498    %         case {'video','mmreader','cine_phantom'}
     3499    %             ParamIn_1=UvData.MovieObject{2};
     3500    %             if ~strcmp(NomType_1,'*')
     3501    %                 frame_index_1=j1_1;%frame index for movies or multimage
     3502    %             else
     3503    %                 frame_index_1=i1_1;
     3504    %             end
     3505    %          case 'multimage'
     3506    %             if strcmp(NomType_1,'*')%frame index for movies or multimage
     3507    %                 frame_index_1=i1_1;
     3508    %             else
     3509    %                 frame_index_1=j1_1;
     3510    %             end
     3511    %         case 'vol' %TODO: update
     3512    %             if isfield(UvData.XmlData,'Npy') && isfield(UvData.XmlData,'Npx')
     3513    %                 ParamIn_1.Npy=UvData.XmlData.Npy;
     3514    %                 ParamIn_1.Npx=UvData.XmlData.Npx;
     3515    %             else
     3516    %                 errormsg='Npx and Npy need to be defined in the xml file for volume images .vol';
     3517    %                 return
     3518    %             end
     3519    %     end
     3520   
    34733521    test_keepdata_1=0;% test for keeping the previous stored data if the input files are unchanged
    3474 %     if ~isequal(NomType_1,'*')&& isfield(UvData,'FileName_1')
    3475 %            test_keepdata_1= strcmp(FileName_1,UvData.FileName_1) ;
    3476 %     end
    34773522    if test_keepdata_1
    34783523        Field{2}=UvData.Field_1;% keep the stored field
     
    34803525    else
    34813526        if isempty(ParamIn_1) || isstruct(ParamIn_1)
    3482         ParamIn_1.FieldName=FieldName_1;
    3483         ParamIn_1.VelType=VelType_1;
    3484         ParamIn_1.Coord_x=get(handles.Coord_x,'String');
    3485         ParamIn_1.Coord_y=get(handles.Coord_y,'String');
     3527            ParamIn_1.FieldName=FieldName_1;
     3528            ParamIn_1.VelType=VelType_1;
     3529            ParamIn_1.Coord_x=get(handles.Coord_x,'String');
     3530            ParamIn_1.Coord_y=get(handles.Coord_y,'String');
    34863531        end
    34873532        [Field{2},ParamOut_1,errormsg] = read_field(FileName_1,UvData.FileType{2},ParamIn_1,frame_index_1);
     
    35103555%% update the display menu for the first velocity type (first menuline)
    35113556test_veltype=0;
    3512 if (strcmp(UvData.FileType{1},'civx')||strcmp(UvData.FileType{1},'civdata')||strcmp(UvData.FileType{1},'pivdata_fluidimage'))...
     3557if (strcmp(UvData.FileInfo{1}.FileType,'civx')||strcmp(UvData.FileInfo{1}.FileType,'civdata')||strcmp(UvData.FileInfo{1}.FileType,'pivdata_fluidimage'))...
    35133558        && ~strcmp(FieldName,'get_field...')
    35143559    test_veltype=1;
     
    35163561    set(handles.VelType_1,'Visible','on')
    35173562    set(handles.FixVelType,'Visible','on')
    3518     menu=set_veltype_display(ParamOut.CivStage,UvData.FileType{1});
     3563    menu=set_veltype_display(ParamOut.CivStage,UvData.FileInfo{1}.FileType);
    35193564    index_menu=strcmp(ParamOut.VelType,menu);%look for VelType in  the menu
    35203565    index_val=find(index_menu,1);
     
    35363581if isempty(FileName_1)
    35373582elseif ~test_keepdata_1
    3538     if (strcmp(UvData.FileType{2},'civx')||strcmp(UvData.FileType{2},'civdata')||strcmp(UvData.FileType{1},'pivdata_fluidimage'))...
     3583    if (strcmp(UvData.FileType{2},'civx')||strcmp(UvData.FileType{2},'civdata')||strcmp(UvData.FileInfo{1}.FileType,'pivdata_fluidimage'))...
    35393584            && ~strcmp(FieldName_1,'get_field...')
    35403585        test_veltype_1=1;
     
    45144559            set(handles.ColorScalar,'Value',1)
    45154560            set(handles.ColorScalar,'String',VecColorList);
    4516             UvData.FileType{1}='netcdf';
     4561            UvData.FileInfo{1}.FileType='netcdf';
    45174562            set(handles.uvmat,'UserData',UvData)
    45184563            REFRESH_Callback(hObject, eventdata, handles)
     
    47114756            set(handles.FileExt_1,'String',get(handles.FileExt,'String'))
    47124757
    4713             UvData.FileType{2}=UvData.FileType{1};
     4758            UvData.FileType{2}=UvData.FileInfo{1}.FileType;
    47144759            UvData.XmlData{2}= UvData.XmlData{1};
    47154760            transform=get(handles.TransformPath,'UserData');
     
    48124857else% we introduce the same file (with a different field) for the second series
    48134858     FileName_1=FileName;% we compare two fields in the same file
    4814      UvData.FileType{2}=UvData.FileType{1};
     4859     UvData.FileType{2}=UvData.FileInfo{1}.FileType;
    48154860     UvData.XmlData{2}= UvData.XmlData{1};
    48164861     set(handles.SubField,'Value',1)
Note: See TracChangeset for help on using the changeset viewer.