Changeset 844
- Timestamp:
- Dec 15, 2014, 10:03:23 PM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series.m
r842 r844 279 279 Param.HiddenData.FileInfo{2},Param.HiddenData.MovieObject{2},2) 280 280 end 281 %% enable field and veltype menus, in accordance with the current action 282 ActionName_Callback([],[], handles) 283 284 %% set length of waitbar 285 displ_time(handles) 286 281 287 else 282 288 set(handles.REFRESH,'BackgroundColor',[1 0 1])% set REFRESH button to magenta color to indicate that input refresh is needed … … 592 598 end 593 599 end 600 %% enable field and veltype menus, in accordance with the current action 601 ActionName_Callback([],[], handles) 602 603 %% set length of waitbar 604 displ_time(handles) 605 594 606 set(handles.REFRESH,'BackgroundColor',[1 0 0])% set REFRESH button to red color (indicate activation finished) 595 607 set(handles.series,'Pointer','arrow') % set the mouse pointer to 'watch' … … 764 776 %% initiate input file series and refresh the current field view: 765 777 update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,FileInfo,MovieObject,iview); 778 %% enable field and veltype menus, in accordance with the current action 779 ActionName_Callback([],[], handles) 780 781 %% set length of waitbar 782 displ_time(handles) 783 766 784 set(handles.REFRESH,'BackgroundColor',[1 0 0])% set REFRESH button to red color (end of activation) 767 785 … … 1042 1060 CData=cat(3,zeros(size(CData)),CData,zeros(size(CData)));%make color images r=0,g,b=0 1043 1061 set(handles.FileStatus,'CData',CData); 1044 1045 %% enable field and veltype menus, in accordance with the current action1046 ActionName_Callback([],[], handles)1047 1048 %% set length of waitbar1049 displ_time(handles)1050 1051 1062 1052 1063 %-----------------------------------------------------------guide ------------- … … 2175 2186 2176 2187 %% definition of the directory containing the output files 2177 SubDirOut='';%default 2178 OutputDirExt='.series'; %default 2179 if isfield(ParamOut,'OutputDirExt')&&~isempty(ParamOut.OutputDirExt) 2180 OutputDirExt=ParamOut.OutputDirExt; 2181 end 2182 set(handles.OutputDirExt,'String',OutputDirExt) 2183 OutputDirVisible='off'; 2184 OutputSubDirMode='auto';%default 2185 if isfield(ParamOut,'OutputSubDirMode') 2186 OutputSubDirMode=ParamOut.OutputSubDirMode; 2187 end 2188 switch OutputSubDirMode 2189 case 'auto';%default 2190 OutputDirVisible='on'; 2191 SubDir=InputTable(1:end,2); %set of subdirectories 2192 SubDirOut=SubDir{1}; 2193 if numel(SubDir)>1 2194 for ilist=2:numel(SubDir) 2195 SubDirOut=[SubDirOut '-' SubDir{ilist}]; 2188 if ~(isfield(SeriesData,'ActionName') && strcmp(ActionName,SeriesData.ActionName)) 2189 OutputDirExt='.series'; %default 2190 if isfield(ParamOut,'OutputDirExt')&&~isempty(ParamOut.OutputDirExt) 2191 OutputDirExt=ParamOut.OutputDirExt; 2192 end 2193 set(handles.OutputDirExt,'String',OutputDirExt) 2194 OutputDirVisible='off'; 2195 OutputSubDirMode='auto';%default 2196 SubDirOut=''; 2197 if isfield(ParamOut,'OutputSubDirMode') 2198 OutputSubDirMode=ParamOut.OutputSubDirMode; 2199 end 2200 switch OutputSubDirMode 2201 case 'auto';%default 2202 OutputDirVisible='on'; 2203 SubDir=InputTable(1:end,2); %set of subdirectories 2204 SubDirOut=SubDir{1}; 2205 if numel(SubDir)>1 2206 for ilist=2:numel(SubDir) 2207 SubDirOut=[SubDirOut '-' SubDir{ilist}]; 2208 end 2196 2209 end 2197 end 2198 case 'first' 2199 OutputDirVisible='on'; 2200 SubDirOut=InputTable{1,2}; %use the first subdir name (+OutputDirExt) as output subdirectory 2201 case 'last' 2202 OutputDirVisible='on'; 2203 SubDirOut=InputTable{end,2}; %use the last subdir name (+OutputDirExt) as output subdirectory 2204 end 2205 set(handles.OutputSubDir,'String',SubDirOut) 2206 set(handles.OutputDirExt,'Visible',OutputDirVisible) 2207 set(handles.OutputSubDir,'Visible',OutputDirVisible) 2208 set(handles.OutputDir_title,'Visible',OutputDirVisible) 2209 2210 %% visibility of the run mode (local or background or cluster) 2211 if strcmp(OutputSubDirMode,'none') 2212 RunModeVisible='off';% only local mode available if no output file is produced 2213 else 2214 RunModeVisible='on'; 2215 end 2216 set(handles.RunMode,'Visible',RunModeVisible) 2217 set(handles.ActionExt,'Visible',RunModeVisible) 2218 set(handles.RunMode_title,'Visible',RunModeVisible) 2219 set(handles.ActionExt_title,'Visible',RunModeVisible) 2220 2210 case 'first' 2211 OutputDirVisible='on'; 2212 SubDirOut=InputTable{1,2}; %use the first subdir name (+OutputDirExt) as output subdirectory 2213 case 'last' 2214 OutputDirVisible='on'; 2215 SubDirOut=InputTable{end,2}; %use the last subdir name (+OutputDirExt) as output subdirectory 2216 end 2217 set(handles.OutputSubDir,'String',SubDirOut) 2218 set(handles.OutputDirExt,'Visible',OutputDirVisible) 2219 set(handles.OutputSubDir,'Visible',OutputDirVisible) 2220 set(handles.OutputDir_title,'Visible',OutputDirVisible) 2221 SeriesData.ActionName=ActionName;%record ActionName for next use 2222 2223 2224 %% visibility of the run mode (local or background or cluster) 2225 if strcmp(OutputSubDirMode,'none') 2226 RunModeVisible='off';% only local mode available if no output file is produced 2227 else 2228 RunModeVisible='on'; 2229 end 2230 set(handles.RunMode,'Visible',RunModeVisible) 2231 set(handles.ActionExt,'Visible',RunModeVisible) 2232 set(handles.RunMode_title,'Visible',RunModeVisible) 2233 set(handles.ActionExt_title,'Visible',RunModeVisible) 2234 end 2221 2235 2222 2236 %% Expected nbre of output files -
trunk/src/series/extract_rdvision.m
r843 r844 361 361 NbBinFile=0; 362 362 BinSize=0; 363 fid=0; 363 364 errormsg=''; 364 365 classname=sprintf('uint%d',SeqData.bytesperpixel*8); -
trunk/src/series/stereo_civ.m
r834 r844 87 87 [tild,i1_series,i2_series,j1_series,j2_series]=get_file_series(Param); 88 88 for iview=1:size(Param.InputTable,1) 89 XmlFileName=find_imadoc(Param.InputTable{ 1,1},Param.InputTable{1,2},Param.InputTable{1,3},Param.InputTable{1,5});89 XmlFileName=find_imadoc(Param.InputTable{iview,1},Param.InputTable{iview,2},Param.InputTable{iview,3},Param.InputTable{iview,5}); 90 90 if isempty(XmlFileName) 91 91 disp_uvmat('ERROR', [XmlFileName ' not found'],checkrun) … … 285 285 end 286 286 [A,Rangx,Rangy]=phys_ima(A,XmlData,1); 287 288 289 PhysImageA=fullfile_uvmat(RootPath_A,Civ1Dir,RootFile_A,'.png','_1a',i1_series_Civ1(ifield),[],1); 290 PhysImageB=fullfile_uvmat(RootPath_A,Civ1Dir,RootFile_A,'.png','_1a',i1_series_Civ1(ifield),[],2); 291 imwrite(A{1},PhysImageA) 292 imwrite(A{2},PhysImageB) 287 293 par_civ1.ImageA=A{1}; 288 294 par_civ1.ImageB=A{2}; … … 414 420 if isfield (Param.ActionInput,'Civ2') 415 421 par_civ2=Param.ActionInput.Civ2; 416 par_civ2.ImageA= [];417 par_civ2.ImageB= [];422 par_civ2.ImageA=par_civ1.ImageA; 423 par_civ2.ImageB=par_civ1.ImageB; 418 424 % if ~isfield(Param.Civ1,'ImageA') 419 425 i1=i1_series_Civ2(ifield); … … 430 436 j2=j2_series_Civ2(ifield); 431 437 end 432 ImageName_A_Civ2=fullfile_uvmat(RootPath_A,SubDir_A,RootFile_A,FileExt_A,NomType_A,i1,[],j1);433 434 if strcmp(ImageName_A_Civ2,ImageName_A) && isequal(FrameIndex_A_Civ1(ifield),FrameIndex_A_Civ2(ifield))435 par_civ2.ImageA=par_civ1.ImageA;436 else437 [par_civ2.ImageA,VideoObject_A] = read_image(ImageName_A_Civ2,FileType_A,VideoObject_A,FrameIndex_A_Civ2(ifield));438 end439 ImageName_B_Civ2=fullfile_uvmat(RootPath_B,SubDir_B,RootFile_B,FileExt_B,NomType_B,i2,[],j2);440 if strcmp(ImageName_B_Civ2,ImageName_B) && isequal(FrameIndex_B_Civ1(ifield),FrameIndex_B_Civ2)441 par_civ2.ImageB=par_civ1.ImageB;442 else443 [par_civ2.ImageB,VideoObject_B] = read_image(ImageName_B_Civ2,FileType_B,VideoObject_B,FrameIndex_B_Civ2(ifield));444 end445 446 ncfile=fullfile_uvmat(RootPath_A,OutputDir,RootFile_A,'.nc',NomTypeNc,i1,i2,...447 j1,j2);448 438 par_civ2.ImageWidth=FileInfo_A.Width; 449 439 par_civ2.ImageHeight=FileInfo_A.Height; … … 498 488 ibx2=ceil(par_civ2.CorrBoxSize(1)/2); 499 489 iby2=ceil(par_civ2.CorrBoxSize(2)/2); 500 par_civ2.SearchBoxSize(1)=2*ibx2+9;% search ara +-4 pixels around the guess 501 par_civ2.SearchBoxSize(2)=2*iby2+9; 502 Civ2_Dt=time(i2+1,j2+1)-time(i1+1,j1+1); 503 par_civ2.SearchBoxShift=(Civ2_Dt/Data.Civ1_Dt)*[Shiftx(nbval>=1)./nbval(nbval>=1) Shifty(nbval>=1)./nbval(nbval>=1)]; 490 % par_civ2.SearchBoxSize(1)=2*ibx2+9;% search ara +-4 pixels around the guess 491 % par_civ2.SearchBoxSize(2)=2*iby2+9; 492 par_civ2.SearchBoxShift=[Shiftx(nbval>=1)./nbval(nbval>=1) Shifty(nbval>=1)./nbval(nbval>=1)]; 504 493 par_civ2.Grid=[par_civ2.Grid(nbval>=1,1)-par_civ2.SearchBoxShift(:,1)/2 par_civ2.Grid(nbval>=1,2)-par_civ2.SearchBoxShift(:,2)/2];% grid taken at the extrapolated origin of the displacement vectors 505 494 if par_civ2.CheckDeformation … … 509 498 par_civ2.DVDY=DVDY./nbval; 510 499 end 511 % cal uclate velocity data (y and v in indices, reverse to y component)500 % calculate velocity data (y and v in indices, reverse to y component) 512 501 [xtable ytable utable vtable ctable F] = civ (par_civ2); 513 502 list_param=(fieldnames(Param.ActionInput.Civ2))'; … … 518 507 Data.Civ2_ImageB=ImageName_B; 519 508 Data.Civ2_Time=(time(i2+1,j2+1)+time(i1+1,j1+1))/2; 520 Data.Civ2_Dt=Civ2_Dt; 521 % Data.Civ2_Time=1; 522 % Data.Civ2_Dt=1; 509 Data.Civ2_Dt=0; 523 510 for ilist=1:length(list_param) 524 511 Data.(Civ2_param{4+ilist})=Param.ActionInput.Civ2.(list_param{ilist}); -
trunk/src/uvmat.m
r837 r844 1217 1217 GeometryCalib.SliceCoord=Z_plane'*[0 0 1]; 1218 1218 GeometryCalib.SliceAngle=zeros(GeometryCalib.NbSlice,3); 1219 GeometryCalib.SliceAngle(:,1)=SliceData.SliceAngle(1)*ones(GeometryCalib.NbSlice,1);%rotation around x axis (to generalise) 1220 GeometryCalib.SliceAngle(:,2)=SliceData.SliceAngle(2)*ones(GeometryCalib.NbSlice,1);%rotation around y axis (to generalise) 1219 Angle_1=linspace(SliceData.SliceAngle_1(1),SliceData.SliceAngle_1(2),SliceData.NbSlice); 1220 Angle_2=linspace(SliceData.SliceAngle_2(1),SliceData.SliceAngle_2(2),SliceData.NbSlice); 1221 GeometryCalib.SliceAngle(:,1)=Angle_1';%rotation around x axis (to generalise) 1222 GeometryCalib.SliceAngle(:,2)=Angle_2';%rotation around y axis (to generalise) 1221 1223 GeometryCalib.SliceAngle(:,3)=0; 1222 1224 if SliceData.CheckRefraction
Note: See TracChangeset
for help on using the changeset viewer.