Changeset 833


Ignore:
Timestamp:
Dec 6, 2014, 4:40:35 PM (10 years ago)
Author:
sommeria
Message:

civ_input corrected to handle the new fct 'stereo_civ'

Location:
trunk/src/series
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series/civ_input.m

    r824 r833  
    6666SeriesData=get(hseries,'UserData');% info stored in the GUI series
    6767
    68 %% set visibility options:
    69 if strcmp(Param.Action.ActionName,'civ_series')
    70     %  set(handles.Program,'String','civ_series')
    71     set(handles.num_MaxDiff,'Visible','on')
     68%% set visibility options depending on the calling function (Param.Action.ActionName):
     69if strcmp(Param.Action.ActionName,'civ_series')||strcmp(Param.Action.ActionName,'stereo_civ')
     70     set(handles.num_MaxDiff,'Visible','on')
    7271    set(handles.num_MaxVel,'Visible','on')
    7372    set(handles.title_MaxVel,'Visible','on')
     
    8483    set(handles.CheckDecimal,'Value',0)% desactivate (work in progress)
    8584end
     85switch Param.Action.ActionName
     86    case 'stereo_civ'
     87        set(handles.ListCompareMode,'Visible','off')
     88        set(handles.PairIndices,'Visible','off')
     89    case 'civ_series'
     90        set(handles.ListCompareMode,'Visible','on')
     91        set(handles.PairIndices,'Visible','on')
     92end
    8693
    8794%% input file info
     
    140147        return
    141148end
    142 if isfield(SeriesData,'FileType') && numel(SeriesData.FileType)>=2 && strcmp(SeriesData.FileType{end-1},'image') &&   strcmp(SeriesData.FileType{end},'image')
    143     set(handles.ListCompareMode,'Value',3)% we compare two image series term to term ('shift')
    144     set(handles.PairIndices,'Visible','off')
    145 end
     149% if isfield(SeriesData,'FileType') && numel(SeriesData.FileType)>=2 && strcmp(SeriesData.FileType{end-1},'image') &&   strcmp(SeriesData.FileType{end},'image')
     150%     set(handles.ListCompareMode,'Value',3)% we compare two image series term to term ('shift')
     151%     set(handles.PairIndices,'Visible','off')
     152% end
    146153
    147154%% reinitialise menus
     
    154161       
    155162%% prepare the GUI with input parameters
    156 set(handles.ListCompareMode,'Visible','on')
     163%
    157164set(handles.ref_i,'String',num2str(Param.IndexRange.first_i))
    158165if isfield(Param.IndexRange,'first_j')
     
    258265
    259266%% introduce the stored Civ parameters  if available (from previous input or ImportConfig in series)
    260 if isfield(Param,'ActionInput')
     267if isfield(Param,'ActionInput')&& strcmp(Param.ActionInput.Program,Param.Action.ActionName)% the program fits with the stored data
    261268    fill_GUI(Param.ActionInput,hObject);%fill the GUI with the parameters retrieved from the input Param
    262269    hcheckgrid=findobj(handles.civ_input,'Tag','CheckGrid');
     
    439446checkbox(6)=get(handles.CheckPatch2,'Value');
    440447% ind_selected=find(checkbox,1);
    441 set(handles.PairIndices,'Visible','on')% make the frame PaiIndices visible, choice of the index pairs fo civ
     448%set(handles.PairIndices,'Visible','on')% make the frame PaiIndices visible, choice of the index pairs fo civ
    442449if opening==0
    443450    errormsg=find_netcpair_civ(handles,1); % select the available netcdf files
     
    622629    case 'displacement'
    623630        OriginIndex='on';%define a frame origin for displacement
    624     case 'shift'
    625         if numel(ImageType)==1
    626             fileinput=uigetfile_uvmat('pick a second file series for synchronous shift',InputTable{check_nc+1});
    627             if ~isempty(fileinput)
    628                 series( 'display_file_name',hhseries,fileinput,'append')
    629             end
    630            
    631            
    632         end
     631%     case 'shift'
     632%         if numel(ImageType)==1
     633%             fileinput=uigetfile_uvmat('pick a second file series for synchronous shift',InputTable{check_nc+1});
     634%             if ~isempty(fileinput)
     635%                 series( 'display_file_name',hhseries,fileinput,'append')
     636%             end
     637%            
     638%            
     639%         end
    633640end
    634641set(handles.num_OriginIndex,'Visible',OriginIndex)
  • trunk/src/series/civ_series.m

    r824 r833  
    285285%% get timing from the ImaDoc file or input video
    286286if iview_A~=0
    287 XmlFileName=find_imadoc(RootPath_A,SubDir_A,RootFile_A,FileExt_A);
    288 time=[];
    289 if ~isempty(XmlFileName)
    290     XmlData=imadoc2struct(XmlFileName);
     287    XmlFileName=find_imadoc(RootPath_A,SubDir_A,RootFile_A,FileExt_A);
     288    time=[];
     289    if ~isempty(XmlFileName)
     290        XmlData=imadoc2struct(XmlFileName);
    291291        if isfield(XmlData,'Time')
    292292            time=XmlData.Time;
     
    304304            end
    305305        end
    306 end
    307 if isempty(time) && ~isempty(find(strcmp(FileType_A,{'mmreader','video'})))% case of video input
    308     time=zeros(FileInfo_A.NumberOfFrames+1,2);
    309     time(:,2)=(0:1/FileInfo_A.FrameRate:(FileInfo_A.NumberOfFrames)/FileInfo_A.FrameRate)';
    310     TimeSource='video';
    311     ColorType='truecolor';
    312 end
    313 if isempty(time)% time = index i +0.001 index j by default
    314     %MinIndex_i=min(i1_series_Civ1);
    315     MaxIndex_i=max(i2_series_Civ1);
    316     %MinIndex_j=min(j1_series_Civ1);
    317     MaxIndex_j=max(j2_series_Civ1);
    318     time=(1:MaxIndex_i)'*ones(1,MaxIndex_j);
    319     time=time+0.001*ones(MaxIndex_i,1)*(1:MaxIndex_j);
    320     time=[zeros(1,MaxIndex_j);time];% insert a first line of zeros
    321     time=[zeros(MaxIndex_i+1,1) time];% insert a first column of zeros
    322 end
     306    end
     307    if isempty(time) && ~isempty(find(strcmp(FileType_A,{'mmreader','video'})))% case of video input
     308        time=zeros(FileInfo_A.NumberOfFrames+1,2);
     309        time(:,2)=(0:1/FileInfo_A.FrameRate:(FileInfo_A.NumberOfFrames)/FileInfo_A.FrameRate)';
     310        TimeSource='video';
     311        ColorType='truecolor';
     312    end
     313    if isempty(time)% time = index i +0.001 index j by default
     314        %MinIndex_i=min(i1_series_Civ1);
     315        MaxIndex_i=max(i2_series_Civ1);
     316        %MinIndex_j=min(j1_series_Civ1);
     317        MaxIndex_j=max(j2_series_Civ1);
     318        time=(1:MaxIndex_i)'*ones(1,MaxIndex_j);
     319        time=time+0.001*ones(MaxIndex_i,1)*(1:MaxIndex_j);
     320        time=[zeros(1,MaxIndex_j);time];% insert a first line of zeros
     321        time=[zeros(MaxIndex_i+1,1) time];% insert a first column of zeros
     322    end
    323323   
    324 if length(FileInfo_A) >1 %case of image with multiple frames
    325     nbfield=length(FileInfo_A);
    326     nbfield_j=1;
    327 end
     324    if length(FileInfo_A) >1 %case of image with multiple frames
     325        nbfield=length(FileInfo_A);
     326        nbfield_j=1;
     327    end
    328328end
    329329
  • trunk/src/series/extract_rdvision.m

    r826 r833  
    367367OutputDir=fullfile(PathDir,SeqData.sequencename)
    368368if exist(OutputDir,'dir')
    369     errormsg=[OutpuDir ' already exist, delete it first'];
     369    errormsg=[OutputDir ' already exist, delete it first'];
    370370    return
    371371end
Note: See TracChangeset for help on using the changeset viewer.