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 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!