source: trunk/src/series/time_series.m @ 392

Last change on this file since 392 was 392, checked in by sommeria, 12 years ago

bugs corrected for phys ort other transform functions

File size: 24.6 KB
Line 
1%'time_series': extract a time series, used with series.fig
2%------------------------------------------------------------------------
3% function GUI_input=time_series(Param)
4%
5%OUTPUT
6% GUI_input=list of options in the GUI series.fig needed for the function
7%
8%INPUT:
9%num_i1: series of first indices i (given from the series interface as first_i:incr_i:last_i, mode and list_pair_civ)
10%i2_series: series of second indices i (given from the series interface as first_i:incr_i:last_i, mode and list_pair_civ)
11%num_j1: series of first indices j (given from the series interface as first_j:incr_j:last_j, mode and list_pair_civ )
12%num_j2: series of second indices j (given from the series interface as first_j:incr_j:last_j, mode and list_pair_civ)
13%Series: Matlab structure containing information set by the series interface
14%
15function GUI_input=time_series(Param)
16
17%% requests for the visibility of input windows in the GUI series  (activated directly by the selection in the menu ACTION)
18if ~exist('Param','var')
19    GUI_input={'RootPath';'two';...%nbre of possible input series (options 'on'/'two'/'many', default:'one')
20        'SubDir';'on';... % subdirectory of derived files (PIV fields), ('on' by default)
21        'RootFile';'on';... %root input file name ('on' by default)
22        'FileExt';'on';... %input file extension ('on' by default)
23        'NomType';'on';...%type of file indexing ('on' by default)
24        'NbSlice';'on'; ...%nbre of slices ('off' by default)
25        'VelTypeMenu';'two';...% menu for selecting the velocity type (civ1,..) options 'off'/'one'/'two', 'off' by default)
26        'FieldMenu';'two';...% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default)
27        'CoordType';'on';...%can use a transform function 'off' by default
28        'GetObject';'on';...%can use projection object ,'off' by default
29        %'GetMask';'on'...%can use mask option   ,'off' by default
30        %'PARAMETER'; options: name of the user defined parameter',repeat a line for each parameter
31               ''};
32    return %exit the function
33end
34
35%% input parameters
36% read the xml file for batch case
37if ischar(Param) && ~isempty(find(regexp('Param','.xml$')))
38    Param=xml2struct(Param);
39else %  RUN case: parameters introduced as the input structure Param
40    hseries=guidata(Param.hseries);%handles of the GUI series
41    WaitbarPos=get(hseries.waitbar_frame,'Position');
42end
43[filecell,i1_series,i2_series,j1_series,j2_series]=get_file_series(Param);
44
45%% coordinate transform or other user defined transform
46transform_fct='';%default
47if isfield(Param,'FieldTransform')&&isfield(Param.FieldTransform,'fct_handle')
48    transform_fct=Param.FieldTransform.fct_handle;
49end
50
51%% projection object
52test_object=get(hseries.GetObject,'Value');
53if test_object
54    hset_object=findobj(allchild(0),'tag','set_object');
55%     ProjObject=read_set_object(guidata(hset_object));
56    ProjObject=read_GUI(hset_object);
57    answeryes=msgbox_uvmat('INPUT_Y-N',['field series projected on ' ProjObject.Style]);
58    if ~isequal(answeryes,'Yes')
59        return
60    end
61else
62    msgbox_uvmat('ERROR','a projection object is needed');
63    return
64end
65
66%% features of the input fields
67    RootPath=Param.InputTable(:,1);
68    RootFile=Param.InputTable(:,3);
69    SubDir=Param.InputTable(:,2);
70    NomType=Param.InputTable(:,4);
71    FileExt=Param.InputTable(:,5);
72ext=FileExt{1};
73form=imformats(ext(2:end));%test valid Matlab image formats
74nbfield=size(i1_series{1},1)*size(i1_series{1},2); %number of fields in the time series
75
76%% determine image type
77hhh=which('mmreader');
78testnetcdf=0;
79nbview=length(RootPath);%Number of input series: this function  accepts only one or two input file series (sub_field is used in the latter case)
80for iview=1:nbview
81    if isequal(FileExt{iview},'.nc')||isequal(FileExt{iview},'.cdf')
82        FileType{iview}='netcdf';
83        testnetcdf=1;
84    elseif isequal(lower(FileExt{iview}),'.avi')
85        if ~isequal(hhh,'')%&& mmreader.isPlatformSupported()
86            MovieObject{iview}=mmreader(fullfile(RootPath{iview},[RootFile{iview} FileExt{iview}]));
87            FileType{iview}='movie';
88        else
89            FileType{iview}='avi';
90        end
91    elseif isequal(lower(FileExt{iview}),'.vol')
92        FileType{iview}='vol';
93    else
94       form=imformats(FileExt{iview}(2:end));
95       if ~isempty(form)% if the extension corresponds to an image format recognized by Matlab
96           if isequal(NomType{iview},'*');
97               FileType{iview}='multimage';
98           else
99               FileType{iview}='image';
100           end
101       end
102    end
103end
104filebase{1}=fullfile(RootPath{1},RootFile{1});
105
106%% number of slices
107NbSlice=Param.NbSlice;
108
109%% Field and velocity type (the same for the two views)
110FieldName={''};
111
112if isfield(Param,'InputFields')&&isfield(Param.InputFields,'FieldMenu') 
113    FieldName=Param.InputFields.FieldMenu;%the same set of fields for all views
114    VelType{1}=Param.InputFields.VelTypeMenu;
115end
116if isempty(FieldName) && testnetcdf
117    msgbox_uvmat('ERROR','A field must be defined as input')
118    return
119end
120if isequal(FieldName,'get_field...')
121    hget_field=findobj(allchild(0),'name','get_field');%find the get_field... GUI
122    if numel(hget_field)>1
123        delete(hget_field(2:end)) % delete multiple occurerence of the GUI get_fioeld
124    elseif isempty(hget_field)
125        filename=filecell{1,1};
126      % filename=name_generator(filebase{1},i1_series{1}(1),j1_series{1}(1),FileExt{1},NomType{1},1,i2_series{1}(1),num_j2{1}(1),SubDir{1});
127       idetect(iview)=exist(filename,'file');
128       hget_field=get_field(filename);
129       return
130    end
131    SubField=read_get_field(hget_field); %read the names of the variables to plot in the get_field GUI
132    if isempty(SubField)
133        delete(hget_field)
134        filename=filecell{1,1};
135       %filename=name_generator(filebase{1},i1_series{1}(1),j1_series{1}(1),FileExt{1},NomType{1},1,i2_series{1}(1),j2_series{1}(1),SubDir{1});
136        hget_field=get_field(filename);
137        SubField=read_get_field(hget_field); %read the names of the variables to plot in the get_field GUI
138    end
139end
140
141%% detect whether the two files are 'images' or 'netcdf'
142testcivx=0;
143% FileExt=get(hseries.FileExt,'String');
144if ~isequal(FieldName,{'get_field...'})
145    testcivx=isequal(FileType{1},'netcdf');
146end
147% VelType_str=get(hseries.VelTypeMenu,'String');
148% VelType_val=get(hseries.VelTypeMenu,'Value');
149% VelType{1}=VelType_str{VelType_val};
150% if nbview==2
151%     VelType_str=get(hseries.VelTypeMenu_1,'String');
152%     VelType_val=get(hseries.VelTypeMenu_1,'Value');
153%     VelType{2}=VelType_str{VelType_val};
154% end
155
156%% Calibration data and timing: read the ImaDoc files
157% mode=''; %default
158timecell={};
159XmlData={};
160itime=0;
161NbSlice_calib={};
162for iview=1:nbview%Loop on views
163    XmlData{iview}=[];%default
164    filebase{iview}=fullfile(RootPath{iview},RootFile{iview});
165    if exist([filebase{iview} '.xml'],'file')
166        [XmlData{iview},error]=imadoc2struct([filebase{iview} '.xml']);
167        if isfield(XmlData{iview},'Time')
168            itime=itime+1;
169            timecell{itime}=XmlData{iview}.Time;
170        end
171        if isfield(XmlData{iview},'GeometryCalib') && isfield(XmlData{iview}.GeometryCalib,'SliceCoord')
172            NbSlice_calib{iview}=size(XmlData{iview}.GeometryCalib.SliceCoord,1);%nbre of slices for Zindex in phys transform
173            if ~isequal(NbSlice_calib{iview},NbSlice_calib{1})
174                msgbox_uvmat('WARNING','inconsistent number of Z indices for the field series');
175            end
176        end
177    elseif exist([filebase{iview} '.civ'],'file')%old convention .civ text file
178        [error,time,TimeUnit,mode,npx,npy,pxcmx,pxcmy]=read_imatext([filebase{iview} '.civ']);
179        itime=itime+1;
180        timecell{itime}=time;
181        XmlData{iview}.Time=time;
182        GeometryCalib.R=[pxcmx 0 0; 0 pxcmy 0;0 0 0];
183        GeometryCalib.Tx=0;
184        GeometryCalib.Ty=0;
185        GeometryCalib.Tz=1;
186        GeometryCalib.dpx=1;
187        GeometryCalib.dpy=1;
188        GeometryCalib.sx=1;
189        GeometryCalib.Cx=0;
190        GeometryCalib.Cy=0;
191        GeometryCalib.f=1;
192        GeometryCalib.kappa1=0;
193        GeometryCalib.CoordUnit='cm';
194        XmlData{iview}.GeometryCalib=GeometryCalib;
195        if error==1
196            msgbox_uvmat('WARNING','inconsistent number of fields in the .civ file');
197        end
198    end
199end
200time=[];%default
201if ~isempty(timecell)
202    if numel(timecell{1})<nbfield
203       msgbox_uvmat('WARNING','time array from ImaDoc to short')
204    else
205        time=timecell{1}; %time defined from ImaDoc file (image series)
206    end
207end
208
209%% check coincidence in time
210if length(timecell)>1
211    for icell=2:length(timecell)
212        if isequal(size(timecell{icell}),size(time))
213            diff_time=max(abs(timecell{icell}-time));
214            if diff_time>0
215                msgbox_uvmat('WARNING',['times of series differ by more than ' num2str(diff_time)])
216                break
217            end
218        else
219            msgbox_uvmat('WARNING','inconsistent time array dimensions in ImaDoc fields, the time for the first series is used')
220            break
221        end
222    end
223end
224if ~isempty(time)
225    display(['time is read from ' filebase{iview} '.xml'])
226end
227
228%%  Root name of output files (TO GENERALISE FOR TWO INPUT SERIES)
229subdir_result='time_series';
230pathdir=fullfile(RootPath{1},subdir_result);
231while exist(pathdir,'dir')
232    subdir_result=[subdir_result '.0'];
233    pathdir=fullfile(RootPath{1},subdir_result);
234end
235[m1,m2,m3]=mkdir(pathdir);
236if ~isequal(m2,'')
237     msgbox_uvmat('CONFIRMATION',m2);%error message for directory creation
238end
239[xx,msg2] = fileattrib(pathdir,'+w','g'); %yield writing access (+w) to user group (g)
240if ~strcmp(msg2,'')
241    msgbox_uvmat('ERROR',['pb of permission for ' pathdir ': ' msg2])%error message for directory creation
242    return
243end
244filebase_out=filebase{1};
245 i21=i1_series{end}(end);
246 if ~isempty(i2_series{end})
247     i21=i2_series{end}(end)-i1_series{1}(1);
248 end
249 j21=1;
250 if ~isempty(j1_series{1})
251     j21=j1_series{end}(end);
252      if ~isempty(j2_series{end})
253          j21=j2_series{end}(end)-j21;
254      end
255 end
256NomTypeOut=nomtype2pair(NomType{1},i21,j21);
257
258
259%% velocity type
260VelType_str=get(hseries.VelTypeMenu,'String');
261VelType_val=get(hseries.VelTypeMenu,'Value');
262VelType{1}=VelType_str{VelType_val};
263if nbview==2
264    VelType_str=get(hseries.VelTypeMenu_1,'String');
265    VelType_val=get(hseries.VelTypeMenu_1,'Value');
266    VelType{2}=VelType_str{VelType_val};
267end
268
269%% LOOP ON SLICES
270nbmissing=0; %number of undetected files
271for i_slice=1:NbSlice
272    dt=[];
273    %%%%%%%%%%%%%%%%%%%%%%%%%%%%  LOOP ON FIELDS WITHIN  A SLICE
274    filecounter=0;
275    for ifile=i_slice:NbSlice:nbfield
276        stopstate=get(hseries.RUN,'BusyAction');
277        errormsg='';
278        if isequal(stopstate,'queue')% enable STOP command
279            update_waitbar(hseries.waitbar,WaitbarPos,ifile/nbfield) % update the waitbar
280            % loop on views (in case of multiple input series)
281            for iview=1:nbview
282                filename=filecell{iview,ifile};
283               % filename=name_generator(filebase{iview},...
284                %    i1_series{iview}(ifile),j1_series{iview}(ifile),FileExt{iview},NomType{iview},1,i2_series{iview}(ifile),j2_series{iview}(ifile),SubDir{iview});
285                if exist(filename,'file')
286                    try
287                        Data{iview}=[]; %default
288                        if ~isequal(FileType{iview},'netcdf')
289                            Data{iview}.ListVarName={'A'};
290                            Data{iview}.AName='image';
291                            switch FileType{iview}
292                                case 'movie'
293                                    A=read(MovieObject{iview},i1_series{iview}(ifile));
294                                case 'avi'
295                                    mov=aviread(filename,i1_series{iview}(ifile));
296                                    A=frame2im(mov(1));
297                                case 'vol'
298                                    A=imread(filename);
299                                case 'multimage'
300                                    A=imread(filename,i1_series{iview}(ifile));
301                                case 'image'
302                                    A=imread(filename);
303                            end
304                            Data{iview}.ListVarName={'AY','AX','A'}; %
305                            npy=size(A,1);
306                            npx=size(A,2);
307                            nbcolor=size(A,3);
308                            if nbcolor==3
309                                Data{iview}.VarDimName={'AY','AX',{'AY','AX','rgb'}};
310                            else
311                                Data{iview}.VarDimName={'AY','AX',{'AY','AX'}};
312                            end
313                            Data{iview}.AY=[npy-0.5 0.5];
314                            Data{iview}.AX=[0.5 npx-0.5];
315                            Data{iview}.A=double(A);
316                            Data{iview}.CoordUnit='pixel';
317                        elseif testcivx
318                            [Data{iview},VelTypeOut]=read_civxdata(filename,FieldName,VelType);
319                            if ~isequal(FieldName,{''})
320                                Data{iview}=calc_field(FieldName,Data{iview});%calculate field (vort..)
321                            end
322                        else
323                            [Data{iview},var_detect]=nc2struct(filename,SubField.ListVarName); %read the corresponding input data
324                            Data{iview}.VarAttribute=SubField.VarAttribute;
325                        end
326                        if ~isempty(NbSlice_calib)  % z index
327                            Data{iview}.ZIndex=mod(i1_series{iview}(ifile)-1,NbSlice_calib{1})+1;
328                        end
329                    catch ME
330                        errormsg=ME.message;
331                    end
332                else
333                    errormsg=[filename ' is missing'];
334                end
335                if isempty(errormsg)
336                    % coordinate transform (or other user defined transform)
337                    if ~isempty(transform_fct)
338                        if nbview==2
339                            [Data{1},Data{2}]=transform_fct(Data{1},XmlData{1},Data{2},XmlData{2});
340                            if isempty(Data{2})
341                                Data(2)=[];
342                            end
343                        else
344                            Data{1}=transform_fct(Data{1},XmlData{1});
345                        end
346                    end
347                    if length(Data)==2
348                        [Field,errormsg]=sub_field(Data{1},Data{2}); %substract the two fields
349                    else
350                        Field=Data{1};
351                    end
352                    if test_object
353                        [Field,errormsg]=proj_field(Field,ProjObject);
354                    end
355                end
356                filecounter=filecounter+1;
357               
358                % initiate the time series at the first iteration
359                if filecounter==1
360                    % stop program if the first field reading is in error
361                    if ~isempty(errormsg)
362                        msgbox_uvmat('ERROR',['error in time_series/sub_field:' errormsg])
363                        return
364                    end
365                    RecordData=Field;%default
366                    RecordData.NbDim=Field.NbDim+1; %add the time dimension for plots
367                    nbvar=length(Field.ListVarName);
368                    if nbvar==0
369                        msgbox_uvmat('ERROR','no input variable selected in get_field')
370                        return
371                    end
372                    testsum=2*ones(1,nbvar);%initiate flag for action on each variable
373                    if isfield(Field,'VarAttribute') % look for coordinate and flag variables
374                        for ivar=1:nbvar
375                            if length(Field.VarAttribute)>=ivar && isfield(Field.VarAttribute{ivar},'Role')
376                                var_role=Field.VarAttribute{ivar}.Role;%'role' of the variable
377                                if isequal(var_role,'errorflag')
378                                    msgbox_uvmat('ERROR','do not handle error flags in time series')
379                                    return
380                                end
381                                if isequal(var_role,'warnflag')
382                                    testsum(ivar)=0;  % not recorded variable
383                                    eval(['RecordData=rmfield(RecordData,''' Field.ListVarName{ivar} ''');']);%remove variable
384                                end
385                                if isequal(var_role,'coord_x')| isequal(var_role,'coord_y')|...
386                                        isequal(var_role,'coord_z')|isequal(var_role,'coord')
387                                    testsum(ivar)=1; %constant coordinates, record without time evolution
388                                end
389                            end
390                            % check whether the variable ivar is a dimension variable
391                            DimCell=Field.VarDimName{ivar};
392                            if ischar(DimCell)
393                                DimCell={DimCell};
394                            end
395                            if numel(DimCell)==1 && isequal(Field.ListVarName{ivar},DimCell{1})%detect dimension variables
396                                testsum(ivar)=1;
397                            end
398                        end
399                    end
400                    for ivar=1:nbvar
401                        if testsum(ivar)==2
402                            eval(['RecordData.' Field.ListVarName{ivar} '=[];'])
403                        end
404                    end
405                    RecordData.ListVarName=[{'Time'} RecordData.ListVarName];
406                end
407               
408                % add data to the current field
409                for ivar=1:length(Field.ListVarName)
410                    VarName=Field.ListVarName{ivar};
411                    VarVal=Field.(VarName);
412                    if testsum(ivar)==2% test for recorded variable
413                        if isempty(errormsg)
414                            if isequal(ProjObject.ProjMode,'inside')% take the average in the domain for 'inside' mode
415                                if isempty(VarVal)
416                                    msgbox_uvmat('ERROR',['empty result at frame index ' num2str(i1_series{iview}(ifile))])
417                                    return
418                                end
419                                VarVal=mean(VarVal,1);
420                            end
421                            VarVal=shiftdim(VarVal,-1); %shift dimension
422                            RecordData.(VarName)=cat(1,RecordData.(VarName),VarVal);%concanete the current field to the time series
423                        else
424                            RecordData.(VarName)=cat(1,RecordData.(VarName),0);% put each variable to 0 in case of input reading error
425                        end
426                    elseif testsum(ivar)==1% variable representing fixed coordinates
427                        eval(['VarInit=RecordData.' VarName ';']);
428                        if isempty(errormsg) && ~isequal(VarVal,VarInit)
429                            msgbox_uvmat('ERROR',['time series requires constant coordinates ' VarName])
430                            return
431                        end
432                    end
433                end
434               
435                % record the time:
436                if isempty(time)% time read in ncfiles
437                    if isfield(Field,'Time')
438                        RecordData.Time(filecounter,1)=Field.Time;
439                    else
440                        RecordData.Time(filecounter,1)=ifile;%default
441                    end
442                else % time from ImaDoc prevails  TODO: correct
443                  %  RecordData.Time(filecounter,1)=time{1}(i1_series{1})(ifile),j1_series{1}(ifile))+time(end,i2_series{end}(ifile),j2_series{end}(ifile)))/2;
444                  RecordData.Time(filecounter,1)=i1_series{1}(ifile);% TODO : generalise
445                end
446               
447                % record the number of missing input fields
448                if ~isempty(errormsg)
449                    nbmissing=nbmissing+1;
450                    display(['ifile=' num2str(ifile) ':' errormsg])
451                end
452            end
453        end
454    end
455    %%%%%%% END OF LOOP WITHIN A SLICE
456   
457    %remove time for global attributes if exists
458    for iattr=1:numel(RecordData.ListGlobalAttribute)
459        if strcmp(RecordData.ListGlobalAttribute{iattr},'Time')
460            RecordData.ListGlobalAttribute(iattr)=[];
461            break
462        end
463    end
464    for ivar=1:numel(RecordData.ListVarName)
465        VarName=RecordData.ListVarName{ivar};
466        eval(['RecordData.' VarName '=squeeze(RecordData.' VarName ');']) %remove singletons
467    end
468   
469    % add time dimension
470    for ivar=1:length(Field.ListVarName)
471        DimCell=Field.VarDimName(ivar);
472        if testsum(ivar)==2%variable used as time series
473            RecordData.VarDimName{ivar}=[{'Time'} DimCell];
474        elseif testsum(ivar)==1
475            RecordData.VarDimName{ivar}=DimCell;
476        end
477    end
478    indexremove=find(~testsum);
479    if ~isempty(indexremove)
480        RecordData.ListVarName(1+indexremove)=[];
481        RecordData.VarDimName(indexremove)=[];
482        if isfield(RecordData,'Role') && ~isempty(RecordData.Role{1})%generaliser aus autres attributs
483            RecordData.Role(1+indexremove)=[];
484        end
485    end
486   
487    %shift variable attributes
488    if isfield(RecordData,'VarAttribute')
489        RecordData.VarAttribute=[{[]} RecordData.VarAttribute];
490    end
491    RecordData.VarDimName=[{'Time'} RecordData.VarDimName];
492    RecordData.Action=Param.Action;%name of the processing programme
493    test_time=diff(RecordData.Time)>0;% test that the readed time is increasing (not constant)
494    if ~test_time
495        RecordData.Time=[1:filecounter];
496    end
497   
498    % display nbmissing
499    if ~isequal(nbmissing,0)
500        msgbox_uvmat('WARNING',[num2str(nbmissing) ' files skipped: missing files or bad input, see command window display'])
501    end
502   
503    %name of result file
504   % [filemean]=...
505    %    name_generator(filebase_out,i1_series{1}(i_slice),j1_series{1}(i_slice),'.nc','_i1-i2_j1-j2',1,i2_series{end}(ifile),j2_series{end}(ifile),subdir_result);
506    filemean=fullfile_uvmat(RootPath{1},subdir_result,RootFile{1},'.nc','_1',i1_series{1}(i_slice));
507    errormsg=struct2nc(filemean,RecordData); %save result file
508    if isempty(errormsg)
509        display([filemean ' written'])
510    else
511        msgbox_uvmat('ERROR',['error in Series/struct2nc: ' errormsg])
512    end
513end
514
515%% plot the time series (the last one in case of multislices)
516figure
517haxes=axes;
518plot_field(RecordData,haxes)
519
520%% display the result file using the GUI get_field
521hget_field=findobj(allchild(0),'name','get_field');
522if ~isempty(hget_field)
523    delete(hget_field)
524end
525get_field(filemean,RecordData)
526   
527%------------------------------------------------------------------------
528% --- Executes on selection change in CoordType.
529function CoordType_Callback(hObject, eventdata, handles)
530%------------------------------------------------------------------------
531menu_str=get(handles.CoordType,'String');
532ind_coord=get(handles.CoordType,'Value');
533coord_option=menu_str{ind_coord};
534if isequal(coord_option,'more...');
535    fct_name='';
536    if exist('./TMP/current_usr_fct.mat','file')% if a file is found
537        h=load('./TMP/current_usr_fct.mat');
538        if isfield(h,'fct_name');
539            fct_name=h.fct_name;
540        end
541    end
542    prompt = {'Enter the name of the transform function'};
543    dlg_title = 'user defined transform';
544    num_lines= 1;
545    [FileName, PathName, filterindex] = uigetfile( ...
546       {'*.m', ' (*.m)';
547        '*.m',  '.m files '; ...
548        '*.*', 'All Files (*.*)'}, ...
549        'Pick a file', fct_name);
550    fct_name=fullfile(PathName,FileName);
551    addpath(PathName);%add the path to the selected fct
552    [errormsg,date_str]=check_functions;%check whether new functions can oversed the uvmat package A UTILISER
553    if ~exist(fct_name,'file')
554           warndlg(['image procesing fct ' fct_name ' not found'])
555    else
556        transform=FileName(1:end-2);%
557        update_menu(handles.CoordType,transform)%add the selected fct to the menu
558  %      set(handles.mouse_coord,'String',menu([1:end-1])')%update the mouse coord menu
559      %save ('./TMP/current_usr_fct.mat','fct_name');
560    end   
561end
562ind_coord=get(handles.CoordType,'Value');   
563
564%---------------------------------------------------------------------
565% % --- Executes on selection change in ProjObject.
566% function ProjObject_Callback(hObject, eventdata, handles)
567%
568% list_object=get(handles.ProjObject,'String');
569% index=get(handles.ProjObject,'Value');
570% hseries=get(handles.ProjObject,'Parent');
571% SeriesData=get(hseries,'UserData');
572% Obj=SeriesData.ProjObject{index};
573% [SeriesData.hset_object,SeriesData.sethandles]=set_object(SeriesData.ProjObject{index});
574% set(hseries,'UserData',SeriesData);
575
Note: See TracBrowser for help on using the repository browser.