- Timestamp:
- Apr 29, 2014, 10:10:30 AM (11 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/geometry_calib.m
r755 r757 816 816 end 817 817 818 819 818 % -------------------------------------------------------------------- 820 819 function MenuHelp_Callback(hObject, eventdata, handles) 821 path_to_uvmat=which('uvmat');% check the path of uvmat 822 pathelp=fileparts(path_to_uvmat); 823 helpfile=fullfile(pathelp,'uvmat_doc','uvmat_doc.html'); 824 if isempty(dir(helpfile)), msgbox_uvmat('ERROR','Please put the help file uvmat_doc.html in the sub-directory /uvmat_doc of the UVMAT package') 825 else 826 addpath (fullfile(pathelp,'uvmat_doc')) 827 web([helpfile '#geometry_calib']) 828 end 820 web('http://servforge.legi.grenoble-inp.fr/projects/soft-uvmat/wiki/UvmatHelp#a8-Geometriccalibration') 821 % path_to_uvmat=which('uvmat');% check the path of uvmat 822 % pathelp=fileparts(path_to_uvmat); 823 % helpfile=fullfile(pathelp,'uvmat_doc','uvmat_doc.html'); 824 % if isempty(dir(helpfile)), msgbox_uvmat('ERROR','Please put the help file uvmat_doc.html in the sub-directory /uvmat_doc of the UVMAT package') 825 % else 826 % addpath (fullfile(pathelp,'uvmat_doc')) 827 % web([helpfile '#geometry_calib']) 828 % end 829 829 830 830 % -------------------------------------------------------------------- 831 831 function MenuSetScale_Callback(hObject, eventdata, handles) 832 832 833 answer=msgbox_uvmat('INPUT_TXT','scale pixel/cm?',''); 834 %create test points 835 huvmat=findobj(allchild(0),'Name','uvmat');%find the current uvmat interface handle 836 UvData=get(huvmat,'UserData');%Data associated to the current uvmat interface 837 npy=size(UvData.Field.A,1); 838 npx=size(UvData.Field.A,2); 833 answer=msgbox_uvmat('INPUT_TXT','scale pixel/cm?',''); 834 %create test points 835 huvmat=findobj(allchild(0),'Name','uvmat');%find the current uvmat interface handle 836 hhuvmat=guidata(huvmat); 837 if ~strcmp(get(hhuvmat.Scalar,'Visible'),'on') 838 msgbox_uvmat('ERROR','An image needs to be opened in uvmat for calibration') 839 return 840 end 841 set(handles.calib_type,'Value',1)% set calib option to 'rescale' 842 npx=str2num(get(hhuvmat.num_Npx,'String'))/2; 843 npy=str2num(get(hhuvmat.num_Npy,'String'))/2; 839 844 Xima=[0.25*npx 0.75*npx 0.75*npx 0.25*npx]'; 840 845 Yima=[0.25*npy 0.25*npy 0.75*npy 0.75*npy]'; -
trunk/src/get_file_series.m
r754 r757 1 %'get_file_series': determine the list of file names and file indices for functions called by 'series'.1 %'get_file_series': determine the list of input file names and file indices for functions called by 'series'. 2 2 %------------------------------------------------------------------------ 3 3 % [filecell,i1_series,i2_series,j1_series,j2_series]=get_file_series(Param) … … 15 15 function [filecell,i1_series,i2_series,j1_series,j2_series]=get_file_series(Param) 16 16 17 filecell={}; i1_series={};i2_series={};j1_series={};j2_series={};17 filecell={}; 18 18 InputTable=Param.InputTable; 19 19 first_i=Param.IndexRange.first_i; 20 20 incr_i=Param.IndexRange.incr_i; 21 21 last_i=Param.IndexRange.last_i; 22 % ref_i=first_i:incr_i:last_i;23 %ref_j=[];24 22 first_j=[];last_j=[];incr_j=1;%default 25 23 if isfield(Param.IndexRange,'first_j')&& isfield(Param.IndexRange,'last_j') … … 32 30 33 31 %% determine the list of input file names 34 nbmissing=0;32 % nbmissing=0; 35 33 NbView=size(InputTable,1); 36 34 i1_series=cell(NbView,1);% initiate index series with empty cells -
trunk/src/series.m
r752 r757 757 757 set(handles.num_incr_i,'String',num2str(diff_i_max(1)))% detect an increment to dispaly by default 758 758 end 759 if isequal (diff_j_max,diff_j_max(1)*ones(size(diff_j_max)))759 if ~isempty(diff_j_max) && isequal (diff_j_max,diff_j_max(1)*ones(size(diff_j_max))) 760 760 set(handles.num_incr_j,'String',num2str(diff_j_max(1))) 761 761 end … … 771 771 MaxIndex_i_table=get(handles.MaxIndex_i,'Data');%retrieve the min indices in the table MinIndex 772 772 MaxIndex_j_table=get(handles.MaxIndex_j,'Data');%retrieve the min indices in the table MinIndex 773 if ~isempty(MinIndex_i)&&~isempty(MaxIndex_i) 773 774 MinIndex_i_table(iview,1)=MinIndex_i; 775 MaxIndex_i_table(iview,1)=MaxIndex_i; 776 end 777 if ~isempty(MinIndex_j)&&~isempty(MaxIndex_j) 774 778 MinIndex_j_table(iview,1)=MinIndex_j; 775 MaxIndex_i_table(iview,1)=MaxIndex_i;776 779 MaxIndex_j_table(iview,1)=MaxIndex_j; 780 end 777 781 set(handles.MinIndex_i,'Data',MinIndex_i_table)%display the min indices in the table MinIndex 778 782 set(handles.MinIndex_j,'Data',MinIndex_j_table)%display the max indices in the table MaxIndex … … 969 973 pair_max=squeeze(max(SeriesData.i1_series{iview},[],1)); %max on pair index 970 974 j_max{iview}=max(pair_max,[],1);%max on j index 975 if ~isempty(j_max{iview}) 971 976 MaxIndex_i(iview)=max(find(j_max{iview}))-1;% max ref index i 972 977 MinIndex_i(iview)=min(find(j_max{iview}))-1;% min ref index i 978 end 973 979 end 974 980 MinIndex_i=min(MinIndex_i); … … 1135 1141 pos_first=(ref_i_1-MinIndex_i)/(MaxIndex_i-MinIndex_i+1); 1136 1142 pos_last=(ref_i_2-MinIndex_i+1)/(MaxIndex_i-MinIndex_i+1); 1143 if isempty(pos_first), pos_first=0; end 1144 if isempty(pos_last), pos_last=1; end 1137 1145 Position=get(handles.Waitbar,'Position');% position of the waitbar:= [ x,y, width, height] 1138 1146 Position_status=get(handles.FileStatus,'Position'); 1139 1147 Position(1)=Position_status(1)+Position_status(3)*pos_first; 1140 Position(3)= Position_status(3)*(pos_last-pos_first);1148 Position(3)=max(Position_status(3)*(pos_last-pos_first),0.001);% width must remain positive 1141 1149 set(handles.Waitbar,'Position',Position) 1142 1150 update_waitbar(handles.Waitbar,0)
Note: See TracChangeset
for help on using the changeset viewer.