www.gusucode.com > images 案例代码 matlab源码程序 > images/Filter3DMRIVolumeWithBoxFilterExample.m
%% Filter 3-D MRI Volume with Box Filter % %% % Load 3-D MRI data. % Copyright 2015 The MathWorks, Inc. volData = load('mri'); vol = squeeze(volData.D); %% % Pad the image volume by the radius of the filter neighborhood. filterSize = [5 5 3]; padSize = (filterSize-1)/2; volPad = padarray(vol, padSize, 'replicate', 'both'); %% % Calculate the 3-D integral image of the padded input. intVol = integralImage3(volPad); %% % Filter the 3-D integral image with a [5 5 3] filter. volFilt = integralBoxFilter3(intVol, filterSize);