plot voxelized geometry from middle coordinates

5 次查看(过去 30 天)
Hello, I would like to plot the voxelized geometry below. I have the middle coordinates of x,y,z and the corresponding dose. For middle coordinates I intend that if a voxel of the geometry is defined along the x axis from 0 to 10, its middle coordinate is 5. I am doing this but it doesn't work:
{XY=[mid_x mid_y];
Z=[mid_z dose];
surf(XY,Z);}
{
Voxelized geometry
mid_x mid_y mid_z dose
5 0,500000000000000 5 2,52298164367676
15 0,500000000000000 5 2,64519572257996
25 0,500000000000000 5 2,52241730690002
5 0,500000000000000 15 2,64528870582581
15 0,500000000000000 15 2,65645980834961
25 0,500000000000000 15 2,64508199691772
5 0,500000000000000 25 2,52284812927246
15 0,500000000000000 25 2,64546251296997
25 0,500000000000000 25 2,52243471145630
}
Thanks.

采纳的回答

KSSV
KSSV 2017-11-16
This is the way to proceed....but there is some problem with your data.
A = [5 0,500000000000000 5 2,52298164367676
15 0,500000000000000 5 2,64519572257996
25 0,500000000000000 5 2,52241730690002
5 0,500000000000000 15 2,64528870582581
15 0,500000000000000 15 2,65645980834961
25 0,500000000000000 15 2,64508199691772
5 0,500000000000000 25 2,52284812927246
15 0,500000000000000 25 2,64546251296997
25 0,500000000000000 25 2,52243471145630] ;
mid_x = reshape(A(:,1),3,[]) ;
mid_y = reshape(A(:,2),3,[]) ;
mid_z = reshape(A(:,3),3,[]) ;
dose = reshape(A(:,4),3,[]) ;
surf(mid_x,mid_y,mid_z,dose)
  1 个评论
Sara Principi
Sara Principi 2017-11-16
It works but it skips the bounding voxels, should I insert the information about the voxel dimensions (10cm x1cm x10cm)somewhere I guess because I obtain a surface and it is a cube..

请先登录,再进行评论。

更多回答(0 个)

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by