Changeset 740 for trunk/src


Ignore:
Timestamp:
Apr 14, 2014, 10:24:15 PM (11 years ago)
Author:
sommeria
Message:

bug corrected in uvmat/ menu set_slices

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/uvmat.m

    r738 r740  
    50095009    end
    50105010end     
     5011
     5012
     5013% hfig=findobj(allchild(0),'tag','set_slices');
     5014% if isempty(hfig)
     5015%     set(0,'Unit','points')
     5016%     ScreenSize=get(0,'ScreenSize');% get the size of the screen, to put the fig on the upper right
     5017%     Width=350;% fig width in points (1/72 inch)
     5018%     Height=min(0.8*ScreenSize(4),500);
     5019%     Left=ScreenSize(3)- Width-40; %right edge close to the right, with margin=40
     5020%     Bottom=ScreenSize(4)-Height-40; %put fig at top right
     5021%     hfig=figure('name','set_slices','tag','set_slices','MenuBar','none','NumberTitle','off','Unit','points','Position',[Left,Bottom,Width,Height]);
     5022%     BackgroundColor=get(hfig,'Color');
     5023%     path_title=uicontrol('Style','text','Units','normalized', 'Position', [0.02 0.97 0.9 0.03],'BackgroundColor',BackgroundColor,'Tag','Path_title',...
     5024%         'String','path:','FontUnits','points','FontSize',12,'FontWeight','bold','ForegroundColor','blue','HorizontalAlignment','left');
     5025%     htitlebox=uicontrol('Style','edit','Units','normalized', 'Position', [0.02 0.89 0.96 0.08],'tag','titlebox','Max',2,'BackgroundColor',[1 1 1],'Callback',@titlebox_Callback,...
     5026%         'String',InputDir,'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''titlebox'':current path');
     5027%     uicontrol('Style','pushbutton','Tag','backward','Units','normalized','Position',[0.02 0.77 0.1 0.05],...
     5028%         'String','<--','FontWeight','bold','FontUnits','points','FontSize',12,'Callback',@backward,'TooltipString','move backward');
     5029%     home_button=uicontrol('Style','pushbutton','Units','normalized', 'Position', [0.14 0.77 0.2 0.05],...
     5030%         'String','Work dir','FontWeight','bold','FontUnits','points','FontSize',12,'Callback',@home_dir,'TooltipString','reach the current Matlab working directory');
     5031%     uicontrol('Style','pushbutton','Tag','refresh','Units','normalized','Position', [0.36 0.77 0.2 0.05],'Callback',@refresh_GUI,...
     5032%         'String','Refresh','FontWeight','bold','FontUnits','points','FontSize',12);
     5033%     uicontrol('Style','popupmenu','Units','normalized', 'Position', [0.75 0.74 0.23 0.05],'tag','sort_option','Callback',@refresh_GUI,'Visible','off',...
     5034%         'String',{'sort name';'sort date'},'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''sort_option'': sort the files by names or dates');
     5035%     uicontrol('Style','listbox','Units','normalized', 'Position',[0.02 0.08 0.96 0.66], 'Callback', @(src,event)list_Callback(option,FilterExt,src,event),'tag','list',...
     5036%         'FontUnits','points','FontSize',12,'TooltipString','''list'':current list of directories, marked by +/, and files');
     5037%     
     5038%     OK_button=uicontrol('Style','pushbutton','Units','normalized', 'Position', [0.58 0.005 0.2 0.07],'BackgroundColor',[0 1 0],...
     5039%         'String','OK','FontWeight','bold','FontUnits','points','FontSize',12,'Callback',@(src,event)OK_Callback(option,FilterExt,src,event));
     5040%     close_button=uicontrol('Style','pushbutton','Units','normalized', 'Position', [0.78 0.005 0.2 0.07],'Callback',@(src,event)close(option,src,event),...
     5041%         'FontWeight','bold','FontUnits','points','FontSize',12);
     5042%     %set(hrefresh,'UserData',StatusData)
     5043%     if strcmp(option,'status_display') %put a run advancement display
     5044%         set(hfig,'DeleteFcn',@(src,event)close(option,src,event))
     5045%         uicontrol('Style','frame','Units','normalized', 'Position', [0.02 0.85 0.9 0.04]);
     5046%         uicontrol('Style','frame','Units','normalized', 'Position',[0.02 0.85 0.01 0.04],'BackgroundColor',[1 0 0],'tag','waitbar');
     5047%         %             uicontrol('Style','text','Units','normalized', 'Position', [0.4 0.8 0.35 0.03],'BackgroundColor',BackgroundColor,...
     5048%         %             'String','sort: ','FontUnits','points','FontSize',12,'FontWeight','bold','HorizontalAlignment','right');
     5049%         delete(home_button)
     5050%         set(OK_button,'String','Open')
     5051%         set(close_button,'String','Close')
     5052%     elseif strcmp(FilterExt,'uigetdir') %pick a  directory
     5053%         set(path_title,'String',title); %show the input title for path (directory)
     5054%         set(OK_button,'String','Select')
     5055%         set(close_button,'String','Cancel')
     5056%     else  %put a title and additional pushbuttons
     5057%         uicontrol('Style','text','Units','normalized', 'Position', [0.02 0.74 0.6 0.03],'BackgroundColor',BackgroundColor,...
     5058%             'String',title,'FontUnits','points','FontSize',12,'FontWeight','bold','ForegroundColor','blue','HorizontalAlignment','left');
     5059%         uicontrol('Style','togglebutton','Units','normalized', 'Position', [0.75 0.78 0.23 0.04],'tag','check_date','Callback',@dates_Callback,...
     5060%             'String','show dates','FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''check_date'':press button to display dates');
     5061% %         uicontrol('Style','text','Units','normalized', 'Position', [0.37 0.8 0.35 0.03],'BackgroundColor',BackgroundColor,...
     5062% %             'String','sort: ','FontUnits','points','FontSize',12,'FontWeight','bold','HorizontalAlignment','right');
     5063%          set(OK_button,'String','Open')
     5064%          set(close_button,'String','Cancel')   
     5065%     end
     5066%     drawnow
     5067% end
     5068% refresh_GUI(findobj(hfig,'Tag','refresh'),InputFileName,FilterExt)% refresh the list of content of the current dir
     5069% if ~strcmp(option,'status_display')
     5070%     uiwait(hfig)
     5071%     if ishandle(hfig)
     5072%         htitlebox=findobj(hfig,'Tag','titlebox');
     5073%         fileinput=get(htitlebox,'String');% retrieve the input file selection
     5074%         delete(hfig)
     5075%     end
     5076% end
     5077
     5078
    50115079input_key={'Z (first position)','Z (last position)','Z (water surface)', 'refractive index','NbSlice','volume scan (y/n)','tilt angle y axis','tilt angle x axis'};
    50125080input_val=[{num2str(ZEnd)} {num2str(ZStart)} {num2str(ZStart)} {'1.333'} num2str(NbSlice_j) {volume_scan} {'0'} {'0'}];
     
    50205088end
    50215089GeometryCalib.SliceCoord=Z_plane'*[0 0 1];
     5090if str2double(answer{7})==0 && str2double(answer{8})==0
     5091    GeometryCalib.SliceAngle=[0 0 0];
     5092else
     5093GeometryCalib.SliceAngle=zeros(GeometryCalib.NbSlice,3);
     5094GeometryCalib.SliceAngle(:,1)=str2double(answer{8})*ones(GeometryCalib.NbSlice,1);%rotation around x axis (to generalise)
     5095GeometryCalib.SliceAngle(:,2)=str2double(answer{7})*ones(GeometryCalib.NbSlice,1);%rotation around y axis (to generalise)
    50225096GeometryCalib.SliceAngle(:,3)=0;
    5023 GeometryCalib.SliceAngle(:,2)=str2double(answer{7})*ones(GeometryCalib.NbSlice,1);%rotation around y axis (to generalise)
    5024 GeometryCalib.SliceAngle(:,1)=str2double(answer{8})*ones(GeometryCalib.NbSlice,1);%rotation around x axis (to generalise)
     5097end
    50255098GeometryCalib.InterfaceCoord=[0 0 str2double(answer{3})];
    50265099GeometryCalib.RefractionIndex=str2double(answer{4});
Note: See TracChangeset for help on using the changeset viewer.