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

📄 guiparfssfig2.m

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

% GUIPARFSSFIG2.m -- Figure 3 of the paper "Fast Slant Stack"
% Usage: GUIPARFSSFIG2 will start a new figure window and plot Figure 3 of Slant Stack Paper.
%        GUIPARFSSFIG2(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 Figure2 : The Backprojection of a Point', 'NumberTitle', 'off');
    set(fig,'doublebuffer','on','userdata',1);
    txt = strvcat('The Backprojection of a Point is a Line.', ...
        ' ', ...
        ' ', ...
        'Plese choose the parameters :',...
        '(x, y) : the coordinates of the point.', ...
        'For example, x = 44, y = 1.');

    uicontrol( ...
        'tag', 'Instruction_text', ...
        'style', 'text', ...
        'units', 'normal', ...
        'position', [.2 .1 .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:63]')}, ...
         'backgroundcolor',[0.8 0.8 0.8], ...
         'fontsize',fs, ...
         'callback', 'guiparFSSFig2(''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:63]')}, ...
         'backgroundcolor',[0.8 0.8 0.8], ...
         'fontsize',fs, ...
         'callback', 'guiparFSSFig2(''yRange_Callback'')');
     uicontrol( ...
         'tag', 'draw_pushbutton', ...
         'style','pushbutton', ...
         'units','normal', ...
         'position', [.85 .18 .12 .07], ...
         'string','Draw', ...
         'fontsize',fs, ...
         'callback','guiparFSSFig2(''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;
FSSFig2(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 FSSFig2(x, y)

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

	S = zeros(64);
	S(x, y) = 1;
	XX = Adj_FastSlantStack(S);
	S(x-2:x+2, y-2:y+2)=ones(5);
	subplot(121)
	imagesc(S)
	axis('image')
	colormap(1-gray)
    title('Radon domain objects.');
	subplot(122)
	imagesc(abs(real(XX)))
	axis('image')
    title('Corresponding Backprojection.');

%------------------
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 + -