Plot two overlapping surfaces on the same image

11 vues (au cours des 30 derniers jours)
AN
AN le 20 Juil 2023
Commenté : Voss le 21 Juil 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 commentaires
AN
AN le 20 Juil 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 le 20 Juil 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

Connectez-vous pour commenter.

Réponse acceptée

Voss
Voss le 20 Juil 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 commentaires
AN
AN le 20 Juil 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 le 21 Juil 2023
You're welcome!

Connectez-vous pour commenter.

Plus de réponses (0)

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by