Plot two overlapping surfaces on the same image

11 次查看(过去 30 天)
Hi All,
I am trying to plot two surfaces, one being a transparent interpolated surface of a heart and the second being a solid subset of that surface representing a voxel of interest. For some reason I cannot get the voxel surface to show up the way I want it to. My code and relevant files are attached. I appreciate any assistance with this. Thank you so much!
  5 个评论
AN
AN 2023-7-20
Hi,
Thank you for your response. I want the last plot (transparent surface) overlaid by a solid surface of the voxel of interest (lines 653 of the original file sent in the previous methodwhich is commented as it does not work- ie I want a smooth surface version of the scatterplot created in the attached file on lines 581 to 592 overlapping on the transparent surface as a solid surface of interest.
AN
AN 2023-7-20
An example figure of the voxel such as that I would like to create a solid surface to superimpose on the transparent surface is shown. I tried coding the interpolation the same way as I did for the original surface, however, the solid voxel does not show in the figure

请先登录,再进行评论。

采纳的回答

Voss
Voss 2023-7-20
Does this seem right?
isochronal_crowding
Region of interest contains 7 isochrones Ratio of red ie fastest points over total is 0 Ratio of orange points over total is 0.0010758 Ratio of yellow points over total is 0.051641 Ratio of green voltage points over total is 0.16138 Ratio of cyan voltage points over total is 0.22647 Ratio of blue voltage points over total is 0.30285 Ratio of purple voltage points over total is 0.1915 Ratio of pink ie slowest voltage points over total is 0.064551
Ratio of low voltage points over total is 0.27383 Ratio of border voltage points over total is 0.29022 Ratio of high voltage points over total is 0.43594
delete([1 2]) % remove first two figures for clarity
You'll see the following in the code (lines 655-656):
p = trisurf(K,x_points',y_points',z_points',colorCategory,'FaceAlpha',1,'EdgeColor','none');
p.FaceVertexCData(~ismember(x_points,x_v)) = NaN;
That creates a second (solid) trisurf patch using all the points (same points used in the first (transparent) trisurf patch), but then the faces that are not in the low-voltage data (x_v, y_v, z_v) are set to NaN so they don't show up and only the transparent surface is seen in those regions.
  4 个评论
AN
AN 2023-7-20
Yes perfect! I didn't think to be able to specify the voxel ID the way you did; Thank you so much for helping me!

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by