How can I show just some slices of a 3D matrix?

6 vues (au cours des 30 derniers jours)
Javad
Javad le 3 Mar 2018
Commenté : Walter Roberson le 28 Mai 2020
I have a binary 3D matrix (100*100*100), which is a digital rock. In the matrix 0 and 1 represent the pores and solid area, respectively. I want to represent some slices. For example in XY plane slices 1 and 50 and 100. How can I show just some slices of the rock?

Réponse acceptée

Walter Roberson
Walter Roberson le 5 Mar 2018
Use slice()
  2 commentaires
Hassan Zhairabany
Hassan Zhairabany le 28 Mai 2020
Hello,
Could you tell me in case I have a matrix A=randi([0,1],[256,256,5]) and I want to show the plane B=A(255,:,:) but like a top view.
imshow(B) does not work because the image of B considered Multi-plane, B is 256*1*5 double
Walter Roberson
Walter Roberson le 28 Mai 2020

Connectez-vous pour commenter.

Plus de réponses (1)

Rik
Rik le 3 Mar 2018
Have you tried to index them and use imshow? (so imshow(A(:,:,50)))
You can use subplot to show the separate images side by side, or you can use montage to show the entire matrix (don't forget to use permute to change your matrix from row x col x page to row x col x color x page).
  3 commentaires
Walter Roberson
Walter Roberson le 5 Mar 2018
No image is attached
Javad
Javad le 5 Mar 2018
sorry, The image is now attached.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Read, Write, and Modify Image dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by