- Timestamp:
- Apr 2, 2012, 4:23:26 PM (13 years ago)
- Location:
- trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r384 r386 2425 2425 movieobject1=[];%default 2426 2426 if strcmpi(ext_ima,'.avi') 2427 hhh=which('mmreader'); 2428 if ~isequal(hhh,'')&& mmreader.isPlatformSupported()% if the mmreader function is found (recent version of matlab) 2427 if ~isempty(which('mmreader'))% if the mmreader function is found (recent version of matlab) 2429 2428 type_ima1='movie'; 2430 movieobject1=mmreader([file base_ima2ext_ima]);2429 movieobject1=mmreader([filecell.filebase ext_ima]); 2431 2430 else 2432 2431 type_ima1='avi'; … … 2445 2444 movieobject2=[]; 2446 2445 if strcmpi(ext_ima,'.avi') 2447 hhh=which('mmreader'); 2448 if ~isequal(hhh,'')&& mmreader.isPlatformSupported()% if the mmreader function is found (recent version of matlab) 2446 if ~isempty(which('mmreader'))% if the mmreader function is found (recent version of matlab) 2449 2447 type_ima2='movie'; 2450 movieobject2=mmreader([file base_ima2ext_ima]);2448 movieobject2=mmreader([filecell.filebase ext_ima]); 2451 2449 else 2452 2450 type_ima2='avi'; -
trunk/src/civ_matlab.m
r383 r386 59 59 if ischar(par_civ1.ImageB) 60 60 temp=par_civ1.ImageA; 61 par_civ1.ImageA= imread(par_civ1.ImageB);61 par_civ1.ImageA=sum(imread(par_civ1.ImageB),3); 62 62 end 63 63 if ischar(temp) 64 par_civ1.ImageB= imread(temp);64 par_civ1.ImageB=sum(imread(temp),3); 65 65 end 66 66 end 67 67 else 68 68 if ischar(par_civ1.ImageA) 69 par_civ1.ImageA= imread(par_civ1.ImageA);69 par_civ1.ImageA=sum(imread(par_civ1.ImageA),3); 70 70 end 71 71 if ischar(par_civ1.ImageB) 72 par_civ1.ImageB= imread(par_civ1.ImageB);72 par_civ1.ImageB=sum(imread(par_civ1.ImageB),3); 73 73 end 74 74 end -
trunk/src/find_file_series.m
r385 r386 51 51 j1_series=zeros(1,1,1); 52 52 j2_series=zeros(1,1,1); 53 % ifile_min=1;%default 53 54 [FileType,FileInfo,Object]=get_file_type(fullfileinput); 54 55 if strcmp( FileType,'multimage')||strcmp( FileType,'video') … … 233 234 NomType=regexprep(NomType,['^' NomTypePref],''); 234 235 end 235 end 236 237 %% update the file type if the input file does not exist (pb of 0001) 238 if isempty(FileType) 239 [FileType,tild,Object]=get_file_type(dirpair(ifile_min).name); 240 end 236 %% update the file type if the input file does not exist (pb of 0001) 237 if isempty(FileType) 238 [FileType,tild,Object]=get_file_type(dirpair(ifile_min).name); 239 end 240 end 241 242 241 243 242 244 %% set to empty array the irrelevant index series -
trunk/src/get_file_type.m
r380 r386 36 36 end 37 37 else 38 error_nc=0; 38 39 try 39 40 Data=nc2struct(fileinput,'ListGlobalAttribute','absolut_time_T0','Conventions',... 40 41 'CivStage','patch2','fix2','civ2','patch','fix'); 41 if ~isempty(Data.absolut_time_T0') 42 FileType='civx'; % test for civx velocity fields 43 if ~isempty(Data.patch2) && isequal(Data.patch2,1) 44 FileInfo.CivStage=6; 45 elseif ~isempty(Data.fix2) && isequal(Data.fix2,1) 46 FileInfo.CivStage=5; 47 elseif ~isempty(Data.civ2) && isequal(Data.civ2,1); 48 FileInfo.CivStage=4; 49 elseif ~isempty(Data.patch) && isequal(Data.patch,1); 50 FileInfo.CivStage=3; 51 elseif ~isempty(Data.fix) && isequal(Data.fix,1); 52 FileInfo.CivStage=2; 53 elseif ~isempty(Data.absolut_time_T0) && ~isempty(Data.hart) 54 FileInfo.CivStage=1; 42 if ~isempty(Data.Txt) 43 error_nc=1; 44 else 45 if ~isempty(Data.absolut_time_T0') 46 FileType='civx'; % test for civx velocity fields 47 if ~isempty(Data.patch2) && isequal(Data.patch2,1) 48 FileInfo.CivStage=6; 49 elseif ~isempty(Data.fix2) && isequal(Data.fix2,1) 50 FileInfo.CivStage=5; 51 elseif ~isempty(Data.civ2) && isequal(Data.civ2,1); 52 FileInfo.CivStage=4; 53 elseif ~isempty(Data.patch) && isequal(Data.patch,1); 54 FileInfo.CivStage=3; 55 elseif ~isempty(Data.fix) && isequal(Data.fix,1); 56 FileInfo.CivStage=2; 57 elseif ~isempty(Data.absolut_time_T0) && ~isempty(Data.hart) 58 FileInfo.CivStage=1; 59 end 60 elseif strcmp(Data.Conventions,'uvmat/civdata') 61 FileType='civdata'; % test for civx velocity fields 62 FileInfo.CivStage=Data.CivStage; 63 else 64 FileType='netcdf'; 55 65 end 56 elseif strcmp(Data.Conventions,'uvmat/civdata')57 FileType='civdata'; % test for civx velocity fields58 FileInfo.CivStage=Data.CivStage;59 else60 FileType='netcdf';61 66 end 67 catch ME 68 error_nc=1; 62 69 end 63 try64 if exist('VideoReader','file')%recent version of Matlab65 Object=VideoReader(fullfileinput);66 else67 Object=mmreader(fullfileinput);%older Matlab function for movies68 end69 FileType='video';70 FileInfo.NbFrame=get(Object,'NumberOfFrames');70 if error_nc 71 if exist('VideoReader','file')%recent version of Matlab 72 Object=VideoReader(fileinput); 73 else 74 Object=mmreader(fileinput);%older Matlab function for movies 75 end 76 FileType='video'; 77 FileInfo.NbFrame=get(Object,'NumberOfFrames'); 71 78 end 72 79 end -
trunk/src/uvmat.m
r384 r386 47 47 % .FieldName_1:(char string) second field selected('image', 'velocity'...) 48 48 % .CName: (char string)name of the scalar used for vector colors 49 % .MovieObject : movie object representing an input movie50 % .MovieObject _1: idem for a second input series (_1)49 % .MovieObject{1}: movie object representing an input movie 50 % .MovieObject{2}: idem for a second input series (_1) 51 51 % .filename_1 : last second input file name (to deal with a constant second input without reading again the file) 52 52 % .VelType_1: last velocity type (VelType, civ2...) for the second input series … … 1568 1568 NomType=get(handles.NomType,'String'); 1569 1569 i1=str2num(get(handles.i1,'String'));%read the field indices (for movie, it is not given by the file name) 1570 i2=str2num(get(handles.i2,'String')); 1571 j1=1; 1570 i2=[];%default 1571 if strcmp(get(handles.i2,'Visible'),'on') 1572 i2=str2num(get(handles.i2,'String')); 1573 end 1574 j1=[]; 1572 1575 if strcmp(get(handles.j1,'Visible'),'on') 1573 1576 j1=stra2num(get(handles.j1,'String')); … … 1592 1595 set(handles.CheckFixPair,'Value',0) 1593 1596 end 1594 CheckFixPair=get(handles.CheckFixPair,'Value') ;1597 CheckFixPair=get(handles.CheckFixPair,'Value')||(isempty(i2)&&isempty(j2)); 1595 1598 if CheckFixPair 1596 1599 if get(handles.scan_i,'Value')==1% case of scanning along index i … … 2000 2003 ParamIn.Npy=UvData.XmlData.Npy; 2001 2004 ParamIn.Npx=UvData.XmlData.Npx; 2002 else 2003 2005 else 2004 2006 errormsg='Npx and Npy need to be defined in the xml file for volume images .vol'; 2005 2007 return
Note: See TracChangeset
for help on using the changeset viewer.