Build a 3D Intensity Data Cube

I have k cubes of intensity values (n,n,n) , and I would like to build them.

I consider them as diffusion tensors in diffusion MRI, and I would like to visualize them (possibly as ellipsoids) and then try to β€œalign” in some way. Currently, I just draw for each cube its n "slice" (n,n) .

Is there any python module for this task?

+4
source share
1 answer

You can use mayavi2 for this. Since I don't have a view of your data, I gave a minimal working example with some random spheres on the grid below:

 import numpy import mayavi.mlab as mlab # Create some random data N = 20 x, y, z = numpy.mgrid[-5:5:20j, -5:5:20j, -5:5:20j] val = numpy.random.random(z.shape) # Plot and show in mayavi2 pts = mlab.points3d(x, y, z, val, scale_factor=.5,transparent=True) mlab.show() 

enter image description here

+5
source

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


All Articles