Ignore:
Timestamp:
May 21, 2025, 6:14:05 PM (12 days ago)
Author:
sommeria
Message:

image rescale included in civ_series input

File:
1 edited

Legend:

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

    r1180 r1181  
    9191if isfield(SeriesData,'FileInfo')
    9292    FileType=SeriesData.FileInfo{1}.FileType;% info on the first input file series
    93     FieldType=SeriesData.FileInfo{1}.FieldType;% info on the first input file series
     93    %FieldType=SeriesData.FileInfo{1}.FieldType;% info on the first input file series
    9494else
    9595    set(hhseries.REFRESH,'BackgroundColor',[1 0 1])% indicate that the file input in series needs to be refreshed
     
    207207    set(handles.TimeSource,'String',Param.IndexRange.TimeSource);
    208208else
     209    msgbox_uvmat('WARNING','timing not defined (check xml file), default values used')
    209210    set(handles.TimeSource,'String',''); %xml file not used for timing
    210211    TimeUnit='frame';
     
    377378%% list the possible index pairs, depending on the option set in ListPairMode
    378379ListPairMode_Callback([], [], handles)
    379 
     380if isfield(Param,'ActionInput')&& isfield(Param.ActionInput,'PairIndices')
     381    if isfield(Param.ActionInput.PairIndices,'ListPairCiv1')
     382        PairChoiceCiv1=find(strcmp(Param.ActionInput.PairIndices.ListPairCiv1,get(handles.ListPairCiv1,'String')));
     383        if ~isempty(PairChoiceCiv1)
     384            set(handles.ListPairCiv1,'Value',PairChoiceCiv1)
     385        end
     386    end
     387    if isfield(Param.ActionInput.PairIndices,'ListPairCiv2')
     388        PairChoiceCiv2=find(strcmp(Param.ActionInput.PairIndices.ListPairCiv2,get(handles.ListPairCiv2,'String')));
     389        if ~isempty(PairChoiceCiv2)
     390            set(handles.ListPairCiv2,'Value',PairChoiceCiv2)
     391        end
     392    end
     393end
     394 
    380395%% set the GUI to modal: wait for OK to close
    381396set(handles.civ_input,'WindowStyle','modal')% Make the GUI modal
     
    810825%reproduce by default the chosen pair in the checkciv2 menu
    811826set(handles.ListPairCiv2,'Value',get(handles.ListPairCiv1,'Value'))%civ2 selection the same as civ1 by default
    812 ListPairCiv2_Callback(hObject, eventdata, handles)
    813 
    814 %------------------------------------------------------------------------
    815 % --- Executes on selection change in ListPairCiv2.
    816 function ListPairCiv2_Callback(hObject, eventdata, handles)
    817 %------------------------------------------------------------------------
     827%ListPairCiv2_Callback(hObject, eventdata, handles)
     828
     829% %------------------------------------------------------------------------
     830% % --- Executes on selection change in ListPairCiv2.
     831% function ListPairCiv2_Callback(hObject, eventdata, handles)
     832% %------------------------------------------------------------------------
    818833
    819834%------------------------------------------------------------------------
     
    15271542    set(obj,'Visible','off')
    15281543end
     1544set(handles.ConfigSource,'String','NEW')
     1545set(handles.OK,'BackgroundColor',[1 0 1])
     1546
     1547
     1548%------------------------------------------------------------------------
     1549% --- Executes on button press in CheckRescale.
     1550function CheckRescale_Callback(hObject, eventdata, handles)
     1551%------------------------------------------------------------------------
     1552huipanel=get(hObject,'parent');
     1553obj(1)=findobj(huipanel,'Tag','num_Maxtanh');
     1554obj(2)=findobj(huipanel,'Tag','title_Maxtanh');
     1555if get(hObject,'Value')% if chck box has been selected
     1556    set(obj,'Visible','on')
     1557else
     1558    set(obj,'Visible','off')
     1559end
     1560set(handles.ConfigSource,'String','NEW')
     1561set(handles.OK,'BackgroundColor',[1 0 1])
     1562
     1563%------------------------------------------------------------------------
     1564% --- synchronise the image threshold for civ1 and civ2
     1565function num_MaxIma_Callback(hObject, eventdata, handles)
     1566MaxIma_string=get(hObject,'String');
     1567set(handles.num_MaxIma,'String',MaxIma_string);
     1568set(handles.num_MaxIma,'Visible','on');
     1569set(handles.title_Threshold,'Visible','on');
     1570set(handles.CheckThreshold,'Value',true);
     1571
     1572set(handles.ConfigSource,'String','NEW')
     1573set(handles.OK,'BackgroundColor',[1 0 1])
     1574
     1575%------------------------------------------------------------------------
     1576% --- synchronise the image rescaling threshold for civ1 and civ2
     1577function num_Maxtanh_Callback(hObject, eventdata, handles)
     1578Maxtanh_string=get(hObject,'String');
     1579set(handles.num_Maxtanh,'String',Maxtanh_string);
     1580set(handles.num_Maxtanh,'Visible','on');
     1581set(handles.title_Maxtanh,'Visible','on');
     1582set(handles.CheckRescale,'Value',true);
     1583
    15291584set(handles.ConfigSource,'String','NEW')
    15301585set(handles.OK,'BackgroundColor',[1 0 1])
     
    19522007
    19532008
    1954 function edit108_Callback(hObject, eventdata, handles)
    1955 % hObject    handle to edit108 (see GCBO)
    1956 % eventdata  reserved - to be defined in a future version of MATLAB
    1957 % handles    structure with handles and user data (see GUIDATA)
    1958 
    1959 % Hints: get(hObject,'String') returns contents of edit108 as text
    1960 %        str2double(get(hObject,'String')) returns contents of edit108 as a double
    1961 
    1962 
    19632009% --- Executes on button press in CheckBackground.
    19642010function CheckBackground_Callback(hObject, eventdata, handles)
Note: See TracChangeset for help on using the changeset viewer.