1. 程式人生 > >imresize matlab

imresize matlab

imresize3

Resize 3-D volumetric intensity image

collapse all in page

Syntax

B = imresize3(V,scale) B = imresize3(V,[numrows numcols numplanes]) B = imresize3(___,method) B = imresize3(___,Name,Value)

Description

example

B = imresize3(V,scale) returns the volume B that is scale times the size of V. The input volume V must be a 3-D volumetric intensity image (called a volume). By default, imresize3 uses cubic interpolation.

B = imresize3(V,[numrows numcols numplanes]) returns the volume B that has the number of rows, columns, and planes specified by the three-element vector [numrows numcols numplanes].

B = imresize3(___,method) returns the volume B

, where method specifies the interpolation method used.

B = imresize3(___,Name,Value) returns a resized volume where Name,Value pairs control aspects of the operation.

Examples

collapse all

Resize 3-D Volumetric Image

Try This Example

Read MRI volume into the workspace.

s = load('mri');
mriVolumeOriginal = squeeze(s.D);
sizeO = size(mriVolumeOriginal);

Visualize the volume.

figure;
slice(double(mriVolumeOriginal),sizeO(2)/2,sizeO(1)/2,sizeO(3)/2);
shading interp, colormap gray;
title('Original');

Resize the volume, reducing the size all all dimensions by one-half. This example uses the default interpolation method and antialiasing.

mriVolumeResized = imresize3(mriVolumeOriginal, 0.5);
sizeR = size(mriVolumeResized);

Visualize the resized volume.

figure;
slice(double(mriVolumeResized),sizeR(2)/2,sizeR(1)/2,sizeR(3)/2);
shading interp, colormap gray;
title('Resized');