How to create isotropic voxels in an image stack without loosing original dimensions?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi everyone, I was wondering how to change the voxels of an image stack into isotropic voxels (50x50x50) without loosing the dimensions of an image: x = 13 mm, y = 10 mm z = 6.05 mm).
The problem is that I have to adjust the z axis of the stack to get 6.05 mm.
The matrix of the image stack is 1186x1834x121 double.
I was looking over the functions interp3, meshgrid formation and so on, but I could not find the right example, so that I understand which codes to use in which way... Thank you very much for your help!!!
12 Kommentare
Sayyed Ahmad
am 18 Jun. 2018
in matlab you have to diffrent kind of visualisation. 1. one is to visualiasing some vectorial behaviour of the nature for example wind. You kann find in m atlab a very googd example to do that aim.
load wind
xmin = min(x(:));
xmax = max(x(:));
ymax = max(y(:));
zmin = min(z(:));
wind_speed = sqrt(u.^2 + v.^2 + w.^2);
hsurfaces = slice(x,y,z,wind_speed,[xmin,100,xmax],ymax,zmin);
set(hsurfaces,'FaceColor','interp','EdgeColor','none')
colormap jet
hcont = ...
contourslice(x,y,z,wind_speed,[xmin,100,xmax],ymax,zmin);
set(hcont,'EdgeColor',[0.7 0.7 0.7],'LineWidth',0.5)
[sx,sy,sz] = meshgrid(80,20:10:50,0:5:15);
hlines = streamline(x,y,z,u,v,w,sx,sy,sz);
set(hlines,'LineWidth',2,'Color','r')
view(3)
daspect([2,2,1])
axis equal
The other one is the Image manipulation. for example put the Image in the space.
[xSphere,ySphere,zSphere] = sphere(16); %# Points on a sphere
scatter3(xSphere(:),ySphere(:),zSphere(:),'.'); %# Plot the points
axis equal; %# Make the axes scales match
hold on; %# Add to the plot
xlabel('x');
ylabel('y');
zlabel('z');
img = imread('peppers.png'); %# Load a sample image
xImage = [-0.5 0.5; -0.5 0.5]; %# The x data for the image corners
yImage = [0 0; 0 0]; %# The y data for the image corners
zImage = [0.5 0.5; -0.5 -0.5]; %# The z data for the image corners
surf(xImage,yImage,zImage,... %# Plot the surface
'CData',img,...
'FaceColor','texturemap');
Antworten (1)
Siehe auch
Kategorien
Mehr zu Lighting, Transparency, and Shading finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!