Visualization of a 3D Matlab volume and 3D overlay

The question is pretty much about the title.

I have a three-dimensional volume loaded as raw data [256, 256, 256] = size(A) . It contains only the values ​​of zero and unity, where 1 represents the structure and 0 is “air”.

I want to visualize the structure in MATLAB, and then run an algorithm on it and impose an overlay on it, for example, in red.

So, more precisely:

  • How to visualize 3D volume. 0 transparent, 1 translucent?
  • Customize line in 3d render as overlay?

I already read the MathWorks tutorials and they did not help. I tried using the set command, but it couldn’t completely say that for each property I am trying an “invalid root property”.

+4
source share
2 answers

There's a great utility called vol3d , mathworks employee Joe Conti. I think it fits your visualization needs exactly - give it a try.

Update (11/2012) . The file associated with it no longer exists. There is a new version here .

+1
source

I'm not sure I understand the second part of the question, but here, how do you visualize 3D volume using isosurfaces (I'm using the data from the flow-flow example)

 %# get a sample data with 0 for empty, 1 for solid [~,~,~,v] = flow; v = double( v<-3 ); %# visualize the volume p = patch( isosurface(v,0) ); %# create isosurface patch isonormals(v, p) %# compute and set normals set(p, 'FaceColor','r', 'EdgeColor','none') %# set surface props daspect([1 1 1]) %# axes aspect ratio view(3), axis vis3d tight, box on, grid on %# set axes props camproj perspective %# use perspective projection camlight, lighting phong, alpha(.5) %# enable light, set transparency 

flow_volume

To learn more about volume visualization in MATLAB, check out this great Doug blog video tutorial series.

+6
source

Source: https://habr.com/ru/post/1311391/


All Articles