function R=DrawTr(Tr,cutoff);
scale=1;
nx=1:size(Tr,1); % x方向のvoxel数
ny=1:size(Tr,2); % y方向のvoxel数
nz=1:size(Tr,3); % z方向のvoxel数
[nx,ny,nz]=ndgrid(nx,ny,nz);
nx=nx*cutoff;
ny=ny*cutoff;
nz=nz*cutoff;
vx=squeeze(Tr(:,:,:,1)); % 各voxelのx方向の移動量
vy=squeeze(Tr(:,:,:,2)); % 各voxelのy方向の移動量
vz=squeeze(Tr(:,:,:,3)); % 各voxelのz方向の移動量
for x=1:size(Tr,1);for y=1:size(Tr,2);...
vx(x,y,:)=idct(squeeze(vx(x,y,:)));...
vy(x,y,:)=idct(squeeze(vy(x,y,:)));...
vz(x,y,:)=idct(squeeze(vz(x,y,:)));...
end;end;
for y=1:size(Tr,2);for z=1:size(Tr,3);...
vx(:,y,z)=idct(squeeze(vx(:,y,z)));...
vy(:,y,z)=idct(squeeze(vy(:,y,z)));...
vz(:,y,z)=idct(squeeze(vz(:,y,z)));...
end;end;
for x=1:size(Tr,1);for z=1:size(Tr,3);...
vx(x,:,z)=idct(squeeze(vx(x,:,z)));...
vy(x,:,z)=idct(squeeze(vy(x,:,z)));...
vz(x,:,z)=idct(squeeze(vz(x,:,z)));...
end;end;
R.vx=vx;
R.vy=vy;
R.vz=vz;
figure;set(gcf,'color',[1,1,1],'position',[100,100,600,250]);
width=0.28;width2=[0.05,width,0.9];
subplot('position',[0.05,width2]);
DrawQuiver(nx,ny,nz,vx,vy,vz,scale);view([0,0]);
subplot('position',[0.10+width,width2]);
DrawQuiver(nx,ny,nz,vx,vy,vz,scale);view([0,90]);
subplot('position',[0.15+width*2,width2]);
DrawQuiver(nx,ny,nz,vx,vy,vz,scale);view([90,0]);

function DrawQuiver(nx,ny,nz,vx,vy,vz,scale);
h=quiver3(nx,ny,nz,vx,vy,vz,scale);
set(findobj(h,'type','line'),'LineWidth',2);
hold on;
plot3(nx(:),ny(:),nz(:),'b.');
daspect([1,1,1]);
axis tight;