Changeset 546


Ignore:
Timestamp:
Sep 17, 2012, 10:47:38 PM (12 years ago)
Author:
sommeria
Message:

bugs corrected for tps projection on a grid + pb of colorbar display solved

Location:
trunk/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/calc_field.m

    r517 r546  
    1 
    2 
    31%'calc_field': defines fields (velocity, vort, div...) from civx data and calculate them
    42%---------------------------------------------------------------------
  • trunk/src/calc_tps.m

    r530 r546  
     1%'calc_tps': calculate the thin plate spline (tps) coefficients for interpolation
     2%---------------------------------------------------------------------
     3% DataOut=calc_tps(DataIn,checkall)
     4%
     5% OUTPUT:
     6% DataOut: output field structure
     7%
     8% INPUT:
     9% DataIn: intput field structure
     10% checkall:=1 if tps is needed for all fields (a filter projection is needed), =0 otherwise
     11
    112function DataOut=calc_tps(DataIn,checkall)     
    213DataOut=DataIn;%default
     
    516    SubDomain=DataIn.SubDomain;%
    617end
    7 %[CellVarIndex,NbDimVec,VarTypeCell,errormsg]=find_field_cells(DataIn);
    818[CellInfo,NbDimArray,errormsg]=find_field_cells(DataIn);
    919nbtps=0;
    1020for icell=1:numel(CellInfo);
    11     %VarType=VarTypeCell{icell};
    1221    if NbDimArray(icell)>=2 && strcmp(CellInfo{icell}.CoordType,'scattered')%'&& ~isempty(VarType.coord_x)
    1322        nbtps=nbtps+1;
  • trunk/src/find_field_cells.m

    r543 r546  
    159159    icell=numel(CellInfo)+icell_tps; % new field cell index
    160160    CellInfo{icell}.CoordIndex=ivar_tps(icell_tps);% index of the  tps coordinate variable
    161     CellInfo{icell}.VarIndex_subrange_tps=[];
    162     CellInfo{icell}.VarIndex_nbsites_tps=[];
     161    %CellInfo{icell}.VarIndex_subrange_tps=[];
     162    %CellInfo{icell}.VarIndex_nbsites_tps=[];
    163163    if numel(DimCell)==3
    164164        VarDimName=Data.VarDimName(~check_select);
  • trunk/src/plot_field.m

    r537 r546  
    7676%    .Vectors.MaxC = imposed maximum of the scalar field used for vector color;
    7777%
    78 % PosColorbar: if not empty, display a colorbar for B&W images
    79 %               imposed position of the colorbar (ex [0.821 0.471 0.019 0.445])
     78% PosColorbar: % if absent, no action on colorbar
     79%              % if empty, suppress any existing colorbar
     80%              % if not empty, display a colorbar for B&W images at position PosColorbar
     81%                expressed in figure relative unit (ex [0.821 0.471 0.019 0.445])
    8082
    8183%AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
     
    99101%% default input and output
    100102if ~exist('PlotParam','var'),PlotParam=[];end;
    101 if ~exist('PosColorbar','var'),PosColorbar=[];end;
    102103PlotType='text'; %default
    103104PlotParamOut=PlotParam;%default
     
    110111index_1D=[];
    111112index_0D=[];
    112 % errormsg=check_field_structure(Data);
    113 % if ~isempty(errormsg)
    114 %     msgbox_uvmat('ERROR',['input of plot_field/check_field_structure: ' errormsg])
    115 %     display(['input of plot_field/check_field_structure: ' errormsg])
    116 %     return
    117 % end
    118113% check the cells of fields :
    119114[CellInfo,NbDimArray,errormsg]=find_field_cells(Data);
     
    126121index_3D=find(NbDimArray>2,1);
    127122if ~isempty(index_3D)
    128 %     if isfield(Data,'NbDimArray')&& isequal(Data.NbDimArray,2)
    129 %         index_2D=[index_2D index_3D];
    130 %     else
    131         msgbox_uvmat('ERROR','volume plot not implemented yet');
    132         return
    133 %     end
     123    msgbox_uvmat('ERROR','volume plot not implemented yet');
     124    return
    134125end
    135126index_2D=find(NbDimArray==2);%find 2D fields
    136127index_1D=find(NbDimArray==1);
    137128index_0D=find(NbDimArray==0);
    138 %remove coordinates variables from 1D plot
    139 % if ~isempty(index_2D)
    140 %     for ivar=1:length(index_1D)
    141 %         if isequal(CellVarIndex{index_1D(ivar)},VarRole{index_1D(ivar)}.coord)
    142 %             index_1D(ivar)=0;
    143 %         end
    144 %     end
    145 %     index_1D=index_1D(index_1D>0);
    146 % end
    147129
    148130%% test axes and figure
     
    194176%% 2D plots
    195177if isempty(index_2D)
    196     plot_plane([],[],haxes);%removes images or vector plots in the absence of 2D field plot
     178    plot_plane([],[],haxes,[],[]);%removes images or vector plots in the absence of 2D field plot
    197179else  %plot 2D field
     180    if ~exist('PosColorbar','var'),PosColorbar=[];end;
    198181    [tild,PlotParamOut,PlotType,errormsg]=plot_plane(Data,CellInfo(index_2D),haxes,PlotParam,PosColorbar);
    199182    AxeData.NbDim=2;
     
    539522%default plotting parameters
    540523PlotType='plane';%default
    541 if ~exist('PlotParam','var')
    542     PlotParam=[];
    543 end
     524% if ~exist('PlotParam','var')
     525%     PlotParam=[];
     526% end
    544527
    545528if ~isfield(PlotParam,'Scalar')
     
    936919            set(hima,'YData',AY);
    937920        end
    938 
     921       
    939922        % set the transparency to 0.5 if vectors are also plotted
    940923        if isfield(PlotParam.Scalar,'Opacity')&& ~isempty(PlotParam.Scalar.Opacity)
     
    952935   
    953936    %display the colorbar code for B/W images if Poscolorbar not empty
    954     if siz==2 && exist('PosColorbar','var')&& ~isempty(PosColorbar)
    955         if isempty(hcol)||~ishandle(hcol)
    956             hcol=colorbar;%create new colorbar
    957         end
    958         if length(PosColorbar)==4
    959             set(hcol,'Position',PosColorbar)
    960         end
    961         %YTick=0;%default
    962         if MaxA>MinA
    963             if CheckContour
    964                 colbarlim=get(hcol,'YLim');
    965                 scale_bar=(colbarlim(2)-colbarlim(1))/(abscontmax-abscontmin);
    966                 YTick=cont_pos(2:end-1);
    967                 YTick_scaled=colbarlim(1)+scale_bar*(YTick-abscontmin);
    968                 set(hcol,'YTick',YTick_scaled);
    969             elseif (isfield(PlotParam.Scalar,'CheckBW') && isequal(PlotParam.Scalar.CheckBW,1))||isa(A,'uint8')|| isa(A,'uint16')%images
    970                 hi=get(hcol,'children');
    971                 if iscell(hi)%multiple images in colorbar
    972                     hi=hi{1};
    973                 end
    974                 set(hi,'YData',[MinA MaxA])
    975                 set(hi,'CData',(1:256)')
    976                 set(hcol,'YLim',[MinA MaxA])
    977                 YTick=colbartick(MinA,MaxA);
    978                 set(hcol,'YTick',YTick)
    979             else
    980                 hi=get(hcol,'children');
    981                 if iscell(hi)%multiple images in colorbar
    982                     hi=hi{1};
    983                 end
    984                 set(hi,'YData',[MinA MaxA])
    985                 set(hi,'CData',(1:64)')
    986                 YTick=colbartick(MinA,MaxA);
    987                 set(hcol,'YLim',[MinA MaxA])
    988                 set(hcol,'YTick',YTick)
    989             end
    990             set(hcol,'Yticklabel',num2str(YTick'));
    991         end
    992     elseif ishandle(hcol)
    993         delete(hcol); %erase existing colorbar if not needed
     937    if ~isempty(PosColorbar)
     938        if siz==2 && exist('PosColorbar','var')
     939            if isempty(hcol)||~ishandle(hcol)
     940                hcol=colorbar;%create new colorbar
     941            end
     942            if length(PosColorbar)==4
     943                set(hcol,'Position',PosColorbar)
     944            end
     945            %YTick=0;%default
     946            if MaxA>MinA
     947                if CheckContour
     948                    colbarlim=get(hcol,'YLim');
     949                    scale_bar=(colbarlim(2)-colbarlim(1))/(abscontmax-abscontmin);
     950                    YTick=cont_pos(2:end-1);
     951                    YTick_scaled=colbarlim(1)+scale_bar*(YTick-abscontmin);
     952                    set(hcol,'YTick',YTick_scaled);
     953                elseif (isfield(PlotParam.Scalar,'CheckBW') && isequal(PlotParam.Scalar.CheckBW,1))||isa(A,'uint8')|| isa(A,'uint16')%images
     954                    hi=get(hcol,'children');
     955                    if iscell(hi)%multiple images in colorbar
     956                        hi=hi{1};
     957                    end
     958                    set(hi,'YData',[MinA MaxA])
     959                    set(hi,'CData',(1:256)')
     960                    set(hcol,'YLim',[MinA MaxA])
     961                    YTick=colbartick(MinA,MaxA);
     962                    set(hcol,'YTick',YTick)
     963                else
     964                    hi=get(hcol,'children');
     965                    if iscell(hi)%multiple images in colorbar
     966                        hi=hi{1};
     967                    end
     968                    set(hi,'YData',[MinA MaxA])
     969                    set(hi,'CData',(1:64)')
     970                    YTick=colbartick(MinA,MaxA);
     971                    set(hcol,'YLim',[MinA MaxA])
     972                    set(hcol,'YTick',YTick)
     973                end
     974                set(hcol,'Yticklabel',num2str(YTick'));
     975            end
     976        elseif ishandle(hcol)
     977            delete(hcol); %erase existing colorbar if not needed
     978        end
    994979    end
    995980else%no scalar plot
     
    997982        delete(hima)
    998983    end
    999     if ~isempty(hcol)&& ishandle(hcol)
     984    if ~isempty(PosColorbar) && ~isempty(hcol)&& ishandle(hcol)
    1000985        delete(hcol)
    1001986    end
     
    11001085    PlotParamOut=rmfield(PlotParamOut,'Vectors');
    11011086end
    1102 
    1103 %listfields={'AY','AX','A','X','Y','U','V','C','W','F','FF'};
    1104 %listdim={'AY','AX',{'AY','AX'},'nb_vectors','nb_vectors','nb_vectors','nb_vectors','nb_vectors','nb_vectors','nb_vectors','nb_vectors'};
    1105 %Role={'coord_y','coord_x','scalar','coord_x','coord_y','vector_x','vector_y','scalar','vector_z','warnflag','errorflag'};
    1106 %ind_select=[];
    1107 nbvar=0;
     1087% nbvar=0;
    11081088
    11091089%store the coordinate extrema occupied by the field
     
    11401120        end
    11411121    end
    1142 %     PlotParamOut.RangeX=[XMin XMax]; %range of x, to be stored in the user data of the plot axes
    1143 %     PlotParamOut.RangeY=[YMin YMax]; %range of x, to be stored in the user data of the plot axes
    1144 %     if ~fix_lim
    1145         PlotParamOut.Coordinates.MinX=XMin;
    1146         PlotParamOut.Coordinates.MaxX=XMax;
    1147         PlotParamOut.Coordinates.MinY=YMin;
    1148         PlotParamOut.Coordinates.MaxY=YMax;
    1149         if XMax>XMin
    1150             set(haxes,'XLim',[XMin XMax]);% set x limits of frame in axes coordinates
    1151         end
    1152         if YMax>YMin
    1153             set(haxes,'YLim',[YMin YMax]);% set x limits of frame in axes coordinates
    1154         end
    1155 %     end
     1122    PlotParamOut.Coordinates.MinX=XMin;
     1123    PlotParamOut.Coordinates.MaxX=XMax;
     1124    PlotParamOut.Coordinates.MinY=YMin;
     1125    PlotParamOut.Coordinates.MaxY=YMax;
     1126    if XMax>XMin
     1127        set(haxes,'XLim',[XMin XMax]);% set x limits of frame in axes coordinates
     1128    end
     1129    if YMax>YMin
     1130        set(haxes,'YLim',[YMin YMax]);% set x limits of frame in axes coordinates
     1131    end
    11561132    set(haxes,'YDir','normal')
    11571133    set(get(haxes,'XLabel'),'String',[XName ' (' x_units ')']);
     
    11601136    PlotParamOut.Coordinates.y_units=y_units;
    11611137end
    1162         if isfield(PlotParam,'Coordinates') && isfield(PlotParam.Coordinates,'CheckFixAspectRatio') && isequal(PlotParam.Coordinates.CheckFixAspectRatio,1)
    1163             set(haxes,'DataAspectRatioMode','manual')
    1164             if isfield(PlotParam.Coordinates,'AspectRatio')
    1165                 set(haxes,'DataAspectRatio',[PlotParam.Coordinates.AspectRatio 1 1])
    1166             end
    1167         else
    1168             set(haxes,'DataAspectRatioMode','auto')
    1169         end
     1138if isfield(PlotParam,'Coordinates') && isfield(PlotParam.Coordinates,'CheckFixAspectRatio') && isequal(PlotParam.Coordinates.CheckFixAspectRatio,1)
     1139    set(haxes,'DataAspectRatioMode','manual')
     1140    if isfield(PlotParam.Coordinates,'AspectRatio')
     1141        set(haxes,'DataAspectRatio',[PlotParam.Coordinates.AspectRatio 1 1])
     1142    end
     1143else
     1144    set(haxes,'DataAspectRatioMode','auto')
     1145end
    11701146%-------------------------------------------------------------------
    11711147% --- function for plotting vectors
  • trunk/src/proj_field.m

    r542 r546  
    149149ProjData.NbDim=0;
    150150[CellInfo,NbDimArray,errormsg]=find_field_cells(FieldData);
    151 %[CellVarIndex,NbDimCell,VarTypeCell,errormsg]=find_field_cells(FieldData);
    152151if ~isempty(errormsg)
    153152    errormsg=['error in proj_field/proj_points:' errormsg];
     
    160159    end
    161160    VarIndex=CellInfo{icell}.VarIndex;%  indices of the selected variables in the list FieldData.ListVarName
    162    % VarType=CellInfo{icell}.VarType;% structure defining the types of variables in the cell
    163161    ivar_X=CellInfo{icell}.CoordIndex(end);
    164162    ivar_Y=CellInfo{icell}.CoordIndex(end-1);
     
    167165        ivar_Z=CellInfo{icell}.CoordIndex(1);
    168166    end
    169 %     ivar_rem=[];
    170 %     if isfield(CellInfo{icell},'VarIndex_ancillary')
    171 %         ivar_rem=CellInfo{icell}.VarIndex_ancillary;
    172 %     end
    173 %     if isfield(CellInfo{icell},'VarIndex_warnflag')
    174 %         ivar_rem=[ivar_rem CellInfo{icell}.VarIndex_warnflag];
    175 %     end
    176167    ivar_FF=[];
    177168    if isfield(CellInfo{icell},'VarIndex_errorflag')
     
    181172            return
    182173        end
    183     end
    184 %     
     174    end   
    185175    % select types of  variables to be projected
    186176   ListProj={'VarIndex_scalar','VarIndex_image','VarIndex_color','VarIndex_vector_x','VarIndex_vector_y'};
     
    550540
    551541%% group the variables (fields of 'FieldData') in cells of variables with the same dimensions
    552 %[CellVarIndex,NbDim,VarTypeCell,errormsg]=find_field_cells(FieldData);
    553542[CellInfo,NbDim,errormsg]=find_field_cells(FieldData);
    554543if ~isempty(errormsg)
     
    561550ProjData.VarDimName={};
    562551for icell=1:length(CellInfo)
    563     %VarIndex=CellInfo{icell}.VarIndex;%  indices of the selected variables in the list FieldData.ListVarName
    564    % VarType=VarTypeCell{icell}; %types of variables
    565552    if NbDim(icell)~=2% proj_line acts only on fields of space dimension 2, TODO: check 3D case
    566553        continue
     
    722709        else
    723710            test_Amat=1;%image or 2D matrix
    724             test_interp2=0;%default
    725 %             if ~isempty(VarType.coord_y) 
     711            test_interp2=0;%default
    726712            AYName=FieldData.ListVarName{CellInfo{icell}.CoordIndex(end-1)};
    727713            AXName=FieldData.ListVarName{CellInfo{icell}.CoordIndex(end)};
     
    985971
    986972%% group the variables (fields of 'FieldData') in cells of variables with the same dimensions
    987 % CellVarIndex=cells of variable index arrays
    988 %[CellVarIndex,NbDimVec,VarTypeCell,errormsg]=find_field_cells(FieldData);
    989973[CellInfo,NbDimArray,errormsg]=find_field_cells(FieldData);
    990974if ~isempty(errormsg)
     
    10431027        ivar_V=CellInfo{icell}.VarIndex_vector_y;
    10441028    end
    1045 %     if ~isempty(VarType.vector_x_tps)&&~isempty(VarType.vector_y_tps)
    1046 %         ivar_U=VarType.vector_x_tps;
    1047 %         ivar_V=VarType.vector_y_tps;
    1048 %     end
    10491029    if isfield(CellInfo{icell},'VarIndex_vector_z')
    1050     ivar_W=CellInfo{icell}.VarIndex_vector_z;
    1051     end
    1052 %     %type of coordinates
    1053 %     if ~isempty(VarType.coord_x) && ~isempty(VarType.coord_y)
    1054 %         CoordType='unstructured';
    1055 %     elseif ~isempty(VarType.coord_tps)
    1056 %         CoordType='tps';
    1057 %     else
    1058 %         CoordType='structured';
    1059 %     end
    1060 %     
     1030        ivar_W=CellInfo{icell}.VarIndex_vector_z;
     1031    end
    10611032    %dimensions
    10621033    DimCell=FieldData.VarDimName{VarIndex(1)};
     
    12031174                    if isfield(CellInfo{icell},'VarIndex_scalar')
    12041175                        VarName_scalar=FieldData.ListVarName{CellInfo{icell}.VarIndex_scalar};
    1205                         if ~isempty(VarType.errorflag)
     1176                        if isfield(CellInfo{icell},'errorflag') && ~isempty(CellInfo{icell}.errorflag)
    12061177                            FieldData.(VarName_scalar)=FieldData.(VarName_scalar)(indsel);
    12071178                        end
     
    12361207        case 'tps'
    12371208            if strcmp(ProjMode{icell},'filter')
    1238                 Coord=FieldData.(FieldData.ListVarName{VarType.coord_tps});
    1239                 NbSites=FieldData.(FieldData.ListVarName{VarType.nbsites_tps});
    1240                 SubRange=FieldData.(FieldData.ListVarName{VarType.subrange_tps});
    1241                 if isfield(VarType,'vector_x_tps')&&isfield(VarType,'vector_y_tps')
    1242                     FieldVar=cat(3,FieldData.(FieldData.ListVarName{VarType.vector_x_tps}),FieldData.(FieldData.ListVarName{VarType.vector_y_tps}));
     1209                Coord=FieldData.(FieldData.ListVarName{CellInfo{icell}.CoordIndex});
     1210                NbSites=FieldData.(FieldData.ListVarName{CellInfo{icell}.NbSite_tps});
     1211                SubRange=FieldData.(FieldData.ListVarName{CellInfo{icell}.SubRange_tps});
     1212                if isfield(CellInfo{icell},'VarIndex_vector_x_tps')&&isfield(CellInfo{icell},'VarIndex_vector_y_tps')
     1213                    FieldVar=cat(3,FieldData.(FieldData.ListVarName{CellInfo{icell}.VarIndex_vector_x_tps}),FieldData.(FieldData.ListVarName{CellInfo{icell}.VarIndex_vector_y_tps}));
    12431214                end
    12441215                coord_x_proj=XMin:DX:XMax;
     
    12491220                XI=XI+ObjectData.Coord(1,1);
    12501221                YI=YI+ObjectData.Coord(1,2);
    1251                 [DataOut,VarAttribute,errormsg]=calc_field_tps(Coord,NbSites,SubRange,FieldVar,VarType.Operation,cat(3,XI,YI));   
     1222                [DataOut,VarAttribute,errormsg]=calc_field_tps(Coord,NbSites,SubRange,FieldVar,CellInfo{icell}.Operation,cat(3,XI,YI));   
    12521223                ListFieldProj=(fieldnames(DataOut))';
    12531224                VarDimName=cell(size(ListFieldProj));
     
    15091480                        end
    15101481                        %filter the field (image) if option 'filter' is used
    1511                         if test_filter
    1512                             Aclass=class(FieldData.A);
    1513                             eval(['ProjData.' VarName '=filter2(Mfilter,FieldData.' VarName ',''valid'');'])
    1514                             if ~isequal(Aclass,'double')
    1515                                 eval(['ProjData.' VarName '=' Aclass '(FieldData.' VarName ');'])%revert to integer values
    1516                             end
    1517                         end
     1482%                         if test_filter
     1483%                             Aclass=class(FieldData.A);
     1484%                             eval(['ProjData.' VarName '=filter2(Mfilter,FieldData.' VarName ',''valid'');'])
     1485%                             if ~isequal(Aclass,'double')
     1486%                                 eval(['ProjData.' VarName '=' Aclass '(FieldData.' VarName ');'])%revert to integer values
     1487%                             end
     1488%                         end
    15181489                        eval(['vec_A=reshape(FieldData.' VarName ',[],nbcolor);'])%put the original image in line
    15191490                        %ind_in=find(flagin);
     
    17021673%-----------------------------------------------------------------
    17031674idimvar=0;
    1704 % [CellVarIndex,NbDimVec,VarTypeCell,errormsg]=find_field_cells(FieldData);
    1705 % if ~isempty(errormsg)
    1706 %     errormsg=['error in proj_field/proj_plane:' errormsg];
    1707 %     return
    1708 % end
    1709 
    17101675% LOOP ON GROUPS OF VARIABLES SHARING THE SAME DIMENSIONS
    17111676% CellVarIndex=cells of variable index arrays
  • trunk/src/set_object.m

    r533 r546  
    487487    % create tps coeff if needed for ProjMode 'filter'
    488488    if strcmp(ObjectData.ProjMode,'filter')&&~isfield(UvData.Field,'Coord_tps')     
    489         UvData.Field=calc_tps(UvData.Field);
     489        UvData.Field=calc_tps(UvData.Field,1);
    490490    end
    491491    [ProjData,errormsg]= proj_field(UvData.Field,ObjectData);%project the current field of uvmat on ObjectData
  • trunk/src/uvmat.m

    r542 r546  
    178178set(hObject,'Units','Normalized')
    179179movegui(hObject,'center')
     180%UvData.OpenParam.PosColorbar=[0.8450    0.0900    0.0190    0.3600];
    180181UvData.OpenParam.PosColorbar=[0.805 0.022 0.019 0.445];
    181182UvData.OpenParam.PosSetObject=[-0.05 -0.03 0.3 0.7]; %position for set_object
     
    24392440    end
    24402441    UvData.Field.Mesh=min(Mesh);
    2441     UvData.Field.XMax=max(CoordMax(ind,1));
    2442     UvData.Field.XMin=min(CoordMin(ind,1));
    2443     UvData.Field.YMax=max(CoordMax(ind,2));
    2444     UvData.Field.YMin=max(CoordMin(ind,2));
     2442    UvData.Field.XMax=max(CoordMax(ind,end));
     2443    UvData.Field.XMin=min(CoordMin(ind,end));
     2444    UvData.Field.YMax=max(CoordMax(ind,end-1));
     2445    UvData.Field.YMin=max(CoordMin(ind,end-1));
    24452446    if NbDim==3
    2446         UvData.Field.ZMax=max(CoordMax(ind,3));
    2447         UvData.Field.ZMin=max(CoordMin(ind,3));
     2447        UvData.Field.ZMax=max(CoordMax(ind,1));
     2448        UvData.Field.ZMin=max(CoordMin(ind,1));
    24482449    end
    24492450    % adjust the mesh to a value 1, 2 , 5 *10^n
     
    30613062end
    30623063if isequal(field,'image')||isequal(field_1,'image')
    3063     set(handles.TitleNpx,'Visible','on')% visible npx,pxcm... buttons
    3064     set(handles.TitleNpy,'Visible','on')
     3064    set(handles.TitleNpxy,'Visible','on')% visible npx,pxcm... buttons
    30653065    set(handles.num_Npx,'Visible','on')
    30663066    set(handles.num_Npy,'Visible','on')
    30673067else
    3068     set(handles.TitleNpx,'Visible','off')% visible npx,pxcm... buttons
    3069     set(handles.TitleNpy,'Visible','off')
     3068    set(handles.TitleNpxy,'Visible','off')% visible npx,pxcm... buttons
    30703069    set(handles.num_Npx,'Visible','off')
    30713070    set(handles.num_Npy,'Visible','off')
     
    31483147            set(handles.SubField,'Value',0)
    31493148        else %valid browser input:  display the selected image
    3150             set(handles.TitleNpx,'Visible','on')% visible npx,pxcm... buttons
    3151             set(handles.TitleNpy,'Visible','on')
     3149            set(handles.TitleNpxy,'Visible','on')% visible npx,pxcm... buttons
    31523150            set(handles.num_Npx,'Visible','on')
    31533151            set(handles.num_Npy,'Visible','on')
     
    31613159        end
    31623160        if ~isequal(field,'image')
    3163             set(handles.TitleNpx,'Visible','off')% visible npx,pxcm... buttons
    3164             set(handles.TitleNpy,'Visible','off')
     3161            set(handles.TitleNpxy,'Visible','off')% visible npx,pxcm... buttons
    31653162            set(handles.num_Npx,'Visible','off')
    31663163            set(handles.num_Npy,'Visible','off')
     
    48394836% --- Executes on selection change in Coord_x.
    48404837function Coord_x_Callback(hObject, eventdata, handles)
     4838
     4839
     4840% --- Executes on button press in CheckColorBar.
     4841function CheckColorBar_Callback(hObject, eventdata, handles)
     4842% hObject    handle to CheckColorBar (see GCBO)
     4843% eventdata  reserved - to be defined in a future version of MATLAB
     4844% handles    structure with handles and user data (see GUIDATA)
     4845
     4846% Hint: get(hObject,'Value') returns toggle state of CheckColorBar
Note: See TracChangeset for help on using the changeset viewer.