Changeset 492 for trunk/src/civ.m


Ignore:
Timestamp:
Jul 15, 2012, 10:30:28 AM (12 years ago)
Author:
sommeria
Message:

civ corrected to deal with windows system
proj_field improved to provject tps fields on lines

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r487 r492  
    2424%TODO: search range
    2525
    26 % Last Modified by GUIDE v2.5 21-Jun-2012 23:37:47
     26% Last Modified by GUIDE v2.5 13-Jul-2012 15:11:00
    2727% Begin initialization code - DO NOT EDIT
    2828gui_Singleton = 1;
     
    533533end
    534534if isempty(time) && (strcmp(FileType,'video') || strcmp(FileType,'mmreader'))
    535     set(handles.ListPairMode,'Value',1);
    536     set(handles.ListPairMode,'String',{'series(Di)'})
     535               set(handles.ListPairMode,'Value',1);
    537536    dt=1/get(MovieObject,'FrameRate');%time interval between successive frames
    538     MaxIndex_i=get(MovieObject,'NumberOfFrames');
    539     time=(dt*(0:MaxIndex_i-1))';%list of image times
     537    if strcmp(NomTypeIma,'*')
     538        set(handles.ListPairMode,'String',{'series(Di)'})
     539        MaxIndex_i=get(MovieObject,'NumberOfFrames');
     540        time=(dt*(0:MaxIndex_i-1))';%list of image times
     541    else
     542        set(handles.ListPairMode,'String',[{'series(Dj)'};{'series(Di)'}])
     543        MaxIndex_i=max(i1_series(i1_series>0));
     544        MaxIndex_j=get(MovieObject,'NumberOfFrames');   
     545        time=ones(MaxIndex_i,1)*(dt*(0:MaxIndex_j-1));%list of image times
     546        enable_j(handles,'on')
     547    end
    540548    TimeUnit='s';
    541549    set(handles.ImaDoc,'BackgroundColor',[1 1 1])% set display box back to whiter
     
    614622        set(handles.ListPairMode,'Value',1)% advice 'pair j1-j2' except in MaxIndex_j is large
    615623    end
    616 else
     624elseif ~(strcmp(FileType,'video') || strcmp(FileType,'mmreader'))
    617625    set(handles.ListPairMode,'String',{'pair j1-j2';'series(Dj)';'series(Di)'})%multiple choice
    618626    if strcmp(NomTypeNc,'_1-2_1')
     
    25492557    set(handles.ListPairMode,'Value',1) % mode 'civX' selected by default
    25502558end
    2551 % if strcmp(option,'stereo PIV') && get(handles.CheckPatch1,'Value')
    2552 %     set(handles.CheckStereo,'Visible','on')
    2553 % else
    2554 %     set(handles.CheckStereo,'Visible','off')
    2555 % end
    2556 % if strcmp(option,'stereo PIV') && get(handles.CheckPatch2,'Value')
    2557 %     set(handles.CheckStereo,'Visible','on')
    2558 % else
    2559 %     set(handles.CheckStereo,'Visible','off')
    2560 % end
    25612559ListPairMode_Callback(hObject, eventdata, handles)
    25622560
     
    38553853    end
    38563854    case 'series(Dj)' 
    3857         r=regexp(NomTypeIma,'(?<num1>\d+)_(?<num2>\d+)$','names');
    3858         if ~isempty(r)
     3855%         r=regexp(NomTypeIma,'(?<num1>\d+)_(?<num2>\d+)$','names');
     3856%         if ~isempty(r)
    38593857            NomTypeNc='_1_1-2';
    3860         end
     3858%         end
    38613859   case 'series(Di)'
    38623860        r=regexp(NomTypeIma,'(?<num1>\d+)_(?<num2>\d+)$','names');
     
    43754373                        case {'PCWIN','PCWIN64'}                     
    43764374                            filename=regexprep(filename,'\\','\\\\');% add '\' so that '\' are left as characters
     4375                                    cmd=['civ_matlab(''' regexprep(filename,'(.+)([/\\])(.+$)','$1$20_XML\\$2$3.xml') ''','''...
     4376            filename '.nc'');'];
    43774377                        case {'GLNX86','GLNXA64','MACI64'}
     4378                                    cmd=['civ_matlab(''' regexprep(filename,'(.+)([/\\])(.+$)','$1$20_XML$2$3.xml') ''','''...
     4379            filename '.nc'');'];
    43784380                    end
    4379         cmd=['civ_matlab(''' regexprep(filename,'(.+)([/\\])(.+$)','$1$20_XML$2$3.xml') ''','''...
    4380             filename '.nc'');'];
     4381
     4382       
    43814383    case 'civ_matlab.sh'
    43824384        switch computer
     
    45534555% --- Executes on selection change in RunMode.
    45544556function RunMode_Callback(hObject, eventdata, handles)
     4557
     4558
     4559
     4560function nb_field2_Callback(hObject, eventdata, handles)
     4561% hObject    handle to nb_field2 (see GCBO)
     4562% eventdata  reserved - to be defined in a future version of MATLAB
     4563% handles    structure with handles and user data (see GUIDATA)
     4564
     4565% Hints: get(hObject,'String') returns contents of nb_field2 as text
     4566%        str2double(get(hObject,'String')) returns contents of nb_field2 as a double
     4567
     4568
     4569
     4570function last_j_Callback(hObject, eventdata, handles)
     4571% hObject    handle to last_j (see GCBO)
     4572% eventdata  reserved - to be defined in a future version of MATLAB
     4573% handles    structure with handles and user data (see GUIDATA)
     4574
     4575% Hints: get(hObject,'String') returns contents of last_j as text
     4576%        str2double(get(hObject,'String')) returns contents of last_j as a double
     4577
     4578
     4579
     4580function last_i_Callback(hObject, eventdata, handles)
     4581% hObject    handle to last_i (see GCBO)
     4582% eventdata  reserved - to be defined in a future version of MATLAB
     4583% handles    structure with handles and user data (see GUIDATA)
     4584
     4585% Hints: get(hObject,'String') returns contents of last_i as text
     4586%        str2double(get(hObject,'String')) returns contents of last_i as a double
Note: See TracChangeset for help on using the changeset viewer.