prompt={'lpf_width'};
title='Input lpf_width';
lines=[1]';
def={'64'};
answer=inputdlg(prompt,title,lines,def);
lpf_width=str2num(answer{1});
size_row_line=size(im_ph);
im_size1=size_row_line(1);
im_size2=size_row_line(2);
n1 = fix(im_size1/2 - lpf_width/2);
n2 = fix(im_size1/2 + lpf_width/2);
hanning_vector = zeros(1, im_size1);
for k = n1: n2-1
    hanning_vector(k) = 0.5*(1.+cos(2.*pi*(k-im_size1/2.)/lpf_width));
end
hanning_LPF = hanning_vector'*hanning_vector;

%利用幅度像和相位像构造k空间
%-----------------------complex,filter and angle ---------------------
im_ph = int16(im_ph);    % 文件类型转换
im_ph = (single(im_ph-3142.))/1000;   % 将相位像强度转换为弧度
im_complex = complex(single(im_mag).*cos(im_ph),single(im_mag).*sin(im_ph));  % 构造复数数据
im_kspace = fftshift(fft2(im_complex));  % 利用付利叶变换得到k空间

im_kspace_lp = im_kspace.*hanning_LPF;  % k空间数据滤波
im_complex_lp = ifft2(ifftshift(im_kspace_lp));  % 得到滤波后的复数域图像数据
im_complex_lp = round(im_complex_lp*1000.)/1000.;  
im_ph_buff = im_complex_lp.*conj(im_complex); % 原始数据与滤波后的数据相除进行场非均匀性伪影抑制
im_ph_hp = angle(im_ph_buff); %得到相位角
axes(handles.axes3);imshow(im_ph_hp,[]);  %图象显示



谁能帮忙把里面的Hanning滤波换成指数滤波 理想低通滤波跟Butterworth滤波