How display 3-D binary as an image?

조회 수: 14 (최근 30일)
zrowork
zrowork 2018년 4월 29일
편집: zrowork 2018년 5월 10일
I have problem with the following data to display it as an 3d binary object or image:
m(:,:,2) = [ 0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 1 1 0 0; 0 0 1 1 0 0; 0 0 0 0 0 0; 0 0 0 0 0 0];
m(:,:,3) = [ 0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 1 1 0 0; 0 0 1 1 0 0; 0 0 0 0 0 0; 0 0 0 0 0 0];
m(:,:,4) = [ 0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 0 0 0 0];
m(:,:,5) = zeros;
m
Does anybody have a solution how to display this data? Thank you.
  댓글 수: 3
Rik
Rik 2018년 4월 29일
So what do you want? A patch maybe?
zrowork
zrowork 2018년 4월 29일
Normally I have 3d matrix 431x473x72 inside which are different numbers. For now I try to display it on simple 3d-matrix, that the result would look like as below.
I would like to display positions with number 1 as a cube or just merge this positions together to obtain some shape.

댓글을 달려면 로그인하십시오.

답변 (1개)

zrowork
zrowork 2018년 5월 10일
편집: zrowork 2018년 5월 10일
So, I have found a solution. I have used isosurface command.
m(:,:,2) = [ 0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 1 1 0 0; 0 0 1 1 0 0; 0 0 0 0 0 0; 0 0 0 0 0 0];
m(:,:,3) = [ 0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 1 1 0 0; 0 0 1 1 0 0; 0 0 0 0 0 0; 0 0 0 0 0 0];
m(:,:,4) = [ 0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 0 0 0 0];
m(:,:,5) = zeros;
isosurface(m)
The result looks like:
Unfortunately, in big data (3D Matrix 431x473x72) it is not possible to notice this kind of object because matrix is too big.
Does anybody have solution how zoom exactly to the created surface which is unseen in this case? It's somewhere there.

카테고리

Help CenterFile Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by