- Timestamp:
- Oct 28, 2013, 2:29:07 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/civ_input.m
r668 r692 1734 1734 [Path,ref.subdir,File,ref.num1,ref.num2,ref.num_a,ref.num_b,ref.ext,ref.nom_type]=fileparts_uvmat(fileinput); 1735 1735 ref.filebase=fullfile(Path,File); 1736 % ref.num_a=stra2num(str_a);1737 % ref.num_b=stra2num(str_b);1738 % ref.num1=str2num(field_count);1739 % ref.num2=str2num(str2);1736 % ref.num_a=stra2num(str_a); 1737 % ref.num_b=stra2num(str_b); 1738 % ref.num1=str2num(field_count); 1739 % ref.num2=str2num(str2); 1740 1740 browse=[];%initialisation 1741 1741 if ~isequal(ref.ext,'.nc') … … 1831 1831 ref_j=1;%default j index 1832 1832 end 1833 % [filecell,i1,i2]=set_civ_filenames(handles,ref_i,ref_j,[1 0 0 0 0 0]);% get the corresponding file name and indices1833 % [filecell,i1,i2]=set_civ_filenames(handles,ref_i,ref_j,[1 0 0 0 0 0]);% get the corresponding file name and indices 1834 1834 Data.ListVarName={'ny','nx','A'}; 1835 1835 Data.VarDimName= {'ny','nx',{'ny','nx'}}; … … 1841 1841 ind_A=2; 1842 1842 end 1843 [i1_series_Civ1,i2_series_Civ1,j1_series_Civ1,j2_series_Civ1,check_bounds,NomTypeNc]=... 1844 find_pair_indices(PairCiv1,i_series{1},j_series{1},MinIndex_i,MaxIndex_i,MinIndex_j,MaxIndex_j); 1845 1843 list_pair=get(handles.ListPairCiv1,'String');%get the menu of image pairs 1844 PairString=list_pair{get(handles.ListPairCiv1,'Value')}; 1845 % [i1_series_Civ1,i2_series_Civ1,j1_series_Civ1,j2_series_Civ1,check_bounds,NomTypeNc]=... 1846 % find_pair_indices(PairCiv1,i_series{1},j_series{1},MinIndex_i,MaxIndex_i,MinIndex_j,MaxIndex_j); 1847 [ind1,ind2,mode]=find_pair_indices(PairString,ref_i,ref_j)%,MinIndex_i,MaxIndex_i,MinIndex_j,MaxIndex_j) 1848 switch mode 1849 case 'Di' 1850 i1=ref_i+ind1; 1851 i2=ref_i+ind2; 1852 j1=ref_j; 1853 j2=ref_j; 1854 case 'Dj' 1855 i1=ref_i; 1856 i2=ref_i; 1857 j1=ref_j+ind1; 1858 j2=ref_j+ind2; 1859 case 'burst' 1860 1861 i1=ref_i; 1862 i2=ref_i; 1863 j1=ind1; 1864 j2=ind2; 1865 end 1846 1866 ImageName_A=fullfile_uvmat(InputTable{ind_A,1},InputTable{ind_A,2},InputTable{ind_A,3},InputTable{ind_A,5},InputTable{ind_A,4},... 1847 ref_i,[],ref_j); 1848 Data.A=imread(filecell.ima1.civ1{1}); % read the first image 1867 i1,[],j1); 1868 ImageName_B=fullfile_uvmat(InputTable{ind_A,1},InputTable{ind_A,2},InputTable{ind_A,3},InputTable{ind_A,5},InputTable{ind_A,4},... 1869 i2,[],j2); 1870 Data.A=imread(ImageName_A); % read the first image 1849 1871 if ndims(Data.A)==3 %case of color image 1850 1872 Data.VarDimName= {'ny','nx',{'ny','nx','rgb'}}; … … 1852 1874 Data.ny=[size(Data.A,1) 1]; 1853 1875 Data.nx=[1 size(Data.A,2)]; 1854 Data.CoordUnit='pixel';% used to set equal scaling for x and y in image dispa ly1876 Data.CoordUnit='pixel';% used to set equal scaling for x and y in image dispa=ly 1855 1877 par_civ1=read_GUI(handles.Civ1); 1856 par_civ1.FileTypeA=get_file_type( filecell.ima1.civ1{1});1878 par_civ1.FileTypeA=get_file_type(ImageName_A); 1857 1879 par_civ1.ImageWidth=size(Data.A,2); 1858 1880 par_civ1.ImageHeight=size(Data.A,1); … … 1861 1883 par_civ1.FrameIndexB=num2str(i2); 1862 1884 Param.Civ1=par_civ1; 1863 Grid=civ_matlab(Param);% get the grid of x, y positions set for PIV 1885 Grid=civ_matlab(Param);% get the grid of x, y positions set for PIV 1864 1886 hview_field=view_field(Data); %view the image in the GUI view_field 1865 1887 set(0,'CurrentFigure',hview_field) … … 1868 1890 ViewData=get(hview_field,'UserData'); 1869 1891 ViewData.CivHandle=handles.civ_input;% indicate the handle of the civ GUI in view_field 1870 ViewData.PlotAxes.B=imread( filecell.ima2.civ1{1});%store the second image in the UserData of the GUI view_field1892 ViewData.PlotAxes.B=imread(ImageName_B);%store the second image in the UserData of the GUI view_field 1871 1893 ViewData.PlotAxes.X=Grid.Civ1_X; %keep the set of points in memeory 1872 1894 ViewData.PlotAxes.Y=Grid.Civ1_Y; … … 1878 1900 set(corrfig,'name','image correlation') 1879 1901 set(corrfig,'DeleteFcn',{@closeview_field})% 1880 end 1881 set(handles.TestCiv1,'BackgroundColor',[1 0 0]) 1882 else 1883 set(handles.TestCiv1,'BackgroundColor',[1 0 0])% paint button to red 1884 corrfig=findobj(allchild(0),'tag','corrfig');% look for a current figure for image correlation display 1885 if ~isempty(corrfig) 1886 delete(corrfig) 1887 end 1888 hview_field=findobj(allchild(0),'tag','view_field');% look for view_field 1889 if ~isempty(hview_field) 1890 delete(hview_field) 1902 % end 1903 set(handles.TestCiv1,'BackgroundColor',[1 0 0]) 1904 else 1905 set(handles.TestCiv1,'BackgroundColor',[1 0 0])% paint button to red 1906 corrfig=findobj(allchild(0),'tag','corrfig');% look for a current figure for image correlation display 1907 if ~isempty(corrfig) 1908 delete(corrfig) 1909 end 1910 hview_field=findobj(allchild(0),'tag','view_field');% look for view_field 1911 if ~isempty(hview_field) 1912 delete(hview_field) 1913 end 1891 1914 end 1892 1915 end … … 2028 2051 %------------------------------------------------------------------------ 2029 2052 % --- determine the list of index pairs of processing file 2030 function [ind1,ind2 ]=...2053 function [ind1,ind2,mode]=... 2031 2054 find_pair_indices(str_civ,i_series,j_series,MinIndex_i,MaxIndex_i,MinIndex_j,MaxIndex_j) 2032 2055 %------------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.