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

Last change on this file since 107 was 107, checked in by sommeria, 14 years ago

aver_stat and time_series: bug repairs for reading images, for time series, the projection of images on a line now works
get_field: various bug repairs, export field on work space activated
struct2nc and struct2nc_toolbox.m: small bug repaired
nomtype2pair: test on string input introduced to avoid error
cell2tab: test on multiline input introduced
civ: pb about cell repair (bug with recent versions of matlab)

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