Changeset 1057
- Timestamp:
- Aug 29, 2018, 12:39:05 PM (6 years ago)
- Location:
- trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/find_field_bounds.m
r1028 r1057 38 38 return 39 39 end 40 41 40 NbDim=max(NbDimArray);% spatial dimension of the input field 42 41 imax=find(NbDimArray==NbDim);% indices of field cells to consider -
trunk/src/find_field_cells.m
r1049 r1057 306 306 CellInfo{icell}.DimOrder=[]; 307 307 if NbDim(icell)==3 308 %coord z 309 for ivar=ind_coord_z 310 if check_coord_names(ivar) 311 DimRank=find(strcmp(Data.VarDimName{ivar},DimCell_var)); 308 if strcmp(DimCell_var{3},'rgb') 309 NbDim(icell)=2;% case of color images 310 else 311 %coord z 312 for ivar=ind_coord_z 313 if check_coord_names(ivar) 314 DimRank=find(strcmp(Data.VarDimName{ivar},DimCell_var)); 315 check_coord=~isempty(DimRank); 316 elseif check_coord_raster(ivar) 317 DimRank=find(strcmp(Data.ListVarName{ivar},DimCell_var)); 318 check_coord=~isempty(DimRank); 319 end 320 % check_coord= (check_coord_names(ivar) && strcmp(Data.VarDimName{ivar},DimCell_var{1}))||...% coord varbable 321 % (check_coord_raster(ivar) && strcmp(Data.ListVarName{ivar},DimCell_var{1})); % rasrewr coord defined by min and max 322 if check_coord 323 CellInfo{icell}.CoordType='grid'; 324 CellInfo{icell}.CoordIndex(1)=ivar; 325 CellInfo{icell}.ZName=Data.ListVarName{ivar}; 326 CellInfo{icell}.ZIndex=ivar; 327 CellInfo{icell}.DimOrder=DimRank; 328 break 329 end 330 end 331 end 332 end 333 for ivar=ind_coord_y 334 if check_coord_names(ivar) 335 DimRank=find(strcmp(Data.VarDimName{ivar},DimCell_var)); 312 336 check_coord=~isempty(DimRank); 313 337 elseif check_coord_raster(ivar) … … 315 339 check_coord=~isempty(DimRank); 316 340 end 317 % check_coord= (check_coord_names(ivar) && strcmp(Data.VarDimName{ivar},DimCell_var{1}))||...% coord varbable 318 % (check_coord_raster(ivar) && strcmp(Data.ListVarName{ivar},DimCell_var{1})); % rasrewr coord defined by min and max 319 if check_coord 320 CellInfo{icell}.CoordType='grid'; 321 CellInfo{icell}.CoordIndex(1)=ivar; 322 CellInfo{icell}.ZName=Data.ListVarName{ivar}; 323 CellInfo{icell}.ZIndex=ivar; 324 CellInfo{icell}.DimOrder=DimRank; 325 break 326 end 327 end 328 end 329 for ivar=ind_coord_y 330 if check_coord_names(ivar) 331 DimRank=find(strcmp(Data.VarDimName{ivar},DimCell_var)); 332 check_coord=~isempty(DimRank); 333 elseif check_coord_raster(ivar) 334 DimRank=find(strcmp(Data.ListVarName{ivar},DimCell_var)); 335 check_coord=~isempty(DimRank); 336 end 337 % check_coord= (check_coord_names(ivar) && strcmp(Data.VarDimName{ivar},DimCell_var{NbDim(icell)-1}))||...% coord variable 338 % (check_coord_raster(ivar) && strcmp(Data.ListVarName{ivar},DimCell_var{NbDim(icell)-1})); % rasrewr coord defined by min and max 341 % check_coord= (check_coord_names(ivar) && strcmp(Data.VarDimName{ivar},DimCell_var{NbDim(icell)-1}))||...% coord variable 342 % (check_coord_raster(ivar) && strcmp(Data.ListVarName{ivar},DimCell_var{NbDim(icell)-1})); % rasrewr coord defined by min and max 339 343 if check_coord 340 344 CellInfo{icell}.CoordType='grid'; … … 348 352 for ivar=ind_coord_x 349 353 if check_coord_names(ivar) 350 354 DimRank=find(strcmp(Data.VarDimName{ivar},DimCell_var)); 351 355 check_coord=~isempty(DimRank); 352 356 elseif check_coord_raster(ivar) … … 354 358 check_coord=~isempty(DimRank); 355 359 end 356 % check_coord= (check_coord_names(ivar) && strcmp(Data.VarDimName{ivar},DimCell_var{NbDim(icell)}))||...% coord variable357 % (check_coord_raster(ivar) && strcmp(Data.ListVarName{ivar},DimCell_var{NbDim(icell)})); % raster coord defined by min and max360 % check_coord= (check_coord_names(ivar) && strcmp(Data.VarDimName{ivar},DimCell_var{NbDim(icell)}))||...% coord variable 361 % (check_coord_raster(ivar) && strcmp(Data.ListVarName{ivar},DimCell_var{NbDim(icell)})); % raster coord defined by min and max 358 362 if check_coord 359 363 CellInfo{icell}.CoordIndex(NbDim(icell))=ivar; … … 400 404 CellInfo{icell}.CoordSize=[size(Data.(VarName),3) size(Data.(VarName),2) size(Data.(VarName),1)]; 401 405 else 402 CellInfo{icell}.CoordSize=[size(Data.(VarName), 2) size(Data.(VarName),1)];406 CellInfo{icell}.CoordSize=[size(Data.(VarName),1) size(Data.(VarName),2)]; 403 407 end 404 408 case 'tps' -
trunk/src/proj_field.m
r1054 r1057 1608 1608 XI=ObjectData.Coord(1,1)+(X)*cos(PlaneAngle(2))-YI*sin(PlaneAngle(1));%corresponding coordinates in the original system 1609 1609 YI=ObjectData.Coord(1,2)+(X)*sin(PlaneAngle(2))+YI*cos(PlaneAngle(1)); 1610 if numel(Coord{1})==2% x coordiante defiend by its bounds, get the whole set 1610 1611 if numel(Coord{1})==2% x coordinate defined by its bounds, get the whole set 1611 1612 Coord{1}=linspace(Coord{1}(1),Coord{1}(2),CellInfo{icell}.CoordSize(1)); 1612 1613 end -
trunk/src/transform_field/ima_color2BW.m
r1027 r1057 26 26 %======================================================================= 27 27 28 function DataOut=ima_color2BW(DataIn) 29 28 function DataOut=ima_color2BW(DataIn,XmlData) 29 DataOut=[]; 30 if isfield(DataIn,'Action') && isfield(DataIn.Action,'RUN') && isequal(DataIn.Action.RUN,0) 31 return 32 end 30 33 DataOut=DataIn; %default 31 34 if ndims(DataOut.A)==3 -
trunk/src/uvmat.m
r1054 r1057 3615 3615 ParamIn_1.Coord_y=get(handles.Coord_y,'String'); 3616 3616 end 3617 [Field{2},ParamOut_1,errormsg] = read_field(FileName_1,UvData.File Type{2},ParamIn_1,frame_index_1);3617 [Field{2},ParamOut_1,errormsg] = read_field(FileName_1,UvData.FileInfo{2}.FileType,ParamIn_1,frame_index_1); 3618 3618 if ~isempty(errormsg) 3619 3619 errormsg=['error in reading ' FieldName_1 ' in ' FileName_1 ': ' errormsg]; 3620 3620 return 3621 3621 end 3622 if isstruct(ParamOut_1)&&~strcmp(ParamOut_1.FieldName,'get_field...')&& (strcmp(UvData.File Type{2},'civdata')||strcmp(UvData.FileType{2},'civx'))...3622 if isstruct(ParamOut_1)&&~strcmp(ParamOut_1.FieldName,'get_field...')&& (strcmp(UvData.FileInfo{2}.FileType,'civdata')||strcmp(UvData.FileInfo{2}.FileType,'civx'))... 3623 3623 &&~strcmp(ParamOut_1.FieldName,'velocity') && ~strcmp(ParamOut_1.FieldName,'get_field...') 3624 3624 if ~check_proj_tps … … 3668 3668 test_veltype_1=1; 3669 3669 set(handles.VelType_1,'Visible','on') 3670 menu=set_veltype_display(ParamOut_1.CivStage,UvData.File Type{2});3670 menu=set_veltype_display(ParamOut_1.CivStage,UvData.FileInfo{2}.FileType); 3671 3671 index_menu=strcmp(ParamOut_1.VelType,menu); 3672 3672 set(handles.VelType_1,'Value',1+find(index_menu,1)) … … 4119 4119 % display menus and plot histograms 4120 4120 test_v=0; 4121 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% A REMETTRE4122 4121 if ~isempty(menu_histo) 4123 4122 set(handles.HistoMenu,'Value',1)
Note: See TracChangeset
for help on using the changeset viewer.