⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 guiparfssfig1.m

📁 beamlet变化的工具箱
💻 M
字号:
function guiparFSSFig1(varargin)

% GUIPARFSSFIG1.m -- Figure 3 of the paper "Fast Slant Stack"
% Usage: GUIPARFSSFIG1 will start a new figure window and plot Figure 3 of Slant Stack Paper.
%        GUIPARFSSFIG1(n) for any argument type n will plot the figure on the current figure 
%        window and plot Figure 3 of Slant Stack Paper.

if nargin == 0  

	fig = figure;

    fs = 8; %default font size
	clf reset;
	set(fig,'pos',[100 200 672 504],'Name', 'FSS Figure1 : The Slant Stack of a Point', 'NumberTitle', 'off');
    set(fig,'doublebuffer','on','userdata',1);
    txt = strvcat('The Slant Stack of a Point is a Broken Line.', ...
        ' ', ...
        ' ', ...
        'Plese choose the parameters :',...
        '(x, y) : the coordinates of the point.', ...
        'For example, x = 6, y = 9.');

    uicontrol( ...
        'tag', 'Instruction_text', ...
        'style', 'text', ...
        'units', 'normal', ...
        'position', [.2 .2 .4 .5], ...
        'string', txt, ...
        'backgroundcolor', [.8 .8 .8], ...
        'fontsize', fs);
   
    uicontrol( ...
         'tag','x_text', ...
         'style','text', ...
         'units','normal', ...
         'position', [.85 .82, .12 .06], ... 
         'string','x-value', ...
         'backgroundcolor', [0.8 0.8 0.8],...
         'fontsize',fs);
	uicontrol( ...
         'tag','xRange', ...
         'style','list', ...
         'units','normal', ...
         'position', [.85 .65 .12 .20], ...
         'string',{num2str([2:31]')}, ...
         'backgroundcolor',[0.8 0.8 0.8], ...
         'fontsize',fs, ...
         'callback', 'guiparFSSFig1(''xRange_Callback'')');
     
     uicontrol( ...
         'tag','y_text', ...
         'style','text', ...
         'units','normal', ...
         'position', [.85 .52, .12 .06], ... 
         'string','y-value', ...
         'backgroundcolor', [0.8 0.8 0.8],...
         'fontsize',fs);
   	 uicontrol( ...
         'tag','yRange', ...
         'style','list', ...
         'units','normal', ...
         'position', [.85 .35 .12 .20], ...
         'string',{num2str([2:31]')}, ...
         'backgroundcolor',[0.8 0.8 0.8], ...
         'fontsize',fs, ...
         'callback', 'guiparFSSFig1(''yRange_Callback'')');
     uicontrol( ...
         'tag', 'draw_pushbutton', ...
         'style','pushbutton', ...
         'units','normal', ...
         'position', [.85 .18 .12 .07], ...
         'string','Draw', ...
         'fontsize',fs, ...
         'callback','guiparFSSFig1(''draw_Callback'')');

     uicontrol( ...
         'tag', 'close_pushbutton', ...
         'style','pushbutton', ...
         'units','normal', ...
         'position', [.85 .08 .12 .07], ...
         'string','Close', ...
         'fontsize',fs, ...
         'callback','close all');

        
	if nargout > 0
		varargout{1} = fig;
	end

elseif ischar(varargin{1}) % INVOKE NAMED SUBFUNCTION OR CALLBACK
	try
		if (nargout)
			[varargout{1:nargout}] = feval(varargin{:}); % FEVAL switchyard
        else
			feval(varargin{:}); % FEVAL switchyard
        end
    catch
		disp(lasterr);
    end

end

% --------------------------------------------------------------------
function draw_Callback

x=xRange_Callback;
y=yRange_Callback;
FSSFig1(x, y);
smartset;

% --------------------------------------------------------------------
function x = xRange_Callback

handles = guihandles(gcf);
xInd = get(handles.xRange, 'Value');
xRan = get(handles.xRange, 'String');
x = str2double(xRan(xInd));

% --------------------------------------------------------------------
function y = yRange_Callback

handles = guihandles(gcf);
yInd = get(handles.yRange, 'Value');
yRan = get(handles.yRange, 'String');
y = str2double(yRan(yInd));


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function FSSFig1(x, y)

%------------------------------------------
% to supress the output text by ReadImage.m
global WLVERBOSE        %set by BeamPath.m
WLVERBOSE = 'No';
%------------------------------------------


	M = zeros(32);
	M(x, y) = 1;
	S = FastSlantStack(M);
	M(x-1:x+1, y-1:y+1) = ones(3,3);
	subplot(1,2,1)
    imagesc(M)
	axis('image')
	colormap(hot)
    title('Images with single nonzero entry.');
	subplot(1,2,2)
    imagesc(abs(real(S)))
	axis('image')
	colormap(1-gray)
    title('Corresponding Radon Transform');


%------------------
WLVERBOSE = 'Yes';
%------------------


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function smartset

chd = get(gcf, 'Children');
set(chd(length(chd)), 'Visible', 'off');
set(chd(1), 'Position', [.5 .1 .25 .8], 'FontSize', 7);
set(get(chd(1), 'Title'), 'FontSize', 7);
set(chd(2), 'Position', [.1 .1 .25 .8], 'FontSize', 7);
set(get(chd(2), 'Title'), 'FontSize', 7);

%% Part of BeamLab Version:200% Built:Friday,23-Aug-2002 00:00:00% This is Copyrighted Material% For Copying permissions see COPYING.m% Comments? e-mail beamlab@stat.stanford.edu%%% Part of BeamLab Version:200% Built:Saturday,14-Sep-2002 00:00:00% This is Copyrighted Material% For Copying permissions see COPYING.m% Comments? e-mail beamlab@stat.stanford.edu%

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -