Volume Visualization for multidimensional array.
6 views (last 30 days)
Show older comments
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 ).
-hari tejas
2 Comments
Answers (1)
James Ryland
on 11 May 2017
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 Comments
See Also
Categories
Find more on Data Distribution Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!