Changeset 1187 for trunk/src/series
- Timestamp:
- Dec 3, 2025, 6:18:13 PM (8 days ago)
- Location:
- trunk/src/series
- Files:
-
- 2 edited
-
civ_input.m (modified) (3 diffs)
-
civ_series.m (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/civ_input.m
r1181 r1187 91 91 if isfield(SeriesData,'FileInfo') 92 92 FileType=SeriesData.FileInfo{1}.FileType;% info on the first input file series 93 %FieldType=SeriesData.FileInfo{1}.FieldType;% info on the first input file series94 93 else 95 94 set(hhseries.REFRESH,'BackgroundColor',[1 0 1])% indicate that the file input in series needs to be refreshed … … 281 280 282 281 if isfield(Param.ActionInput,'Civ1')&& isfield(Param.ActionInput.Civ1,'SearchBoxSize')%transform from SearchBoxSize to SearchRange (old to new convention) 283 SearchRange=round((Param.ActionInput.Civ1.SearchBoxSize-Param.ActionInput.Civ1.CorrBoxSize)/2);284 set(handles.num_SearchRange_1(1),'String',num2str(SearchRange(1)))285 set(handles.num_SearchRange_2(1),'String',num2str(SearchRange(2)))286 end287 if isfield(Param.ActionInput,'Civ2')&& isfield(Param.ActionInput.Civ2,'SearchBoxSize')288 SearchRange=round((Param.ActionInput.Civ2.SearchBoxSize-Param.ActionInput.Civ2.CorrBoxSize)/2);289 set(handles.num_SearchRange_1(2),'String',num2str(SearchRange(1)))290 set(handles.num_SearchRange_2(2),'String',num2str(SearchRange(2)))291 end282 SearchRange=round((Param.ActionInput.Civ1.SearchBoxSize-Param.ActionInput.Civ1.CorrBoxSize)/2); 283 set(handles.num_SearchRange_1(1),'String',num2str(SearchRange(1))) 284 set(handles.num_SearchRange_2(1),'String',num2str(SearchRange(2))) 285 end 286 if isfield(Param.ActionInput,'Civ2')&& isfield(Param.ActionInput.Civ2,'SearchBoxSize') 287 SearchRange=round((Param.ActionInput.Civ2.SearchBoxSize-Param.ActionInput.Civ2.CorrBoxSize)/2); 288 set(handles.num_SearchRange_1(2),'String',num2str(SearchRange(1))) 289 set(handles.num_SearchRange_2(2),'String',num2str(SearchRange(2))) 290 end 292 291 hcheckgrid=findobj(handles.civ_input,'Tag','CheckGrid'); 293 292 for ilist=1:numel(hcheckgrid) … … 1613 1612 end 1614 1613 j2=j1; 1615 str_civ=Param.ActionInput.PairIndices.ListPairCiv1; 1616 r=regexp(str_civ,'^\D(?<ind>[i|j])=( -| )(?<num1>\d+)\|(?<num2>\d+)','names'); 1617 if ~isempty(r) 1618 if strcmp(r.ind,'i') 1619 i1=i1-str2num(r.num1); 1620 i2=i2 +str2num(r.num2); 1621 elseif strcmp(r.ind,'j') 1622 j1=j1-str2num(r.num1); 1623 j2=j2 +str2num(r.num2); 1624 end 1625 else % mode='j1-j2'; 1626 r=regexp(str_civ,'^j= (?<num1>[a-z])-(?<num2>[a-z])','names'); 1627 if isempty(r) 1628 r=regexp(str_civ,'^j= (?<num1>[A-Z])-(?<num2>[A-Z])','names'); 1614 if isfield(Param.ActionInput,'PairIndices') 1615 str_civ=Param.ActionInput.PairIndices.ListPairCiv1; 1616 r=regexp(str_civ,'^\D(?<ind>[i|j])=( -| )(?<num1>\d+)\|(?<num2>\d+)','names'); 1617 if ~isempty(r) 1618 if strcmp(r.ind,'i') 1619 i1=i1-str2num(r.num1); 1620 i2=i2 +str2num(r.num2); 1621 elseif strcmp(r.ind,'j') 1622 j1=j1-str2num(r.num1); 1623 j2=j2 +str2num(r.num2); 1624 end 1625 else % mode='j1-j2'; 1626 r=regexp(str_civ,'^j= (?<num1>[a-z])-(?<num2>[a-z])','names'); 1629 1627 if isempty(r) 1630 r=regexp(str_civ,'^j= (?<num1>\d+)-(?<num2>\d+)','names'); 1628 r=regexp(str_civ,'^j= (?<num1>[A-Z])-(?<num2>[A-Z])','names'); 1629 if isempty(r) 1630 r=regexp(str_civ,'^j= (?<num1>\d+)-(?<num2>\d+)','names'); 1631 end 1631 1632 end 1632 end 1633 if isempty(r) 1634 disp('wrong pair mode input option') 1635 else 1636 j1=stra2num(r.num1); 1637 j2=stra2num(r.num2); 1638 end 1639 end 1640 1633 if isempty(r) 1634 disp('wrong pair mode input option') 1635 else 1636 j1=stra2num(r.num1); 1637 j2=stra2num(r.num2); 1638 end 1639 end 1640 end 1641 1641 par_civ1=Param.ActionInput.Civ1; 1642 1642 RootPath_A=Param.InputTable{1,1}; 1643 SubDir_A=Param.InputTable{1,2}; 1644 RootFile_A=Param.InputTable{1,3}; 1645 NomType_A=Param.InputTable{1,4}; 1646 FileExt_A=Param.InputTable{1,5}; 1643 1647 if strcmp(Param.ActionInput.ListCompareMode,'displacement') 1644 1648 ImageName_A=Param.ActionInput.RefFile; 1645 1649 else 1646 RootPath_A=Param.InputTable{1,1};1647 SubDir_A=Param.InputTable{1,2};1648 RootFile_A=Param.InputTable{1,3};1649 NomType_A=Param.InputTable{1,4};1650 FileExt_A=Param.InputTable{1,5};1651 1650 ImageName_A=fullfile_uvmat(RootPath_A,SubDir_A,RootFile_A,FileExt_A,NomType_A,i1,[],j1); 1652 ImageName_B=fullfile_uvmat(RootPath_A,SubDir_A,RootFile_A,FileExt_A,NomType_A,i2,[],j2);1653 end1651 end 1652 ImageName_B=fullfile_uvmat(RootPath_A,SubDir_A,RootFile_A,FileExt_A,NomType_A,i2,[],j2); 1654 1653 par_civ1.ImageA = read_image(ImageName_A); 1655 1654 par_civ1.ImageB = read_image(ImageName_B); -
trunk/src/series/civ_series.m
r1183 r1187 341 341 if strcmp(Param.ActionInput.ListCompareMode,'displacement') 342 342 ImageName_A=Param.ActionInput.RefFile; 343 FrameIndex_A=1; 343 344 elseif CheckRelabel 344 345 [RootFile,FrameIndex_A]=index2filename(Param.FileSeries,i1_series_Civ1(ifield),j1_series_Civ1(ifield),MaxIndex_j); … … 356 357 [FileInfo_A,VideoObject_A]=get_file_info(ImageName_A); 357 358 FileType_A=FileInfo_A.FileType; 358 if isempty(Time) && ~isempty(find(strcmp(FileType_A,{'mmreader','video','cine_phantom','telopsIR'}), 1))% case of video input 359 if isempty(Time) && ~isempty(find(strcmp(FileType_A,{'mmreader','video','cine_phantom','telopsIR'}), 1))% case of video inputFrameIndex_A 359 360 Time=zeros(FileInfo_A.NumberOfFrames+1,2); 360 361 Time(:,2)=(0:1/FileInfo_A.FrameRate:(FileInfo_A.NumberOfFrames)/FileInfo_A.FrameRate)'; … … 529 530 else 530 531 par_civ1.Mask=[]; 532 disp_uvmat('ERROR',[maskname ' does not exist'],checkrun); 533 return 531 534 end 532 535 mask=par_civ1.Mask; … … 785 788 par_civ2.Mask=mask; %use mask already opened 786 789 else 787 if exist(maskname,'file') 790 if exist(maskname,'file')|| ~isempty(regexp(maskname,'(^http://)|(^https://)', 'once')) 788 791 try 789 792 par_civ2.Mask=imread(maskname);%update the mask, an store it for future use … … 797 800 else 798 801 par_civ2.Mask=[]; 802 disp_uvmat('ERROR',[maskname ' does not exist'],checkrun); 803 return 799 804 end 800 805 mask=par_civ2.Mask;
Note: See TracChangeset
for help on using the changeset viewer.
