dexp.volumerender.volumerender

the actual renderer class to max project 3d data

the modelView and projection matrices are compatible with OpenGL

usage:

rend = VolumeRenderer((400,400))

Nx,Ny,Nz = 200,150,50 d = linspace(0,10000,Nx*Ny*Nz).reshape([Nz,Ny,Nx])

rend.set_data(d) rend.set_units([1.,1.,.1]) rend.set_projection(projMatPerspective(60,1.,1,10)) rend.set_modelView(dot(mat4_translate(0,0,-7),mat4_scale(.7,.7,.7)))

out = rend.color()

author: Martin Weigert email: mweigert@mpi-cbg.de

Functions

absPath(myPath)

Get absolute path to resource, works for dev and for PyInstaller

Classes

VolumeRenderer([size, interpolation])

renders a data volume by ray casting/max projection