- Timestamp:
- Nov 9, 2016, 7:12:32 PM (8 years ago)
- Location:
- trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mouse_motion.m
r966 r970 215 215 text_displ_1=[xName '=' num2str(xy(1,1),4) ', ' yName '=' num2str(xy(1,2),4) ',']; 216 216 end 217 %display the z coordinateif defined by the projection plane217 %display the original phys x,y,z coordinates if defined by the projection plane 218 218 if isfield(Field,'ProjObjectType') && strcmp(Field.ProjObjectType,'plane') && isfield(Field,'ProjObjectCoord') && length(Field.ProjObjectCoord)>=3 219 pos=[xy(1,1) xy(1,2) 0]; 219 pos=[xy(1,1) xy(1,2) 0];%coordinates on the graph 220 220 if isfield(Field,'ProjObjectAngle')&&~isequal(Field.ProjObjectAngle,[0 0 0]) 221 221 om=norm(Field.ProjObjectAngle);%norm of rotation angle in radians -
trunk/src/phys_ima.m
r922 r970 67 67 SliceCoord=Calib.SliceCoord(ZIndex,:); 68 68 zphys=SliceCoord(3); %to generalize for non-parallel planes 69 70 % if isfield(Calib,'SliceAngle')&&~isequal(Calib.SliceAngle,[0 0 0]) 71 % om=norm(Calib.SliceAngle);%norm of rotation angle in radians 72 % OmAxis=Calib.SliceAngle/om; %unit vector marking the rotation axis 73 % cos_om=cos(pi*om/180); 74 % sin_om=sin(pi*om/180); 75 % pos=[xy(1,1) xy(1,2) 0]; 76 % pos=cos_om*pos+sin_om*cross(OmAxis,pos)+(1-cos_om)*(OmAxis*pos')*OmAxis; 77 % end 78 79 69 80 % if isfield(Calib,'InterfaceCoord') && isfield(Calib,'RefractionIndex') 70 81 % H=Calib.InterfaceCoord(3); -
trunk/src/series.m
r963 r970 2722 2722 if isequal(FileInfo.FileType,'civdata') 2723 2723 if ismember(TimeName,{'civ1','filter1'}) 2724 if isfield(Data,'Civ1_Time') 2724 2725 TimeValue=Data.Civ1_Time; 2726 end 2727 if isfield(Data,'Civ1_Dt') 2725 2728 DtValue=Data.Civ1_Dt; 2729 end 2726 2730 else 2731 if isfield(Data,'Civ2_Time') 2727 2732 TimeValue=Data.Civ2_Time; 2733 end 2734 if isfield(Data,'Civ2_Dt') 2728 2735 DtValue=Data.Civ2_Dt; 2736 end 2729 2737 end 2730 2738 else -
trunk/src/series/time_series.m
r960 r970 172 172 ImageTypeOptions={'image','multimage','mmreader','video'}; 173 173 NcTypeOptions={'netcdf','civx','civdata'}; 174 FileType=cell(1, nbview);175 FileInfo=cell(1, nbview);176 MovieObject=cell(1, nbview);177 CheckImage=cell(1, nbview);178 CheckNc=cell(1, nbview);179 frame_index=cell(1, nbview);180 181 for iview=1: nbview174 FileType=cell(1,NbView); 175 FileInfo=cell(1,NbView); 176 MovieObject=cell(1,NbView); 177 CheckImage=cell(1,NbView); 178 CheckNc=cell(1,NbView); 179 frame_index=cell(1,NbView); 180 181 for iview=1:NbView 182 182 if ~exist(filecell{iview,1}','file') 183 183 disp_uvmat('ERROR',['the first input file ' filecell{iview,1} ' does not exist'],checkrun) … … 233 233 return 234 234 end 235 if nbview==2 && ~isequal(CheckImage{1},CheckImage{2})235 if NbView==2 && ~isequal(CheckImage{1},CheckImage{2}) 236 236 disp_uvmat('ERROR','input must be two image series or two netcdf file series',checkrun) 237 237 return … … 252 252 %% Set field names and velocity types 253 253 InputFields{1}=[];%default (case of images) 254 if nbview==2254 if NbView==2 255 255 InputFields{2}=[];%default (case of images) 256 256 end 257 257 if isfield(Param,'InputFields') 258 258 InputFields{1}=Param.InputFields; 259 if nbview==2259 if NbView==2 260 260 InputFields{2}=Param.InputFields;%default 261 261 if isfield(Param.InputFields,'FieldName_1') … … 311 311 312 312 %%%%%%%%%%%%%%%% loop on field indices %%%%%%%%%%%%%%%% 313 for index=1: nbfield314 update_waitbar(WaitbarHandle,index/ nbfield)313 for index=1:NbField 314 update_waitbar(WaitbarHandle,index/NbField) 315 315 if ~isempty(RUNHandle) && ~strcmp(get(RUNHandle,'BusyAction'),'queue') 316 316 disp('program stopped by user') 317 317 break % leave the loop if stop is ordered 318 318 end 319 Data=cell(1, nbview);%initiate the set Data;319 Data=cell(1,NbView);%initiate the set Data; 320 320 nbtime=0; 321 321 dt=[]; 322 322 %%%%%%%%%%%%%%%% loop on views (input lines) %%%%%%%%%%%%%%%% 323 for iview=1: nbview323 for iview=1:NbView 324 324 % reading input file(s) 325 325 [Data{iview},tild,errormsg] = read_field(filecell{iview,index},FileType{iview},InputFields{iview},frame_index{iview}(index)); … … 407 407 testsum(ivar)=1; 408 408 DataOut.(VarName)=Field.(VarName); 409 DataOut.([VarName 'Histo'])=zeros([ nbfield numel(DataOut.(VarName))]);409 DataOut.([VarName 'Histo'])=zeros([NbField numel(DataOut.(VarName))]); 410 410 VarMesh=Field.(VarName)(2)-Field.(VarName)(1); 411 411 end … … 444 444 VarName=Field.ListVarName{ivar}; 445 445 siz=size(Field.(VarName)); 446 DataOut.(VarName)=zeros([ nbfield siz]);446 DataOut.(VarName)=zeros([NbField siz]); 447 447 end 448 448 end … … 466 466 if MaxIndex_new>MaxIndex% the variable max for the current field exceeds the previous one 467 467 DataOut.(VarName)=[DataOut.(VarName) VarMesh*(MaxIndex+1:MaxIndex_new)];% append the new variable values 468 DataOut.([VarName 'Histo'])=[DataOut.([VarName 'Histo']) zeros( nbfield,MaxIndex_new-MaxIndex)]; % append the new histo values468 DataOut.([VarName 'Histo'])=[DataOut.([VarName 'Histo']) zeros(NbField,MaxIndex_new-MaxIndex)]; % append the new histo values 469 469 end 470 470 if MinIndex_new <= MinIndex-1 471 471 DataOut.(VarName)=[VarMesh*(MinIndex_new:MinIndex-1) DataOut.(VarName)];% insert the new variable values 472 DataOut.([VarName 'Histo'])=[zeros( nbfield,MinIndex-MinIndex_new) DataOut.([VarName 'Histo'])];% insert the new histo values472 DataOut.([VarName 'Histo'])=[zeros(NbField,MinIndex-MinIndex_new) DataOut.([VarName 'Histo'])];% insert the new histo values 473 473 ind_start=1; 474 474 else … … 560 560 test_time=diff(DataOut.Time)>0;% test that the readed time is increasing (not constant) 561 561 if ~test_time 562 DataOut.Time=1: nbfield;562 DataOut.Time=1:NbField; 563 563 end 564 564 -
trunk/src/set_object.m
r967 r970 38 38 function varargout = set_object(varargin) 39 39 40 % Last Modified by GUIDE v2.5 09- Jul-2016 20:25:3740 % Last Modified by GUIDE v2.5 09-Nov-2016 15:46:04 41 41 42 42 % Begin initialization code - DO NOT REFRESH … … 823 823 824 824 825 % --- Executes on key press with focus on num_Angle_1 and none of its controls. 826 function num_Angle_1_KeyPressFcn(hObject, eventdata, handles) 827 % hObject handle to num_Angle_1 (see GCBO) 828 % eventdata structure with the following fields (see MATLAB.UI.CONTROL.UICONTROL) 829 % Key: name of the key that was pressed, in lower case 830 % Character: character interpretation of the key(s) that was pressed 831 % Modifier: name(s) of the modifier key(s) (i.e., control, shift) pressed 832 % handles structure with handles and user data (see GUIDATA) 833 834 835 % --- Executes on key press with focus on num_Angle_2 and none of its controls. 836 function num_Angle_2_KeyPressFcn(hObject, eventdata, handles) 837 % hObject handle to num_Angle_2 (see GCBO) 838 % eventdata structure with the following fields (see MATLAB.UI.CONTROL.UICONTROL) 839 % Key: name of the key that was pressed, in lower case 840 % Character: character interpretation of the key(s) that was pressed 841 % Modifier: name(s) of the modifier key(s) (i.e., control, shift) pressed 842 % handles structure with handles and user data (see GUIDATA) 825 % 826 827 828 % --- Executes on key press with focus on num_RangeX_2 and none of its controls. 829 function suggest_refresh(hObject, eventdata, handles) 830 set(handles.REFRESH,'BackgroundColor',[1 0 1])
Note: See TracChangeset
for help on using the changeset viewer.