The grid vectors do not define a grid of points that match the given values.

1 次查看(过去 30 天)
vox_a = [1, 1, 1]; % define size of voxel in original image stack
vox_b = [400, 400, 400];% define size of voxel in target image stack
szD_b = ceil((size(Img)-1).*vox_a./vox_b)+1; % set size of target image stack
szD_a=size(Img);
% define coordinates of voxels in original image stack
[Xa,Ya,Za]=meshgrid(...
[0:szD_a(1)-1]*vox_a(1),...
[0:szD_a(2)-1].*vox_a(2),...
[0:szD_a(3)-1].*vox_a(3));
% define coordinates of voxels in original image stack
[Xb,Yb,Zb]=meshgrid(...
[0:szD_b(1)-1]*vox_b(1),...
[0:szD_b(2)-1].*vox_b(2),...
[0:szD_b(3)-1].*vox_b(3));
D_target = interp3(Xa,Ya,Za,Img,Xb,Yb,Zb);
I get the error at Line D_target = interp3(Xa,Ya,Za,Img,Xb,Yb,Zb);
ANY HELP?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Interpolation 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by