summaryrefslogtreecommitdiffstats
path: root/matlab/tools/imresize3D.m
blob: 26f56de714b42d8073d2d0b3be29ab389dcd3eed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
function out = imresize3D(in, s_out, method)

%------------------------------------------------------------------------
% out = imresize3D(in, s_out, method)
% 
% Resizes a 3-component image
%
% in: input image.
% s_out: 2 element array with the wanted image size, [rows columns].
% out: the resized 3-component image.
%------------------------------------------------------------------------
%------------------------------------------------------------------------
% This file is part of the ASTRA Toolbox
% 
% Copyright: 2010-2021, imec Vision Lab, University of Antwerp
%            2014-2021, CWI, Amsterdam
% License: Open Source under GPLv3
% Contact: astra@astra-toolbox.com
% Website: http://www.astra-toolbox.com/
%------------------------------------------------------------------------

out = zeros(s_out);
for i = 1:size(in,3)
	out(:,:,i) = imresize(in(:,:,i), s_out(1:2), method);
end