On Mon, Dec 05, 2011 at 04:19:01PM +0100, Bertrand wrote:
>    I have 2 questions concerning the volume module. I was trying to visualize
>    a 3D scalar field, starting from a StructuredPoints dataset. When the
>    spacing along the axes is 1 (or larger), it works fine (like sgrid1 in the
>    code below). But when the spacing gets smaller than 1, the volume is not
>    displayed properly.
>    One thing which is fishy: the color of the volume gets more intense as the
>    spacing increases. It seems like the volume module does not pick the right
>    scalar information, but changing the "Scalar mode" from the application
>    had no effect. The image_plane_widget works fine on the same grids.

I don't know the answer to this question. I believe that it is related to
the algorithm used by VTK to compute the Volume rendering. Maybe you can
ask on the VTK mailing lists.

>    My second question relates to the CTF. How can I set the vmin and vmax for
>    transparency through a script?

If you use mayavi.mlab.pipeline.volume:
see
http://github.enthought.com/mayavi/mayavi/mlab_pipeline_reference.html

I believe that the vmin and vmax arguments should do what you are looking
for.

Also, if you look at the docstring of this function:
https://github.com/enthought/mayavi/blob/master/mayavi/tools/modules.py#L519
if gives pointer on how to modify the CTF.

As a general rule, it is often useful to have a look at how to do things
with mlab, even if you want to use full object oriented programming at
the end of the day. Mlab is good for prototyping and trying things out.

HTH,

Gael




------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
MayaVi-users mailing list
MayaVi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users

Reply via email to