Changeset 326 for trunk/src/uvmat.m
- Timestamp:
- Dec 8, 2011, 8:28:38 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uvmat.m
r323 r326 1778 1778 %% read the current input file name(s) and field indices 1779 1779 InputFile=read_GUI(handles.InputFile); 1780 filebase=InputFile.RootPath; %default 1781 if ~isempty(InputFile.SubDir) 1782 InputFile.SubDir=regexprep(InputFile.SubDir,'/|\',''); 1783 % FileName=fullfile(InputFile.RootPath,InputFile.SubDir); 1784 end 1785 if ~isempty(InputFile.RootFile) 1786 InputFile.RootFile=regexprep(InputFile.RootFile,'/|\',''); 1787 filebase=fullfile(filebase,InputFile.RootFile); 1780 InputFile.RootFile=regexprep(InputFile.RootFile,'\<[\\/]|[\\/]\>','');%suppress possible / or \ separator at the beginning or the end of the string 1781 InputFile.SubDir=regexprep(InputFile.SubDir,'\<[\\/]|[\\/]\>','');%suppress possible / or \ separator at the beginning or the end of the string 1782 if isempty(InputFile.RootFile) 1783 filebase=InputFile.RootPath; 1784 else 1785 filebase=fullfile(InputFile.RootPath,InputFile.RootFile); 1788 1786 end 1789 1787 FileExt=InputFile.FileExt; 1790 subdir=InputFile.SubDir;1791 1788 % [FileName,RootPath,filebase,FileIndices,FileExt,subdir]=read_file_boxes(handles); 1792 1789 NomType=get(handles.NomType,'String'); … … 1815 1812 i1=i1+increment; 1816 1813 i2=i2+increment; 1817 [filename,i1,j1,i2,j2]=name_generator(filebase,i1,j1,FileExt,NomType,comp_input,i2,j2, subdir);1814 [filename,i1,j1,i2,j2]=name_generator(filebase,i1,j1,FileExt,NomType,comp_input,i2,j2,InputFile.SubDir); 1818 1815 if sub_value% set the second field name and indices 1819 1816 i1_1=i1_1+increment; … … 1824 1821 j1=j1+increment; 1825 1822 j2=j2+increment; 1826 [filename,i1,j1,i2,j2]=name_generator(filebase,i1,j1,FileExt,NomType,comp_input,i2,j2, subdir);1823 [filename,i1,j1,i2,j2]=name_generator(filebase,i1,j1,FileExt,NomType,comp_input,i2,j2,InputFile.SubDir); 1827 1824 if sub_value 1828 1825 j1_1=j1_1+increment; … … 3095 3092 SubDir_1=get(handles.SubDir,'String'); 3096 3093 end 3097 if numel(SubDir_1)>=13098 if (isequal(SubDir_1(1),'/')|| isequal(SubDir_1(1),'\'))3099 SubDir_1(1)=[]; %suppress possible / or \ separator3100 end3101 FileName_1=fullfile(RootPath_1,SubDir_1);3102 end3103 3094 RootFile_1=get(handles.RootFile_1,'String'); 3095 SubDir_1=regexprep(SubDir_1,'\<[\\/]|[\\/]\>','');%suppress possible / or \ separator at the beginning or the end of the string 3096 FileName_1=fullfile(RootPath_1,SubDir_1); 3104 3097 if isequal(get(handles.RootFile_1,'Visible'),'off') || isequal(RootFile_1,'"') 3105 3098 RootFile_1=get(handles.RootFile,'String'); 3106 3099 end 3100 RootFile_1=regexprep(RootFile_1,'\<[\\/]|[\\/]\>','');%suppress possible / or \ separator at the beginning or the end of the string 3107 3101 if numel(RootFile_1)>=1 3108 if ~(isequal(RootFile_1(1),'/')||isequal(RootFile_1(1),'\'))3109 RootFile_1(1)=[];%suppress possible / or \ separator3110 end3111 3102 FileName_1=fullfile(FileName_1,RootFile_1); 3112 3103 end … … 3280 3271 % transform netc type to the corresponding image type 3281 3272 if isequal(NomType_1,'_i1-i2_j')||isequal(NomType_1,'_i_j1-j2')|| isequal(NomType_1,'#_ab')|| isequal(NomType_1,'_i1-i2') 3282 UvData.SubDir_1=get(handles.SubDir_1,'String'); %preserve the subdir in memory3273 UvData.SubDir_1=get(handles.SubDir_1,'String'); %preserve the InputFile.SubDir in memory 3283 3274 if isequal(NomType_1,'_i1-i2_j')||isequal(NomType_1,'_i_j1-j2') 3284 3275 NomTypeNew='_i_j'; … … 3642 3633 RootPath=get(handles.RootPath,'String'); 3643 3634 RootFile=get(handles.RootFile,'String'); 3644 if ~isempty(RootFile)&&(isequal(RootFile(1),'/')|| isequal(RootFile(1),'\')) 3645 RootFile(1)=[]; 3646 end 3635 RootFile=regexprep(RootFile,'\<[\\/]|[\\/]\>','');%suppress possible / or \ separator at the beginning or the end of the string 3647 3636 filebase=fullfile(RootPath,RootFile); 3648 3637 list=get(handles.masklevel,'String'); … … 3657 3646 3658 3647 %display the mask 3659 %update_mask(handles,num_i1,num_j1)3660 3648 figure; 3661 3649 vec=linspace(0,1,256);%define a linear greyscale colormap … … 3671 3659 %------------------------------------------------------------------ 3672 3660 3673 3674 3675 3661 %------------------------------------------------------------------ 3676 3662 % --- Executes on selection change in ListColorScalar: choice of the color code. 3677 %3678 3663 function ListColorScalar_Callback(hObject, eventdata, handles) 3679 3664 %------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.