Changeset 1178 for trunk/src/series.m


Ignore:
Timestamp:
Mar 21, 2025, 10:17:07 AM (4 weeks ago)
Author:
sommeria
Message:

virtual frame indexing introduced

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series.m

    r1171 r1178  
    553553set(handles.series,'Pointer','watch') % set the mouse pointer to 'watch'
    554554set(handles.REFRESH,'BackgroundColor',[1 1 0])% set REFRESH  button to yellow color (indicate activation)
     555set(handles.Relabel,'BackgroundColor',[0 1 0])
    555556drawnow
    556557empty_line=false(size(InputTable,1),1);
     
    876877    MinIndex_j=0;
    877878end
     879if isfield(FileInfo,'Software')&&~isempty(FileInfo.Software) && ~isempty(regexp(FileInfo.Software,'^pco.camware', 'once'))
     880    MinIndex_i=0;
     881end
     882if strcmp(FileInfo.FileType,'rdvision')
     883    set(handles.OutputSubDir,'String','/im')
     884end
    878885MinIndex_i_table=get(handles.MinIndex_i,'Data'); % retrieve the min indices in the table MinIndex
    879886MinIndex_j_table=get(handles.MinIndex_j,'Data'); % retrieve the min indices in the table MinIndex
     
    10351042        TimeMax=Time(MaxIndex_i+1,MaxIndex_j+1);
    10361043    end
     1044end
     1045
     1046%% case of possible index relabeling from xml info
     1047if isfield(XmlData,'FileSeries')&& strcmp(FileInfo.FileType,'multimage')
     1048    set(handles.Relabel,'Visible','on')
     1049    set(handles.Relabel,'Value',0)
     1050    SeriesData.FileSeries{iview}=XmlData.FileSeries;
     1051    TimeMin=Time(2,2);
     1052    TimeMax=Time(end,end);
     1053    TimeFirst=TimeMin;
     1054    TimeLast=TimeMax;
     1055elseif iview==1
     1056    set(handles.Relabel,'Visible','off')
    10371057end
    10381058
     
    14071427if isfield(SeriesData,'ProjObject')
    14081428    Param.ProjObject=SeriesData.ProjObject;
     1429end
     1430if isfield(SeriesData,'FileSeries')
     1431    Param.FileSeries=SeriesData.FileSeries{1};
    14091432end
    14101433if ~isfield(SeriesData,'i1_series')
     
    39363959
    39373960
    3938 
    3939 
    39403961function OutputPath_Callback(hObject, eventdata, handles)
    39413962
     
    39593980
    39603981
    3961 
    39623982% --- Executes on button press in DeleteMask.
    39633983function DeleteMask_Callback(hObject, eventdata, handles)
    39643984set(handles.MaskTable,'Data',{})
     3985
     3986
     3987% --- Executes on button press in Relabel.
     3988function Relabel_Callback(hObject, eventdata, handles)
     3989if get(handles.Relabel,'Value')
     3990    SeriesData=get(handles.series,'UserData');
     3991    if isfield(SeriesData,'FileSeries')&& ~isempty(SeriesData.FileSeries{1})
     3992        [nbfield,nbfield_j]=size(SeriesData.Time{1});
     3993        nbfield=nbfield-1; %remove the possible index 0
     3994        nbfield_j=nbfield_j-1; %remove the possible index 0
     3995        MaxIndex_i=get(handles.MaxIndex_i,'Data');
     3996        MaxIndex_j=get(handles.MaxIndex_j,'Data');
     3997        MaxIndex_i(1,:)=nbfield;
     3998        MaxIndex_j(1,:)=nbfield_j;
     3999                MinIndex_i(1,:)=1;
     4000        MinIndex_j(1,:)=1;
     4001        set(handles.MaxIndex_i,'Data',MaxIndex_i)
     4002        set(handles.MaxIndex_j,'Data',MaxIndex_j)
     4003         set(handles.MinIndex_i,'Data',MinIndex_i)
     4004        set(handles.MinIndex_j,'Data',MinIndex_j)
     4005        first_i=str2double(get(handles.num_first_i,'String'));
     4006        first_j=str2double(get(handles.num_first_j,'String'));
     4007        i1=(first_i-SeriesData.FileSeries{1}.FirstFileIndex)*SeriesData.FileSeries{1}.NbFramePerFile+1;%frame index deduced from input file index
     4008        if strcmp(SeriesData.TimeName,'xml')% indices i and j
     4009            j1=mod(i1-1,nbfield_j)+first_j;
     4010            i1=floor((i1-1)/nbfield_j)+1;
     4011            set(handles.num_first_j,'String',num2str(j1))
     4012        end
     4013        set(handles.num_first_i,'String',num2str(i1))
     4014%         last_i=str2double(get(handles.num_last_i,'String'));
     4015%         last_j=str2double(get(handles.num_last_j,'String'));
     4016%         i1=(last_i-SeriesData.FileSeries{1}.FirstFileIndex)*SeriesData.FileSeries{1}.NbFramePerFile+1;%frame index deduced from input file index
     4017%         if strcmp(SeriesData.TimeName,'xml')% indices i and j
     4018%             j1=mod(i1-1,nbfield_j)+1;
     4019%             i1=floor((i1-1)/nbfield_j)+1;
     4020%         end
     4021        set(handles.num_last_i,'String',num2str(nbfield))
     4022         set(handles.num_last_j,'String',num2str(nbfield_j))
     4023    end
     4024else
     4025    check_input_file_series(handles)
     4026    ActionInput_Callback([],[], handles)
     4027end
     4028
Note: See TracChangeset for help on using the changeset viewer.