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

1 回表示 (過去 30 日間)
Stelios Fanourakis
Stelios Fanourakis 2018 年 5 月 11 日
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 Center および File ExchangeInterpolation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by