Changeset 671


Ignore:
Timestamp:
Jul 31, 2013, 11:11:55 PM (7 years ago)
Author:
sommeria
Message:

geometry_calib corrected for translation and rotation + cleaning

Location:
trunk/src
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/fill_GUI.m

    r667 r671  
    1818    return
    1919end
    20 children=get(GUI_handle,'children');
     20children=get(GUI_handle,'children');%handles of the children of the input GUI with handle 'GUI_handle'
    2121handles=[];
    2222for ichild=1:numel(children)
     23    if ~isempty(get(children(ichild),'tag'))
    2324    handles.(get(children(ichild),'tag'))=children(ichild);
     25    end
    2426end
    2527UserData=get(GUI_handle,'UserData');
  • trunk/src/geometry_calib.m

    r663 r671  
    5050% Edit the above text to modify the response to help geometry_calib
    5151
    52 % Last Modified by GUIDE v2.5 05-Jul-2013 08:29:07
     52% Last Modified by GUIDE v2.5 31-Jul-2013 23:03:18
    5353
    5454% Begin initialization code - DO NOT edit
     
    123123    end
    124124    set(handles.ListCoord,'Data',[])
    125    % set(handles.ListCoord,'Data',{[] [] [] [] [] []})
    126125    if exist(inputfile,'file')
    127126        Heading=loadfile(handles,inputfile);% load data from the xml file
     
    215214Data(index,6)=1;% indicate in the list the point with max deviation (possible mistake)
    216215set(handles.ListCoord,'Data',Data)% indicate in the list the point with max deviation (possible mistake)
    217 %ListCoord_Callback(hObject, eventdata, handles)
    218216figure(handles.geometry_calib)
    219217
     
    264262%------------------------------------------------------------------------
    265263%% read the current calibration points
    266 %Coord_cell=get(handles.ListCoord,'Data');
    267 %Object=read_geometry_calib(Coord_cell);
    268264Coord=get(handles.ListCoord,'Data');
    269265Coord(:,6)=[];
     
    701697ErrorRms=mean(ErrorRms);
    702698
    703 %------------------------------------------------------------------------
    704 function XImage_Callback(hObject, eventdata, handles)
    705 %------------------------------------------------------------------------
    706 update_list(hObject, eventdata,handles)
    707 
    708 %------------------------------------------------------------------------
    709 function YImage_Callback(hObject, eventdata, handles)
    710 %------------------------------------------------------------------------
    711 update_list(hObject, eventdata,handles)
     699% %------------------------------------------------------------------------
     700% function XImage_Callback(hObject, eventdata, handles)
     701% %------------------------------------------------------------------------
     702% update_list(hObject, eventdata,handles)
     703%
     704% %------------------------------------------------------------------------
     705% function YImage_Callback(hObject, eventdata, handles)
     706% %------------------------------------------------------------------------
     707% update_list(hObject, eventdata,handles)
    712708
    713709%------------------------------------------------------------------------
     
    745741    set(handles.ListCoordFiles,'string',listfile);
    746742end
    747 % set(handles.ListCoord,'Value',1)% refresh the display of coordinates
    748743set(handles.ListCoord,'Data',[])
    749744
     
    752747function CLEAR_PTS_Callback(hObject, eventdata, handles)
    753748% --------------------------------------------------------------------
    754 % set(handles.ListCoord,'Value',1)% refresh the display of coordinates
    755 % set(handles.ListCoord,'String',{'......'})
    756749set(handles.ListCoord,'Data',[])
    757750PLOT_Callback(hObject, eventdata, handles)
    758751
    759 
    760752%------------------------------------------------------------------------
    761753% --- Executes on button press in CLEAR.
     
    765757set(handles.ListCoordFiles,'String',{''})
    766758
    767 %------------------------------------------------------------------------
    768 function XObject_Callback(hObject, eventdata, handles)
    769 %------------------------------------------------------------------------
    770 update_list(hObject, eventdata,handles)
    771 
    772 %------------------------------------------------------------------------
    773 function YObject_Callback(hObject, eventdata, handles)
    774 %------------------------------------------------------------------------
    775 update_list(hObject, eventdata,handles)
    776 
    777 %------------------------------------------------------------------------
    778 function ZObject_Callback(hObject, eventdata, handles)
    779 %------------------------------------------------------------------------
    780 update_list(hObject, eventdata,handles)
    781 
    782 %------------------------------------------------------------------------
    783 function update_list(hObject, eventdata, handles)
    784 %------------------------------------------------------------------------
    785 newval(4)=str2double(get(handles.XImage,'String'));
    786 newval(5)=str2double(get(handles.YImage,'String'));
    787 newval(1)=str2double(get(handles.XObject,'String'));
    788 newval(2)=str2double(get(handles.YObject,'String'));
    789 newval(3)=str2double(get(handles.ZObject,'String'));
    790 if isnan(newval(3))
    791     newval(3)=0;%put z to 0 by default
    792 end
    793 Coord=get(handles.ListCoord,'String');
    794 Coord(end)=[]; %remove last string '.....'
    795 val=get(handles.ListCoord,'Value');
    796 data=read_geometry_calib(Coord);
    797 data.Coord(val,:)=newval;
    798 for i=1:size(data.Coord,1)
    799     for j=1:5
    800           Coord_cell{i,j}=num2str(data.Coord(i,j),4);%display coordiantes with 4 digits
    801     end
    802 end
    803 
    804 Tabchar=cell2tab(Coord_cell,' | ');
    805 Tabchar=[Tabchar ;{'......'}];
    806 set(handles.ListCoord,'String',Tabchar)
    807 
    808 %update the plot
    809 ListCoord_Callback(hObject, eventdata, handles)
    810 PLOT_Callback(hObject, eventdata, handles)
     759% %------------------------------------------------------------------------
     760% function XObject_Callback(hObject, eventdata, handles)
     761% %------------------------------------------------------------------------
     762% update_list(hObject, eventdata,handles)
     763%
     764% %------------------------------------------------------------------------
     765% function YObject_Callback(hObject, eventdata, handles)
     766% %------------------------------------------------------------------------
     767% update_list(hObject, eventdata,handles)
     768%
     769% %------------------------------------------------------------------------
     770% function ZObject_Callback(hObject, eventdata, handles)
     771% %------------------------------------------------------------------------
     772% update_list(hObject, eventdata,handles)
     773%
     774% %------------------------------------------------------------------------
     775% function update_list(hObject, eventdata, handles)
     776% %------------------------------------------------------------------------
     777% newval(4)=str2double(get(handles.XImage,'String'));
     778% newval(5)=str2double(get(handles.YImage,'String'));
     779% newval(1)=str2double(get(handles.XObject,'String'));
     780% newval(2)=str2double(get(handles.YObject,'String'));
     781% newval(3)=str2double(get(handles.ZObject,'String'));
     782% if isnan(newval(3))
     783%     newval(3)=0;%put z to 0 by default
     784% end
     785% Coord=get(handles.ListCoord,'String');
     786% Coord(end)=[]; %remove last string '.....'
     787% val=get(handles.ListCoord,'Value');
     788% data=read_geometry_calib(Coord);
     789% data.Coord(val,:)=newval;
     790% for i=1:size(data.Coord,1)
     791%     for j=1:5
     792%           Coord_cell{i,j}=num2str(data.Coord(i,j),4);%display coordiantes with 4 digits
     793%     end
     794% end
     795%
     796% Tabchar=cell2tab(Coord_cell,' | ');
     797% Tabchar=[Tabchar ;{'......'}];
     798% set(handles.ListCoord,'String',Tabchar)
     799%
     800% %update the plot
     801% ListCoord_Callback(hObject, eventdata, handles)
     802% PLOT_Callback(hObject, eventdata, handles)
    811803
    812804%------------------------------------------------------------------------
     
    829821end
    830822   
    831 function NEW_Callback(hObject, eventdata, handles)
    832 %A METTRE SOUS UN BOUTON
    833 huvmat=findobj(allchild(0),'Name','uvmat');
    834 hchild=get(huvmat,'children');
    835 hcoord=findobj(hchild,'Tag','menu_coord');
    836 coordtype=get(hcoord,'Value');
    837 haxes=findobj(hchild,'Tag','axes3');
    838 AxeData=get(haxes,'UserData');
    839 if ~isequal(hcoord,2)
    840     set(hcoord,'Value',2)
    841     huvmat=uvmat(AxeData);
    842     'relancer uvmat';
    843 end
    844 if ~isfield(AxeData,'ZoomAxes')
    845     msgbox_uvmat('ERROR','first draw a window around a grid marker')
    846     return
    847 end
    848 XLim=get(AxeData.ZoomAxes,'XLim');
    849 YLim=get(AxeData.ZoomAxes,'YLim');
    850 np=size(AxeData.A);
    851 ind_sub_x=round(XLim);
    852 ind_sub_y=np(1)-round(YLim);
    853 Mfiltre=AxeData.A(ind_sub_y(2):ind_sub_y(1) ,ind_sub_x,:);
    854 Mfiltre_norm=double(Mfiltre);
    855 Mfiltre_norm=Mfiltre_norm/sum(sum(Mfiltre_norm));
    856 Mfiltre_norm=100*(Mfiltre_norm-mean(mean(Mfiltre_norm)));
    857 Atype=class(AxeData.A);
    858 Data.NbDim=2;
    859 Data.A=filter2(Mfiltre_norm,double(AxeData.A));
    860 Data.A=feval(Atype,Data.A);
    861 Data.AName='image';
    862 Data.AX=AxeData.AX;
    863 Data.AY=AxeData.AY;
    864 Data.CoordType='px';
    865 plot_field(Data)
     823% function NEW_Callback(hObject, eventdata, handles)
     824% %A METTRE SOUS UN BOUTON
     825% huvmat=findobj(allchild(0),'Name','uvmat');
     826% hchild=get(huvmat,'children');
     827% hcoord=findobj(hchild,'Tag','menu_coord');
     828% coordtype=get(hcoord,'Value');
     829% haxes=findobj(hchild,'Tag','axes3');
     830% AxeData=get(haxes,'UserData');
     831% if ~isequal(hcoord,2)
     832%     set(hcoord,'Value',2)
     833%     huvmat=uvmat(AxeData);
     834%     'relancer uvmat';
     835% end
     836% if ~isfield(AxeData,'ZoomAxes')
     837%     msgbox_uvmat('ERROR','first draw a window around a grid marker')
     838%     return
     839% end
     840% XLim=get(AxeData.ZoomAxes,'XLim');
     841% YLim=get(AxeData.ZoomAxes,'YLim');
     842% np=size(AxeData.A);
     843% ind_sub_x=round(XLim);
     844% ind_sub_y=np(1)-round(YLim);
     845% Mfiltre=AxeData.A(ind_sub_y(2):ind_sub_y(1) ,ind_sub_x,:);
     846% Mfiltre_norm=double(Mfiltre);
     847% Mfiltre_norm=Mfiltre_norm/sum(sum(Mfiltre_norm));
     848% Mfiltre_norm=100*(Mfiltre_norm-mean(mean(Mfiltre_norm)));
     849% Atype=class(AxeData.A);
     850% Data.NbDim=2;
     851% Data.A=filter2(Mfiltre_norm,double(AxeData.A));
     852% Data.A=feval(Atype,Data.A);
     853% Data.AName='image';
     854% Data.AX=AxeData.AX;
     855% Data.AY=AxeData.AY;
     856% Data.CoordType='px';
     857% plot_field(Data)
    866858
    867859
     
    894886Coord=[x y zeros(4,1) Xima Yima zeros(4,1)];
    895887set(handles.ListCoord,'Data',Coord)
    896 % Tabchar=cell2tab(Coord,' | ');
    897 % Tabchar=[Tabchar ;{'......'}];
    898 % set(handles.ListCoord,'String',Tabchar)
    899 % Coord={num2str(x(1)) num2str(y(1)) '0' num2str(Xima(1)) num2str(Yima(1));...
    900 %     num2str(x(2)) num2str(y(2)) '0' num2str(Xima(2)) num2str(Yima(2));...
    901 %     num2str(x(3)) num2str(y(3)) '0' num2str(Xima(3)) num2str(Yima(3));...
    902 %     num2str(x(4)) num2str(y(4)) '0' num2str(Xima(4)) num2str(Yima(4))};
    903 % Tabchar=cell2tab(Coord,' | ');
    904 % Tabchar=[Tabchar ;{'......'}];
    905 % set(handles.ListCoord,'String',Tabchar)
    906888
    907889%------------------------------------------------------------------------
    908890function MenuCreateGrid_Callback(hObject, eventdata, handles)
    909891%------------------------------------------------------------------------
    910 %hcalib=get(handles.calib_type,'parent');%handles of the GUI geometry_calib
    911892CalibData=get(handles.geometry_calib,'UserData');
    912893Tinput=[];%default
     
    920901Coord=get(handles.ListCoord,'Data');
    921902Coord(1:size(T,1),1:3)=T;%update the existing list of phys coordinates from the GUI create_grid
    922 
    923 % for i=1:size(data.Coord,1)
    924 %     for j=1:5
    925 %           Coord{i,j}=num2str(data.Coord(i,j),4);%display coordiantes with 4 digits
    926 %     end
    927 % end
    928903set(handles.ListCoord,'Data',Coord)
    929904
     
    10591034Coord=[T Xpx Ypx zeros(size(T,1),1)];
    10601035set(handles.ListCoord,'Data',Coord)
    1061 % Tabchar=cell2tab(Coord(end:-1:1,:),' | ');
    1062 % Tabchar=[Tabchar ;{'......'}];
    1063 % set(handles.ListCoord,'Value',1)
    1064 % set(handles.ListCoord,'String',Tabchar)
    10651036PLOT_Callback(hObject, eventdata, handles)
    10661037
     
    10781049set(handles.geometry_calib,'UserData',CalibData)
    10791050%translation
    1080 Coord_cell=get(handles.ListCoord,'String');
    1081 data=read_geometry_calib(Coord_cell);
    1082 data.Coord(:,1)=T(1)+data.Coord(:,1);
    1083 data.Coord(:,2)=T(2)+data.Coord(:,2);
    1084 data.Coord(:,3)=T(3)+data.Coord(:,3);
    1085 data.Coord(:,[4 5])=data.Coord(:,[4 5]);
    1086 for i=1:size(data.Coord,1)
    1087     for j=1:5
    1088           Coord{i,j}=num2str(data.Coord(i,j),4);%phys x,y,z
    1089    end
    1090 end
    1091 Tabchar=cell2tab(Coord,' | ');
    1092 Tabchar=[Tabchar; {'.....'}];
    1093 %set(handles.ListCoord,'Value',1)
    1094 set(handles.ListCoord,'String',Tabchar)
    1095 
     1051Coord=get(handles.ListCoord,'Data');
     1052Coord(:,1)=T(1)+Coord(:,1);
     1053Coord(:,2)=T(2)+Coord(:,2);
     1054Coord(:,3)=T(3)+Coord(:,3);
     1055set(handles.ListCoord,'Data',Coord);
    10961056
    10971057% --------------------------------------------------------------------
     
    11171077    O_y=T(3);%default
    11181078end
    1119 Coord_cell=get(handles.ListCoord,'String');
    1120 data=read_geometry_calib(Coord_cell);
     1079Coord=get(handles.ListCoord,'Data');
    11211080r1=cos(pi*Phi/180);
    11221081r2=-sin(pi*Phi/180);
    11231082r3=sin(pi*Phi/180);
    11241083r4=cos(pi*Phi/180);
    1125 x=data.Coord(:,1)-O_x;
    1126 y=data.Coord(:,2)-O_y;
    1127 data.Coord(:,1)=r1*x+r2*y;
    1128 data.Coord(:,2)=r3*x+r4*y;
    1129 % data.Coord(:,[4 5])=data.Coord(:,[4 5]);
    1130 for i=1:size(data.Coord,1)
    1131     for j=1:5
    1132           Coord{i,j}=num2str(data.Coord(i,j),4);%phys x,y,z
    1133    end
    1134 end
    1135 Tabchar=cell2tab(Coord,' | ');
    1136 Tabchar=[Tabchar;{'......'}];
    1137 set(handles.ListCoord,'Value',1)
    1138 set(handles.ListCoord,'String',Tabchar)
     1084x=Coord(:,1)-O_x;
     1085y=Coord(:,2)-O_y;
     1086Coord(:,1)=r1*x+r2*y;
     1087Coord(:,2)=r3*x+r4*y;
     1088set(handles.ListCoord,'Data',Coord)
    11391089
    11401090% --------------------------------------------------------------------
     
    11461096[s,errormsg]=imadoc2struct(fileinput,'GeometryCalib');
    11471097GeometryCalib=s.GeometryCalib;
    1148 %GeometryCalib=load_calib(hObject, eventdata, handles)
    1149 % calib=reshape(GeometryCalib.SourceCalib.PointCoord,[],1);
    1150 % for ilist=1:numel(calib)
    1151 %     CoordCell{ilist}=num2str(calib(ilist));
    1152 % end
    1153 % CoordCell=reshape(CoordCell,[],5);
    1154 % Tabchar=cell2tab(CoordCell,' | ');%transform cells into table ready for display
    1155 % Tabchar=[Tabchar;{'......'}];
    1156 % set(handles.ListCoord,'Value',1)
    1157 % set(handles.ListCoord,'String',Tabchar)
    11581098Coord=GeometryCalib.SourceCalib.PointCoord;
    1159 Coord=[Coord zeros(size(Coord,1),1)]
     1099Coord=[Coord zeros(size(Coord,1),1)];
    11601100set(handles.ListCoord,'Data',Coord)
    11611101PLOT_Callback(handles.geometry_calib, [], handles)
     
    11851125% -----------------------------------------------------------------------
    11861126inputfile=browse_xml(hObject, eventdata, handles);
    1187 listfile=get(handles.ListCoordFiles,'string');
     1127listfile=get(handles.ListCoordFiles,'String');
    11881128if isequal(listfile,{''})
    11891129    listfile={inputfile};
     
    12921232end
    12931233set(handles.calib_type,'Value',val_cal)
    1294 % Tabchar=[Tabchar;{'......'}];
    1295 % set(handles.ListCoord,'Value',1)
    12961234
    12971235if isempty(CoordCell)% allow mouse action by default in the absence of input points
     
    13411279%------------------------------------------------------------------------
    13421280function PLOT_Callback(hObject, eventdata, handles)
    1343 global Coord
    13441281huvmat=findobj(allchild(0),'Name','uvmat');%find the current uvmat interface handle
    13451282hhuvmat=guidata(huvmat); %handles of GUI elements in uvmat
     
    13521289    option='px'; %default
    13531290end
    1354 %ObjectData=read_geometry_calib(Coord_cell);
    1355 %ObjectData=read_geometry_calib(handles);%read the interface input parameters defining the object
    13561291Coord=get(handles.ListCoord,'Data');
    1357 % Coord(:,6)=[];
    13581292if ~isempty(Coord)
    13591293    if isequal(option,'phys')
     
    13841318%------------------------------------------------------------------------
    13851319function Copy_Callback(hObject, eventdata, handles)
    1386 
     1320global Coord
    13871321evalin('base','global Coord')%make CurData global in the workspace
     1322Coord=get(handles.ListCoord,'Data');
    13881323display('coordinates of calibration points (phys,px,marker) :')
    13891324evalin('base','Coord') %display CurData in the workspace
     
    13981333Data(:,6)=zeros(size(Data,1),1);
    13991334Data(iline,6)=1;% mark the selected line
    1400 % if size(Data,1)<iline+numel(Input)
    1401 %     Data=[Data ; zeros(iline+numel(Input)-size(Data,1),6)];% append zeros to fit the new column
    1402 % end
    1403 % Data(iline:iline+numel(Input)-1,eventdata.Indices(2))=Input';
    14041335set(handles.ListCoord,'Data',Data)
    14051336update_calib_marker(Data(iline,:))
    1406 end
    1407 
    1408 % if length(eventdata.Modifier) == 1 && strcmp(eventdata.Modifier{:},'control') && ...
    1409 % eventdata.Key == 'v'
    1410 %     import = importdata('-pastespecial');
    1411 %    %data treatment and checking
    1412 %     set(handles.uitable1,'Data',import);
    1413 % end
     1337end
    14141338
    14151339% --- Executes when entered data in editable cell(s) in ListCoord.
     
    14671391    set(hhh,'Position',[XCoord-ind_range/2 YCoord-ind_range/2 ind_range ind_range])
    14681392end
    1469 
    1470 
    1471 
    1472 
  • trunk/src/uvmat.m

    r669 r671  
    227227
    228228%% load the list of previously browsed files in menus Open, Open_1 and TransformName
    229  dir_perso=prefdir; % path to the directory .matlab containing the personal data of the current user
    230  profil_perso=fullfile(dir_perso,'uvmat_perso.mat');% personal data file uvmat_perso.mat' in .matlab
    231  if exist(profil_perso,'file')% if the file exists
    232      h=load (profil_perso); % open the personal file
    233      if isfield(h,'MenuFile')% load the saved menu of previously opened files
    234          for ifile=1:min(length(h.MenuFile),5)
    235              set(handles.(['MenuFile_' num2str(ifile)]),'Label',h.MenuFile{ifile});
    236          end
    237      end
    238      if isfield(h,'MenuCampaign')% load the saved menu of previously opened campaigns
    239          for ifile=1:min(length(h.MenuCampaign),5)
    240              set(handles.(['MenuCampaign_' num2str(ifile)]),'Label',h.MenuCampaign{ifile});
    241          end
    242      end
    243      if isfield(h,'RootPath')
    244          set(handles.RootPath,'UserData',h.RootPath); %store the previous campaign in the UserData of RootPath
    245      end
    246      if isfield(h,'transform_fct') && iscell(h.transform_fct) % load the menu of transform fct set by user
    247          for ilist=1:length(h.transform_fct);
    248              if exist(h.transform_fct{ilist},'file')
    249                  [path,file]=fileparts(h.transform_fct{ilist});
    250                  transform_menu=[transform_menu; {file}];
    251                  path_list=[path_list; {path}];
    252              end
    253          end
    254      end
    255  end
     229dir_perso=prefdir; % path to the directory .matlab containing the personal data of the current user
     230profil_perso=fullfile(dir_perso,'uvmat_perso.mat');% personal data file uvmat_perso.mat' in .matlab
     231if exist(profil_perso,'file')% if the file exists
     232    h=load (profil_perso); % open the personal file
     233    if isfield(h,'MenuFile')% load the saved menu of previously opened files
     234        for ifile=1:min(length(h.MenuFile),5)
     235            set(handles.(['MenuFile_' num2str(ifile)]),'Label',h.MenuFile{ifile});
     236        end
     237    end
     238    if isfield(h,'MenuCampaign')% load the saved menu of previously opened campaigns
     239        for ifile=1:min(length(h.MenuCampaign),5)
     240            set(handles.(['MenuCampaign_' num2str(ifile)]),'Label',h.MenuCampaign{ifile});
     241        end
     242    end
     243    if isfield(h,'RootPath')
     244        set(handles.RootPath,'UserData',h.RootPath); %store the previous campaign in the UserData of RootPath
     245    end
     246    if isfield(h,'transform_fct') && iscell(h.transform_fct) % load the menu of transform fct set by user
     247        for ilist=1:length(h.transform_fct);
     248            if exist(h.transform_fct{ilist},'file')
     249                [path,file]=fileparts(h.transform_fct{ilist});
     250                transform_menu=[transform_menu; {file}];
     251                path_list=[path_list; {path}];
     252            end
     253        end
     254    end
     255end
    256256transform_menu=[transform_menu;{'more...'}];%append the option more.. to the menu
    257257set(handles.TransformName,'String',transform_menu)% display the menu of transform fcts
     
    35353535%------------------------------------------------------------------------
    35363536UvData=get(handles.uvmat,'UserData');
    3537 menu=get(handles.TransformName,'String');refresh
     3537menu=get(handles.TransformName,'String');%refresh
    35383538ichoice=get(handles.TransformName,'Value');%item number in the menu
    35393539transform_name=menu{ichoice};% choice of the transform fct
     
    35463546end
    35473547if strcmp(transform_name,'more...');
    3548     transform_fct=uigetfile_uvmat('Pick the transform function',prev_path,'.m');
    3549     %     [FileName, PathName] = uigetfile( ...
    3550     %         {'*.m', ' (*.m)';
    3551     %         '*.m',  '.m files '; ...
    3552     %         '*.*', 'All Files (*.*)'}, ...
    3553     %         'Pick the transform function', prev_path);
    3554     %     if ~ischar(FileName),return,end %abandon if the browser is cancelled
    3555     %     path_transform_fct =fullfile(PathName,FileName);
    3556     if ~isempty(transform_fct)
    3557         [PathName,transform_name]=fileparts(transform_fct);
    3558         %     if isempty(regexp(FileName,'\.m$'))% detect file extension .m
    3559         %         msgbox_uvmat('ERROR','a Matlab function .m must be introduced');
    3560         %         return
    3561         %     else
    3562         %         transform_name=regexprep(FileName,'\.m','');
    3563         %     end
     3548    transform_fct_chosen=uigetfile_uvmat('Pick the transform function',prev_path,'.m');
     3549    if ~isempty(transform_fct_chosen)
     3550        [PathName,transform_name]=fileparts(transform_fct_chosen);
    35643551        ichoice=find(strcmp(transform_name,menu),1);%look for the selected fct in the existing menu
    35653552        if isempty(ichoice)% if the item is not found, add it to the menu (before 'more...' and select it)
     
    35873574
    35883575%% create the function handle of the selected fct
    3589 
    35903576if isempty(list_path{ichoice})% case of no selected fct
    35913577    transform_handle=[];
Note: See TracChangeset for help on using the changeset viewer.