Changeset 1081 for trunk/src


Ignore:
Timestamp:
May 28, 2020, 5:30:08 PM (5 years ago)
Author:
sommeria
Message:

phys_polar corrected

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/get_field.m

    r1080 r1081  
    629629
    630630%% set default selection for grid coordinates
     631if ~isempty(var_coord)
    631632coord_val(1)=var_coord(end);
    632633coord_val(2)=var_coord(end-1);
    633634if numel(var_coord)>=3
    634635    coord_val(3)=var_coord(end-2);
     636end
    635637end
    636638% if numel(find(test_coord))>3
  • trunk/src/read_GUI.m

    r1071 r1081  
    7171                        end                       
    7272                    case {'listbox','popupmenu'}
    73                         listinput=get(hchild(ichild),'String');
    74                         value=get(hchild(ichild),'Value');
     73                        listinput=get(hchild(ichild),'String')
     74                        value=get(hchild(ichild),'Value')
    7575                        if ~isempty(listinput)
    7676                            if numel(value)==1% single selection
  • trunk/src/transform_field/ima_filter.m

    r1071 r1081  
    6060Mfiltre=Mfiltre/(sum(sum(Mfiltre)));%normalize filter
    6161
    62 Atype=class(DataIn.A);% detect integer 8 or 16 bits
    63 if numel(size(DataIn.A))==3
    64     DataOut.A=filter2(Mfiltre,sum(DataIn.A,3));%filter the input image, after summation on the color component (for color images)
    65     DataOut.A=uint16(DataOut.A); %transform to 16 bit images
    66 else
    67     DataOut.A=filter2(Mfiltre,DataIn.A);
    68     DataOut.A=feval(Atype,DataOut.A);%transform to the initial image format
     62[CellInfo,NbDim,errormsg]=find_field_cells(DataIn)
     63for icell=1:numel(CellInfo)
     64    if isfield(CellInfo{icell},'CoordType')&& strcmp(CellInfo{icell}.CoordType,'grid')
     65        for ivar=1:numel(CellInfo{icell}.VarIndex)
     66            VarName=DataIn.ListVarName{CellInfo{icell}.VarIndex(ivar)};
     67            Atype=class(DataIn.(VarName));% detect integer 8 or 16 bits
     68            if numel(size(DataIn.(VarName)))==3
     69                DataOut.(VarName)=filter2(Mfiltre,sum(DataIn.(VarName),3));%filter the input image, after summation on the color component (for color images)
     70                DataOut.(VarName)=uint16(DataOut.(VarName)); %transform to 16 bit images
     71            else
     72                DataOut.(VarName)=filter2(Mfiltre,DataIn.(VarName));
     73                DataOut.(VarName)=feval(Atype,DataOut.(VarName));%transform to the initial image format
     74            end
     75        end
     76    end
    6977end
    7078 
  • trunk/src/transform_field/phys_polar.m

    r1078 r1081  
    444444    siz=size(A{icell});
    445445    checkuint8=isa(A{icell},'uint8');%check for image input with 8 bits
    446     checkuint16=isa(A{icell},'uint8');%check for image input with 16 bits
     446    checkuint16=isa(A{icell},'uint16');%check for image input with 16 bits
    447447    A{icell}=double(A{icell});
    448448    if numel(siz)==2 %(B/W images)
Note: See TracChangeset for help on using the changeset viewer.