Volume Visualization for multidimensional array.
3 次查看(过去 30 天)
显示 更早的评论
Hello,
I am trying to visualize 4-columns of data in volume plot.
Here the first 3 columns are the variable inputs, for my answer which is listed alongside in the 4th column.
The idea is to input the 4th column as a function of the first three columns, and plot it (4th column) as a 3d colourmap/contours.
There are two problems I am encountering with my current attempt;
-1)_ I am not able to generate the 3d image/ object, which could be sliced to observe the colormap.
-2)_ Not able to increase the size of the mesh-grid above 100, (low memory error).
following is the code that I attempted . . .
X = B(:,1);
Y = B(:,2);
Z = B(:,3);
xlin = linspace(min(X),max(X),50);
ylin = linspace(min(Y),max(Y),50);
zlin = linspace(min(Z),max(Z),50);
V = B(:,4);
[xx,yy,zz] = ndgrid(xlin,ylin,zlin);
% griddata(X,Y,Z,xx,yy,zz,V);
% vv = TriScatteredInterp(xx,yy,zz,V);
vv = griddata3(X,Y,Z,V,xx,yy,zz);
I managed to obtain in 'vv' the interpolated answers for small mesh sizes. It is a 3d array of interpolated numbers of column-4.
Could anyone please advise me on how to go about volumetric plotting, and also how to increase the mesh size.
Is it necessary to define a function V(X,Y,Z) to obtain such a plot, can it be done with random numbers in the columns?
I have been through volumetric visualization section on mathworks, but am not sure about how and which syntax to employ.
I intend to obtain a final result something like the following, which I found in ( MRI IMAGE mathworks link ).
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/152421/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/152422/image.gif)
-hari tejas
2 个评论
回答(1 个)
James Ryland
2017-5-11
If you can reformat your data in terms of a regularly sampled 3D array you can use this application written in matlab for visualizing said array volumetrically. Though designed tow work with fmri data it can work with arbitrary 3D arrays saved as .mat files.
https://www.mathworks.com/matlabcentral/fileexchange/59161-volumetric-3?s_tid=srchtitle
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!