[vtkusers] How to convert float data to unsigned short for volume rendering, and a bug? in load filters
Dr. Daniel James White PhD
dan at chalkie.org.uk
Sat Feb 21 08:19:43 EST 2004
Hi All,
1)
I saw this load filter a while ago, but have just been been prompted to
mention it.
On a red hat 8 linux box,
recent VTK CVS and MayaVi1.3 CVS snapshot 20031023
On trying to load any of the filters I get this error message
Exception
/usr/lib/python2.2/site-packages/mayavi/Main.py:487:
NameError :global name 'kw' not defined (in load_filter)
2) On my MacOSX machine where load filter works (also with recent VTK
CVS and MayaVi1.3 CVS snapshot 20031023)
I have a .vtk file containing a 3D structured grid of scalar float
data from cryo Electron Microscopy of a virus.
Yes Prabhu, another application for MayaVi is 3D structures of large
molecules such as viruses and ribosomes from cryEM!
Here is the file header
# vtk DataFile Version 2.0
hbcore2 17 parts 2Dec93 Dec 8
14:31:48 199
BINARY
DATASET STRUCTURED_POINTS
DIMENSIONS 55 55 55
ORIGIN 0.000000 0.000000 0.000000
SPACING 1.000000 1.000000 1.000000
POINT_DATA 166375
SCALARS density float 1
LOOKUP_TABLE default
I made this .vtk file from a .mrc file using proc3d in the EMAN cryoEM
data manipulation package.
I want to volume render with data with the volume module (and our
experimental volumepro100 module which is working nicely so far..)
however the data is float, and has negative values (and positive ones),
and does not work for ray casting with vtkRayCastMapper.
Some how I need to convert this to unsigned short? for volume rendering.
Iso surface works with the data as it is, but the transparency does not
work on my linux box. It is either 100% or 0% transparent hen I move
the opacity slider in the MayaVi isosurface module window. Transparency
does work fine on the OSX machine.
Can I use a vtk filter from within MayaVi, perhaps "user defined
filter" or one of the existing ones to make this data work for the
MayaVi volume module?
cheers
Dan
Dr. Daniel James White BSc. (Hons.) PhD
Cell Biology
Department of biological and environmental science
PO Box 35
University of Jyväskylä
Jyväskylä FIN 40014
Finland
+358 (0)14 260 4183 (work)
+358 (0)414740463 (mob)
http://www.chalkie.org.uk
dan at chalkie.org.uk
white at cc.jyu.fi
More information about the vtkusers
mailing list