plot voxelized geometry from middle coordinates

4 ビュー (過去 30 日間)
Sara Principi
Sara Principi 2017 年 11 月 15 日
コメント済み: Sara Principi 2017 年 11 月 16 日
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 Center および File ExchangeInterpolation についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by