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 CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by