how to view 4D-single Image

조회 수: 20 (최근 30일)
mohd akmal masud
mohd akmal masud 2022년 7월 6일
댓글: Walter Roberson 2022년 7월 7일
  댓글 수: 4
Walter Roberson
Walter Roberson 2022년 7월 7일
When you represent data, you can encode:
  • one dimension horizontally (x)
  • one dimension vertically (y)
  • one dimension up/down (z); in 2D plots, this can be approximated by using perspective
  • one dimension by color, such as a temperature map overlayed on an object; when using perspective instead of true 3D, then color and perspective can interfere (we use color for depth cues)
Additional potential ways to encode dimensions include:
  • marker size -- negatives not permitted
  • marker shape -- this one is not continuous and so is difficult for humans to understand
  • marker color (interfers with encoding by surface color)
  • transparency -- this one is difficult for humans to understand
To represent four independent dimensions and one dependent dimension, you need five of the above.
In my experience, x, y, z (through perspective), marker color with transparency, and marker size is about the only combination that has a hope of being understood.
N = 20;
xv = linspace(0,2*pi,N);
yv = linspace(-1,1,N);
zv = linspace(0,2,N);
wv = linspace(-pi, pi, N);
[X, Y, Z, W] = ndgrid(xv, yv, zv, wv);
P = sin(3*X + Y) + Y.^3 + exp(-Z.^2) + cos(W);
markersize = 5*(W(:) - min(W(:)) + 5);
markercolor = P(:);
scatter3(X(:), Y(:), Z(:), markersize, markercolor, 'filled', 'MarkerFaceAlpha', 0.3);
c = colorbar(); c.Label.String = 'P';
I don't think the markersize representation can be said to work out there.
... And, besides, with there being a grid of X Y Z W, there are multiple W values for each particular (X, Y, Z) triple, so you are trying to distinguish a dimension of values according to the size of different markers that are all overlayed at the same X Y Z position. I think that is unlikely to be understandable at the best of times. Perhaps if you happened to be working with a scattered points rather than a regular grid... but you are not, you are working with a grid.
You can play with exactly which dimension is encoded which way, but you end up with the fundamental problem of having multiple points (corresponding to the W dimension) at the same (X, Y, Z).
Unless you can somehow figure out a way to encode the W dimension as a sort of second perspective, you have fundamental problems making something comprehendable.
Walter Roberson
Walter Roberson 2022년 7월 7일
A common work-around for these issues is to represent one of the dimensions as time -- that is, to create an animation.

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

답변 (1개)

Constantino Carlos Reyes-Aldasoro
편집: Walter Roberson 2022년 7월 7일
Hello
It depends very much what you want and where you data comes from. A 4D data set may be a 3D + time data set and thus you could display partially your data by selecting just some 2Ds, for example
imagesc(yourdata(:,:,1,1))
and change the dimensions to see other slices. Now, that is limited and will not allow you to analyse volumes or other interesting things. I have written a book about Matlab for image processing and in the last chapter there is a section about 3D graphics. Have a look:
PS you may need access from your institution to view the chapters.

카테고리

Help CenterFile Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by