Borrar filtros
Borrar filtros

Plot two overlapping surfaces on the same image

11 visualizaciones (últimos 30 días)
AN
AN el 20 de Jul. de 2023
Comentada: Voss el 21 de Jul. de 2023
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 comentarios
AN
AN el 20 de Jul. de 2023
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 el 20 de Jul. de 2023
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

Iniciar sesión para comentar.

Respuesta aceptada

Voss
Voss el 20 de Jul. de 2023
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 comentarios
AN
AN el 20 de Jul. de 2023
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!
Voss
Voss el 21 de Jul. de 2023
You're welcome!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by