Changeset 1119 for trunk/src/transform_field
- Timestamp:
- Aug 16, 2022, 2:02:02 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/transform_field/ima_filter.m
r1107 r1119 29 29 %======================================================================= 30 30 31 function DataOut=ima_filter(DataIn,Param )31 function DataOut=ima_filter(DataIn,Param,DataIn_1) 32 32 33 33 %% request input parameters … … 76 76 end 77 77 end 78 if exist('DataIn_1','var') 79 [CellInfo,NbDim,errormsg]=find_field_cells(DataIn_1); 80 for icell=1:numel(CellInfo) 81 if isfield(CellInfo{icell},'CoordType')&& strcmp(CellInfo{icell}.CoordType,'grid') 82 for ivar=1:numel(CellInfo{icell}.VarIndex) 83 VarName=DataIn_1.ListVarName{CellInfo{icell}.VarIndex(ivar)}; 84 Atype=class(DataIn_1.(VarName));% detect integer 8 or 16 bits 85 if numel(size(DataIn_1.(VarName)))==3 86 DataOut.(VarName)=filter2(Mfiltre,sum(DataIn_1.(VarName),3));%filter the input image, after summation on the color component (for color images) 87 DataOut.(VarName)=uint16(DataOut.(VarName)); %transform to 16 bit images 88 else 89 DataOut.(VarName)=filter2(Mfiltre,DataIn_1.(VarName)); 90 DataOut.(VarName)=feval(Atype,DataOut.(VarName));%transform to the initial image format 91 end 92 end 93 end 94 end 95 end 96 78 97
Note: See TracChangeset
for help on using the changeset viewer.