- Timestamp:
- Mar 12, 2025, 8:13:18 PM (2 days ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/plot_field.m
r1176 r1177 409 409 410 410 %% prepare the string for plot command 411 plotstr='hhh=plot('; 411 412 if isfield(PlotParam,'Type') 412 413 switch PlotParam.Type … … 417 418 case 'loglog' 418 419 plotstr='hhh=loglog('; 419 otherwise420 plotstr='hhh=plot(';421 420 end 422 421 end -
trunk/src/series/civ_input.m
r1176 r1177 328 328 PairMenu={'series(Di)'}; 329 329 elseif MaxIndex_j-MinIndex_j==1 330 PairMenu={'pair j1-j2' };330 PairMenu={'pair j1-j2';'series(Di)'}; 331 331 elseif MaxIndex_i==MinIndex_i && MaxIndex_j-MinIndex_j>2% simple series in j 332 332 PairMenu={'pair j1-j2';'series(Dj)'}; … … 1968 1968 hparent=get(hObject,'parent'); 1969 1969 hchildren=get(hparent,'children'); 1970 handle_txtbox=findobj(hchildren,'tag','Background');% look for the maskname box in the same panel1971 test mask=0;1970 handle_txtbox=findobj(hchildren,'tag','Background');% look for the background name box in the same panel 1971 testbackground=0; 1972 1972 if get(hObject,'Value')% if the checkbox is activated 1973 1973 hseries=findobj(allchild(0),'Tag','series'); … … 1979 1979 ind_A=1;% line index of the (first) image series 1980 1980 end 1981 % browse for a mask1981 % browse for a background 1982 1982 filebackground= uigetfile_uvmat('pick a background image file:',InputTable{ind_A,1},'image'); 1983 1983 if ~isempty(filebackground) … … 1992 1992 end 1993 1993 set(hObject,'UserData',filebackground);%store for future use 1994 test mask=1;1995 end 1996 end 1997 if test mask1994 testbackground=1; 1995 end 1996 end 1997 if testbackground 1998 1998 set(handles.Background,'Visible','on') 1999 1999 set(handles.Background,'String',filebackground) … … 2009 2009 set(handles.ConfigSource,'String','NEW') 2010 2010 set(handles.ConfigSource,'BackgroundColor',[1 0 1]) 2011 2012 2013 2014 function Background_Callback(hObject, eventdata, handles)2015 % hObject handle to Background (see GCBO)2016 % eventdata reserved - to be defined in a future version of MATLAB2017 % handles structure with handles and user data (see GUIDATA)2018 2019 % Hints: get(hObject,'String') returns contents of Background as text2020 % str2double(get(hObject,'String')) returns contents of Background as a double -
trunk/src/series/civ_series.m
r1176 r1177 258 258 transform_fct=[];%default, no transform 259 259 if isfield(Param,'FieldTransform')&&~isempty(Param.FieldTransform.TransformName) 260 addpath(Param.FieldTransform.TransformPath) 260 % addpath(Param.FieldTransform.TransformPath) 261 currentdir=pwd; 262 cd(Param.FieldTransform.TransformPath) 261 263 transform_fct=str2func(Param.FieldTransform.TransformName); 262 rmpath(Param.FieldTransform.TransformPath)263 end 264 264 cd (currentdir) 265 %rmpath(Param.FieldTransform.TransformPath) 266 end 265 267 266 268 %%%%% MAIN LOOP %%%%%% … … 772 774 end 773 775 776 % case of background image to subtract 777 if par_civ2.CheckBackground &&~isempty(par_civ2.Background) 778 [RootPath_background,SubDir_background,RootFile_background,~,~,~,~,Ext_background]=fileparts_uvmat(Param.ActionInput.Civ1.Background); 779 j1=1; 780 if ~isempty(j1_series_Civ1) 781 j1=j1_series_Civ1(ifield); 782 end 783 if ~isempty(i2_series_Civ1)% case of volume,backgrounds act on different j levels 784 backgroundname=fullfile_uvmat(RootPath_background,SubDir_background,RootFile_background,Ext_background,'_1',j1); 785 elseif isfield(par_civ2,'NbSlice') 786 i1_background=mod(i1-1,par_civ2.NbSlice)+1; 787 backgroundname=fullfile_uvmat(RootPath_background,SubDir_background,RootFile_background,Ext_background,'_1',i1_background); 788 if strcmp(Param.ActionInput.PairIndices.ListPairMode,'series(Di)')% case of volume, background index refers to j index 789 par_civ2.NbSlice_j=par_civ2.NbSlice; 790 end 791 else 792 backgroundname=Param.ActionInput.Civ1.Background; 793 end 794 if strcmp(backgroundoldname,backgroundname)% background exist, not already read in civ2 795 par_civ2.Background=background; %use background already opened 796 else 797 if ~isempty(regexp(backgroundname,'(^http://)|(^https://)', 'once'))|| exist(backgroundname,'file') 798 try 799 par_civ2.Background=imread(backgroundname);%update the background, an store it for future use 800 catch ME 801 if ~isempty(ME.message) 802 errormsg=['error reading input image: ' ME.message]; 803 disp_uvmat('ERROR',errormsg,checkrun) 804 return 805 end 806 end 807 else 808 par_civ2.Background=[]; 809 end 810 background=par_civ2.Background; 811 backgroundoldname=backgroundname; 812 end 813 par_civ2.ImageA=par_civ2.ImageA-par_civ2.Background; 814 par_civ2.ImageB=par_civ2.ImageB-par_civ2.Background; 815 end 774 816 775 817 if strcmp(Param.ActionInput.ListCompareMode,'displacement')
Note: See TracChangeset
for help on using the changeset viewer.