Changeset 1187


Ignore:
Timestamp:
Dec 3, 2025, 6:18:13 PM (4 days ago)
Author:
sommeria
Message:

mask accessory updated

Location:
trunk/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/calc_field_interp.m

    r1127 r1187  
    2929%     UVMAT is distributed in the hope that it will be useful,
    3030%     but WITHOUT ANY WARRANTY; without even the implied warranty of
    31 %     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     31%     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See theerrormsg
    3232%     GNU General Public License (see LICENSE.txt) for more details.
    3333%=======================================================================
     
    3939ListVarName={};
    4040VarAttribute={};
    41 errormsg='';
    4241InputVarList={};
    4342if ischar(FieldName),FieldName={FieldName};end
     43if isempty(FieldName{1})
     44    errormsg='no input field name entered';
     45    return
     46else
     47    errormsg='';
     48end
    4449check_skipped=zeros(size(FieldName));% default, =1 to mark the variables which can be calculated
    4550check_interp=ones(size(FieldName));% default, =1 to mark the variables which can be interpolated (not ancillary)
  • trunk/src/plot_field.m

    r1177 r1187  
    876876    ColorMap='default';%default colormap
    877877    if isfield(PlotParam.Scalar,'CheckBW') && ~isempty(PlotParam.Scalar.CheckBW)
    878         ColorMap=PlotParam.Scalar.CheckBW; %BW=0 color imposed, else gray scale imposed.
     878        ColorMap=PlotParam.Scalar.CheckBW;%PlotParam.Scalar.CheckBW is char string indicating the colormap type
    879879    elseif ((siz==2) && (isa(A,'uint8')|| isa(A,'uint16')))% non color images represented in gray scale by default
    880880        ColorMap='grayscale';
  • trunk/src/proj_field.m

    r1161 r1187  
    12381238vector_x_proj=[];
    12391239vector_y_proj=[];
     1240
     1241%% loop on field cells
    12401242for icell=1:length(CellInfo)
    12411243    NbDim=NbDimArray(icell);
     
    13851387           
    13861388                    [VarVal,ListVarName,VarAttribute,errormsg]=calc_field_interp([coord_X coord_Y],FieldData,CellInfo{icell}.FieldName,XI,YI);
    1387                    
     1389                    if ~isempty(errormsg)
     1390                        return
     1391                    end
    13881392                    % set to NaN interpolation points which are too far from any initial data (more than 2 CoordMesh)
    13891393                    if exist('scatteredInterpolant','file')%recent Matlab versions
     
    13991403                    if ~isempty(thresh2)
    14001404                        for ivar=1:numel(VarVal)
    1401                             VarVal{ivar}(Dist>thresh2)=NaN;% % put to NaN interpolated positions further than 4 meshes from initial data
    1402                         end
    1403                     end
    1404                     if isfield(CellInfo{icell},'CheckSub') && CellInfo{icell}.CheckSub && ~isempty(vector_x_proj)
     1405                            VarVal{ivar}(Dist>thresh2)=NaN;% % put to NaN interpolated positions further than thresh2 from initial data
     1406                        end
     1407                    end
     1408                    if isfield(CellInfo{icell},'CheckSub') && CellInfo{icell}.CheckSub && ~isempty(vector_x_proj)% subtract from  the previous vector components if requested by CheckSub=true
     1409                        if isfield(ProjData,FieldData.ListVarName{vector_x_proj})
    14051410                        ProjData.(FieldData.ListVarName{vector_x_proj})=ProjData.(FieldData.ListVarName{vector_x_proj})-VarVal{1};
     1411                        end
     1412                         if isfield(ProjData,FieldData.ListVarName{vector_y_proj})
    14061413                        ProjData.(FieldData.ListVarName{vector_y_proj})=ProjData.(FieldData.ListVarName{vector_y_proj})-VarVal{2};
     1414                         end
    14071415                        ListVarName={};% no new variable
    14081416                        VarAttribute={};
  • trunk/src/series.m

    r1184 r1187  
    309309
    310310  %  [~,~,~,i1,i2,j1,j2]=fileparts_uvmat(Param.InputFile.FileIndex);
    311   i1=1;j1=1;%default
     311  i1=1;j1=1;i2=[];j2=[];%default
    312312    if isfield(Param,'i1')
    313313        i1=Param.i1;
     
    322322        j2=Param.j2;
    323323    end
    324    
     324    ref_i=i1;%default
     325    if ~isempty(i2)
    325326    ref_i=floor((i1+i2)/2); % reference image number corresponding to the file
     327    end
    326328    % set(handles.num_ref_i,'String',num2str(ref_i));
    327329    if isempty(j1)
     
    10571059if isfield(XmlData,'FileSeries')&& strcmp(FileInfo.FileType,'multimage')
    10581060    set(handles.Relabel,'Visible','on')
    1059     set(handles.Relabel,'Value',0)
     1061    set(handles.Relabel,'Value',1)
    10601062    SeriesData.FileSeries{iview}=XmlData.FileSeries;
    10611063    TimeMin=Time(2,2);
  • trunk/src/series/civ_input.m

    r1181 r1187  
    9191if isfield(SeriesData,'FileInfo')
    9292    FileType=SeriesData.FileInfo{1}.FileType;% info on the first input file series
    93     %FieldType=SeriesData.FileInfo{1}.FieldType;% info on the first input file series
    9493else
    9594    set(hhseries.REFRESH,'BackgroundColor',[1 0 1])% indicate that the file input in series needs to be refreshed
     
    281280
    282281    if isfield(Param.ActionInput,'Civ1')&& isfield(Param.ActionInput.Civ1,'SearchBoxSize')%transform from SearchBoxSize to SearchRange (old to new convention)
    283                SearchRange=round((Param.ActionInput.Civ1.SearchBoxSize-Param.ActionInput.Civ1.CorrBoxSize)/2);
    284                 set(handles.num_SearchRange_1(1),'String',num2str(SearchRange(1)))
    285                 set(handles.num_SearchRange_2(1),'String',num2str(SearchRange(2)))
    286             end
    287             if isfield(Param.ActionInput,'Civ2')&& isfield(Param.ActionInput.Civ2,'SearchBoxSize')
    288                SearchRange=round((Param.ActionInput.Civ2.SearchBoxSize-Param.ActionInput.Civ2.CorrBoxSize)/2);
    289                 set(handles.num_SearchRange_1(2),'String',num2str(SearchRange(1)))
    290                 set(handles.num_SearchRange_2(2),'String',num2str(SearchRange(2)))
    291             end
     282        SearchRange=round((Param.ActionInput.Civ1.SearchBoxSize-Param.ActionInput.Civ1.CorrBoxSize)/2);
     283        set(handles.num_SearchRange_1(1),'String',num2str(SearchRange(1)))
     284        set(handles.num_SearchRange_2(1),'String',num2str(SearchRange(2)))
     285    end
     286    if isfield(Param.ActionInput,'Civ2')&& isfield(Param.ActionInput.Civ2,'SearchBoxSize')
     287        SearchRange=round((Param.ActionInput.Civ2.SearchBoxSize-Param.ActionInput.Civ2.CorrBoxSize)/2);
     288        set(handles.num_SearchRange_1(2),'String',num2str(SearchRange(1)))
     289        set(handles.num_SearchRange_2(2),'String',num2str(SearchRange(2)))
     290    end
    292291    hcheckgrid=findobj(handles.civ_input,'Tag','CheckGrid');
    293292    for ilist=1:numel(hcheckgrid)
     
    16131612    end
    16141613    j2=j1;
    1615     str_civ=Param.ActionInput.PairIndices.ListPairCiv1;
    1616     r=regexp(str_civ,'^\D(?<ind>[i|j])=( -| )(?<num1>\d+)\|(?<num2>\d+)','names');
    1617     if ~isempty(r)
    1618         if strcmp(r.ind,'i')
    1619             i1=i1-str2num(r.num1);
    1620             i2=i2 +str2num(r.num2);
    1621         elseif strcmp(r.ind,'j')
    1622             j1=j1-str2num(r.num1);
    1623             j2=j2 +str2num(r.num2);
    1624         end
    1625     else % mode='j1-j2';
    1626         r=regexp(str_civ,'^j= (?<num1>[a-z])-(?<num2>[a-z])','names');
    1627         if isempty(r)
    1628             r=regexp(str_civ,'^j= (?<num1>[A-Z])-(?<num2>[A-Z])','names');
     1614    if isfield(Param.ActionInput,'PairIndices')
     1615        str_civ=Param.ActionInput.PairIndices.ListPairCiv1;
     1616        r=regexp(str_civ,'^\D(?<ind>[i|j])=( -| )(?<num1>\d+)\|(?<num2>\d+)','names');
     1617        if ~isempty(r)
     1618            if strcmp(r.ind,'i')
     1619                i1=i1-str2num(r.num1);
     1620                i2=i2 +str2num(r.num2);
     1621            elseif strcmp(r.ind,'j')
     1622                j1=j1-str2num(r.num1);
     1623                j2=j2 +str2num(r.num2);
     1624            end
     1625        else % mode='j1-j2';
     1626            r=regexp(str_civ,'^j= (?<num1>[a-z])-(?<num2>[a-z])','names');
    16291627            if isempty(r)
    1630                 r=regexp(str_civ,'^j= (?<num1>\d+)-(?<num2>\d+)','names');
     1628                r=regexp(str_civ,'^j= (?<num1>[A-Z])-(?<num2>[A-Z])','names');
     1629                if isempty(r)
     1630                    r=regexp(str_civ,'^j= (?<num1>\d+)-(?<num2>\d+)','names');
     1631                end
    16311632            end
    1632         end
    1633         if isempty(r)
    1634             disp('wrong pair mode input option')
    1635         else
    1636             j1=stra2num(r.num1);
    1637             j2=stra2num(r.num2);
    1638         end
    1639     end
    1640    
     1633            if isempty(r)
     1634                disp('wrong pair mode input option')
     1635            else
     1636                j1=stra2num(r.num1);
     1637                j2=stra2num(r.num2);
     1638            end
     1639        end
     1640    end
    16411641    par_civ1=Param.ActionInput.Civ1;
    1642      
     1642    RootPath_A=Param.InputTable{1,1};
     1643    SubDir_A=Param.InputTable{1,2};
     1644    RootFile_A=Param.InputTable{1,3};
     1645    NomType_A=Param.InputTable{1,4};
     1646    FileExt_A=Param.InputTable{1,5};
    16431647    if strcmp(Param.ActionInput.ListCompareMode,'displacement')
    16441648        ImageName_A=Param.ActionInput.RefFile;
    16451649    else
    1646         RootPath_A=Param.InputTable{1,1};
    1647         SubDir_A=Param.InputTable{1,2};
    1648         RootFile_A=Param.InputTable{1,3};
    1649         NomType_A=Param.InputTable{1,4};
    1650         FileExt_A=Param.InputTable{1,5};
    16511650        ImageName_A=fullfile_uvmat(RootPath_A,SubDir_A,RootFile_A,FileExt_A,NomType_A,i1,[],j1);
    1652         ImageName_B=fullfile_uvmat(RootPath_A,SubDir_A,RootFile_A,FileExt_A,NomType_A,i2,[],j2);
    1653     end
     1651    end
     1652    ImageName_B=fullfile_uvmat(RootPath_A,SubDir_A,RootFile_A,FileExt_A,NomType_A,i2,[],j2);
    16541653    par_civ1.ImageA = read_image(ImageName_A);
    16551654    par_civ1.ImageB = read_image(ImageName_B);
  • trunk/src/series/civ_series.m

    r1183 r1187  
    341341            if strcmp(Param.ActionInput.ListCompareMode,'displacement')
    342342                ImageName_A=Param.ActionInput.RefFile;
     343                FrameIndex_A=1;
    343344            elseif CheckRelabel
    344345            [RootFile,FrameIndex_A]=index2filename(Param.FileSeries,i1_series_Civ1(ifield),j1_series_Civ1(ifield),MaxIndex_j);
     
    356357                    [FileInfo_A,VideoObject_A]=get_file_info(ImageName_A);
    357358                    FileType_A=FileInfo_A.FileType;
    358                     if isempty(Time) && ~isempty(find(strcmp(FileType_A,{'mmreader','video','cine_phantom','telopsIR'}), 1))% case of video input
     359                    if isempty(Time) && ~isempty(find(strcmp(FileType_A,{'mmreader','video','cine_phantom','telopsIR'}), 1))% case of video inputFrameIndex_A
    359360                        Time=zeros(FileInfo_A.NumberOfFrames+1,2);
    360361                        Time(:,2)=(0:1/FileInfo_A.FrameRate:(FileInfo_A.NumberOfFrames)/FileInfo_A.FrameRate)';
     
    529530                else
    530531                    par_civ1.Mask=[];
     532                    disp_uvmat('ERROR',[maskname ' does not exist'],checkrun);
     533                    return
    531534                end
    532535                mask=par_civ1.Mask;
     
    785788                par_civ2.Mask=mask; %use mask already opened
    786789            else
    787                 if exist(maskname,'file')
     790                if exist(maskname,'file')|| ~isempty(regexp(maskname,'(^http://)|(^https://)', 'once'))
    788791                    try
    789792                        par_civ2.Mask=imread(maskname);%update the mask, an store it for future use
     
    797800                else
    798801                    par_civ2.Mask=[];
     802                    disp_uvmat('ERROR',[maskname ' does not exist'],checkrun);
     803                    return
    799804                end
    800805                mask=par_civ2.Mask;
  • trunk/src/sub_field.m

    r1127 r1187  
    218218    if ~isempty(CellInfo{icell})
    219219        % if two scalar are in the same cell
    220         if isfield(CellInfo{icell},'VarIndex_scalar') && numel(CellInfo{icell}.VarIndex_scalar)==2 && SubData.VarAttribute{CellInfo{icell}.VarIndex_scalar(2)}.CheckSub;
     220        if isfield(CellInfo{icell},'VarIndex_scalar') && numel(CellInfo{icell}.VarIndex_scalar)==2 && SubData.VarAttribute{CellInfo{icell}.VarIndex_scalar(2)}.CheckSub
    221221            ivar=[ivar CellInfo{icell}.VarIndex_scalar(1)];
    222222            ivar_1=[ivar_1 CellInfo{icell}.VarIndex_scalar(2)];
    223223        end
    224224        % if two vector u components are in the same cell
    225         if isfield(CellInfo{icell},'VarIndex_vector_x') && numel(CellInfo{icell}.VarIndex_vector_x)==2 && SubData.VarAttribute{CellInfo{icell}.VarIndex_vector_x(2)}.CheckSub;
     225        if isfield(CellInfo{icell},'VarIndex_vector_x') && numel(CellInfo{icell}.VarIndex_vector_x)==2 && SubData.VarAttribute{CellInfo{icell}.VarIndex_vector_x(2)}.CheckSub
    226226            ivar=[ivar CellInfo{icell}.VarIndex_vector_x(1)];
    227227            ivar_1=[ivar_1 CellInfo{icell}.VarIndex_vector_x(2)];
    228228        end
    229229         % if two vector v components are in the same cell
    230         if isfield(CellInfo{icell},'VarIndex_vector_y') && numel(CellInfo{icell}.VarIndex_vector_y)==2 && SubData.VarAttribute{CellInfo{icell}.VarIndex_vector_y(2)}.CheckSub;
     230        if isfield(CellInfo{icell},'VarIndex_vector_y') && numel(CellInfo{icell}.VarIndex_vector_y)==2 && SubData.VarAttribute{CellInfo{icell}.VarIndex_vector_y(2)}.CheckSub
    231231            ivar=[ivar CellInfo{icell}.VarIndex_vector_y(1)];
    232232            ivar_1=[ivar_1 CellInfo{icell}.VarIndex_vector_y(2)];
    233233        end
    234234        % merge the error flags if needed
    235         if isfield(CellInfo{icell},'VarIndex_errorflag') && numel(CellInfo{icell}.VarIndex_errorflag)==2 && SubData.VarAttribute{CellInfo{icell}.VarIndex_vector_y(2)}.CheckSub;
     235        if isfield(CellInfo{icell},'VarIndex_errorflag') && numel(CellInfo{icell}.VarIndex_errorflag)==2 && SubData.VarAttribute{CellInfo{icell}.VarIndex_vector_y(2)}.CheckSub
    236236            ivar_flag=CellInfo{icell}.VarIndex_errorflag(1);
    237237            ivar_flag_1=CellInfo{icell}.VarIndex_errorflag(2);
  • trunk/src/uvmat.m

    r1184 r1187  
    12171217        shift_x=diff(Slice.SliceAngle(:,1));
    12181218        shift_y=diff(Slice.SliceAngle(:,2));
    1219         if min(shift_x)<max(shift_x)||min(shift_y)<max(shift_y)
     1219        if size(Slice.SliceAngle,1)>1 &&( min(shift_x)<max(shift_x)||min(shift_y)<max(shift_y))
    12201220            app.unequalintervalsCheckBox.Value=1;
    12211221        end
     
    30003000    end
    30013001    FileInfo=get_file_info(fileinput);
    3002     if isfield(FileInfo,'MaskFile')&& exist(FileInfo.MaskFile,'file')
    3003         filemask=FileInfo.MaskFile;
     3002    if isfield(FileInfo,'MaskFile')%&& exist(FileInfo.MaskFile,'file')
     3003        Mask.MaskFile=FileInfo.MaskFile;
     3004        if isfield(FileInfo,'MaskNbSlice')
     3005            Mask.MaskNbSlice=FileInfo.MaskNbSlice;
     3006        end
    30043007    else
    3005         %     MaskSubDir=regexprep(SubDir,'\..*','');%take the root part of SubDir, before the first dot '.'
    3006         %     MaskPath=fullfile(RootPath,[MaskSubDir '.mask']);
    3007         %    mdetect=0;
    3008         %     if exist(MaskPath,'dir')
    3009         %         ListStruct=dir(MaskPath);%look for a mask file
    3010         %         ListCells=struct2cell(ListStruct);% transform dir struct to a cell arrray
    3011         %         check_dir=cell2mat(ListCells(4,:));% =1 for directories, =0 for files
    3012         %         ListFiles=ListCells(1,:);%list of file and dri names
    3013         %         ListFiles=ListFiles(~check_dir);%list of file names (excluding dir)
    3014         %         if ~isempty(ListFiles)
    3015         %             for ifile=1:numel(ListFiles)
    3016         %                 [tild,tild,MaskExt]=fileparts(ListFiles{1});
    3017         %                 [tild,tild,MaskFile{ifile},i1_series,i2_series,j1_series,j2_series,MaskNomType,MaskFileInfo]=find_file_series(MaskPath,ListFiles{ifile},0);
    3018         %                 MaskFileType=MaskFileInfo.FileType;
    3019         %                 if strcmp(MaskFileType,'image') && isempty(i2_series) && isempty(j2_series)
    3020         %                     mdetect=1;
    3021         %                 end
    3022         %                 if ~strcmp(MaskFile{ifile},MaskFile{1})
    3023         %                     mdetect=0;% cancel detection test in case of multiple masks, use the brower for selection
    3024         %                     break
    3025         %                 end
    3026         %             end
    3027         %         end
    3028         %         RootPath=MaskPath;
    3029         %     end
    3030         filemask= uigetfile_uvmat('pick a mask image file:',RootPath,'image');
    3031     end
    3032     if ~isempty(filemask)
    3033         [MaskPath,FileName,FileExt]=fileparts(filemask);
    3034         Mask.File=filemask;
    3035         [~,~,~,i1_series,~,~,~,NomType]=find_file_series(MaskPath,[FileName FileExt]);
    3036         Mask.NbSlice=[];%default
    3037         Mask.VolumeScan=0;% TO UPDATE ***
    3038         if strcmp(NomType,'_1')
    3039             Mask.NbSlice=i1_series(1,2,end);
    3040             set(handles.num_NbSlice,'String',num2str(Mask.NbSlice))
    3041         elseif ~strcmp(NomType,'*')
    3042             msgbox_uvmat('ERROR','multilevel masks must be labeled with a single index as _1,_2,...');
    3043             return
    3044         end
    3045         %set(hObject,'UserData',filemask);%store for future use
    3046         set(handles.CheckMask,'UserData',Mask);
    3047         errormsg=update_mask(handles);
    3048         if ~isempty(errormsg)
    3049             msgbox_uvmat(['ERROR','error in displaying mask, ' errormsg]);
    3050         end
     3008        filemask= uigetfile_uvmat('pick a mask image file:',fileinput,'image');
     3009        if ~isempty(filemask)
     3010            [FilePath,FileName,FileExt]=fileparts(filemask);
     3011            [RootPath,SubDir,RootFile,i1_series,i2,j1,j2,NomType]=find_file_series(FilePath,[FileName FileExt]);
     3012            if strcmp(NomType,'_1')
     3013                Mask.MaskFile=fullfile(RootPath,SubDir,RootFile);
     3014                Mask.MaskExt=FileExt;
     3015                Mask.MaskNbSlice=i1_series(1,2,end);
     3016            elseif ~strcmp(NomType,'*')
     3017                msgbox_uvmat('ERROR','multilevel masks must be labeled with a single index as _1,_2,...');
     3018                set(handles.CheckMask,'Value',0)
     3019                return
     3020            end
     3021        end
     3022    end
     3023    %         i1=str2double(get(handles.num_i1,'String'));
     3024    %         filemask=FileInfo.MaskFile;
     3025    %         if isfield(FileInfo,'MaskNbSlice')
     3026    %         i1=str2double(get(handles.num_i1,'String'));
     3027    %         MaskIndex=mod(i1,FileInfo.MaskNbSlice)
     3028    %         filemask=[filemask '_' num2str(MaskIndex) FileInfo.MaskExt]
     3029    % %     else
     3030    % %         filemask= uigetfile_uvmat('pick a mask image file:',RootPath,'image');
     3031    %     end
     3032    %     if ~isempty(filemask)
     3033    %         [MaskPath,FileName,FileExt]=fileparts(filemask);
     3034    %         Mask.File=filemask;
     3035    %         [~,~,~,i1_series,~,~,~,NomType]=find_file_series(MaskPath,[FileName FileExt]);
     3036    %         Mask.NbSlice=[];%default
     3037    %         Mask.VolumeScan=0;% TO UPDATE ***
     3038    %         if strcmp(NomType,'_1')
     3039    %             Mask.NbSlice=i1_series(1,2,end);
     3040    %             set(handles.num_NbSlice,'String',num2str(Mask.NbSlice))
     3041    %         elseif ~strcmp(NomType,'*')
     3042    %             msgbox_uvmat('ERROR','multilevel masks must be labeled with a single index as _1,_2,...');
     3043    %             return
     3044    %         end
     3045    %set(hObject,'UserData',filemask);%store for future use
     3046    set(handles.CheckMask,'UserData',Mask);
     3047    errormsg=update_mask(handles);
     3048    if ~isempty(errormsg)
     3049        msgbox_uvmat(['ERROR','error in displaying mask, ' errormsg]);
    30513050    end
    30523051else % desactivate mask display
    30533052    MaskData=get(handles.CheckMask,'UserData');
    30543053    if isfield(MaskData,'maskhandle') && ishandle(MaskData.maskhandle)
    3055        % delete(MaskData.maskhandle)
    3056        set(MaskData.maskhandle,'Visible','off')
     3054        % delete(MaskData.maskhandle)
     3055        set(MaskData.maskhandle,'Visible','off')
    30573056    end
    30583057    set(handles.CheckMask,'UserData',[])
     
    30733072%% get the current mask name recorded in CheckMask/UserData, possibly indexed with file index
    30743073MaskInfo=get(handles.CheckMask,'UserData');
    3075 if isfield(MaskInfo,'File')
    3076     if isfield(MaskInfo,'NbSlice')&& ~isempty(MaskInfo.NbSlice)
     3074if isfield(MaskInfo,'MaskFile')
     3075    if isfield(MaskInfo,'MaskNbSlice')&& ~isempty(MaskInfo.MaskNbSlice)
    30773076        if isfield(MaskInfo,'VolumeScan') &&  MaskInfo.VolumeScan
    30783077            MaskIndex_i=str2double(get(handles.num_j1,'String'));
    30793078        else
    3080             MaskIndex_i=mod(str2double(get(handles.num_i1,'String'))-1,MaskInfo.NbSlice)+1;
    3081         end
    3082         MaskName=[MaskInfo.File '_' num2str(MaskIndex_i) '.png'];
     3079            MaskIndex_i=mod(str2double(get(handles.num_i1,'String'))-1,MaskInfo.MaskNbSlice)+1;
     3080        end
     3081        MaskName=[MaskInfo.MaskFile '_' num2str(MaskIndex_i) '.png'];
    30833082    else
    30843083        MaskIndex_i=1;
    3085         MaskName=MaskInfo.File;
     3084        MaskName=MaskInfo.MaskFile;
    30863085    end
    30873086   
    30883087    %% update mask image if the mask is new
    30893088    UvData=get(handles.uvmat,'UserData');
    3090     if ~ (isfield(UvData,'MaskName') && isequal(UvData.MaskName,MaskName))
     3089     TransformMenu=get(handles.TransformName,'String')
     3090      TransformName=  TransformMenu{get(handles.TransformName,'Value')};
     3091    if ~ (isfield(UvData,'MaskName') && strcmp(UvData.MaskName,MaskName)&& isfield(UvData,'TransformName')&& strcmp(UvData.TransformName,TransformName))%check if the mask is new
    30913092        UvData.MaskName=MaskName; %update the recorded name on UvData
     3093        UvData.TransformName=TransformName; %update the recorded name on UvData
    30923094        set(handles.uvmat,'UserData',UvData);
    30933095        if ~exist(MaskName,'file')
     
    42514253            break
    42524254        end
    4253         [ObjectData,errormsg]=proj_field(UvData.Field,UvData.ProjObject{iobj});% project field on the object
    4254         if ~isempty(errormsg)
    4255             errormsg=['projection on ' UvData.ProjObject{iobj}.Type ': ' errormsg ];
    4256             return
     4255        [ObjectData,warnmsg]=proj_field(UvData.Field,UvData.ProjObject{iobj});% project field on the object
     4256        if ~isempty(warnmsg)
     4257            msgbox_uvmat('WARNING',['projection on ' UvData.ProjObject{iobj}.Type ': ' warnmsg ]);
     4258            continue
    42574259        end
    42584260        if testnewseries
Note: See TracChangeset for help on using the changeset viewer.