Giovanni Ghigliotti | 1 Apr 2011 01:32
Picon
Picon

Re: script to generate an animation from a file set, offscreen

Hi,
here there are more details on the fact that my script does not run with
the flag -o.
the command:
 mayavi2 -x script.py -o
gives:
ERROR|2011-03-31 12:34:48,079|'MayaviOffscreen' object has no attribute
'new_scene'
Traceback (most recent call last):
  File "/usr/bin/mayavi2", line 413, in run_script
    execfile(script_name, g, g)
  File "script.py", line 1, in <module>
    mayavi.new_scene()
AttributeError: 'MayaviOffscreen' object has no attribute 'new_scene'

...and if I comment out the line giving the problem, the same error
appears for the following line, and so on.
(The script works fine if I take out the flag -o)
I have vtk version 5.4 on Ubuntu 10.10.

thank you for your suggestions,
   giovanni

PS: the script 'script.py' is:

for i in range(1, 14):
	mayavi.new_scene()
	s = mayavi.engine.current_scene
	#mayavi.engine.current_scene.scene.off_screen_rendering = True
	s.scene.disable_render = True
(Continue reading)

Gael Varoquaux | 1 Apr 2011 07:29
Favicon
Gravatar

Re: script to generate an animation from a file set, offscreen

On Thu, Mar 31, 2011 at 04:32:38PM -0700, Giovanni Ghigliotti wrote:
> here there are more details on the fact that my script does not run with
> the flag -o.
> the command:
>  mayavi2 -x script.py -o
> gives:
> ERROR|2011-03-31 12:34:48,079|'MayaviOffscreen' object has no attribute
> 'new_scene'
> Traceback (most recent call last):
>   File "/usr/bin/mayavi2", line 413, in run_script
>     execfile(script_name, g, g)
>   File "script.py", line 1, in <module>
>     mayavi.new_scene()
> AttributeError: 'MayaviOffscreen' object has no attribute 'new_scene'

I must admit I don't understand: I cannot reproduce the problem. Can you
add the following lines:

print mayavi
print mayavi.engine

Gael

------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
Giovanni Ghigliotti | 1 Apr 2011 20:31
Picon
Picon

Re: script to generate an animation from a file set, offscreen

Hi,
adding the two lines
  print mayavi
  print mayavi.engine
at the beginning of the script (run with mayavi2 -x script.py -o) gives:

<__main__.MayaviOffscreen object at 0xc0fd4dc>
ERROR|2011-04-01 11:30:24,454|'MayaviOffscreen' object has no attribute
'engine'
Traceback (most recent call last):
  File "/usr/bin/mayavi2", line 413, in run_script
    execfile(script_name, g, g)
  File "script.py", line 2, in <module>
    print mayavi.engine
AttributeError: 'MayaviOffscreen' object has no attribute 'engine'

thank you for helping!
   giovanni

On Fri, 2011-04-01 at 07:29 +0200, Gael Varoquaux wrote:
> On Thu, Mar 31, 2011 at 04:32:38PM -0700, Giovanni Ghigliotti wrote:
> > here there are more details on the fact that my script does not run with
> > the flag -o.
> > the command:
> >  mayavi2 -x script.py -o
> > gives:
> > ERROR|2011-03-31 12:34:48,079|'MayaviOffscreen' object has no attribute
> > 'new_scene'
> > Traceback (most recent call last):
> >   File "/usr/bin/mayavi2", line 413, in run_script
(Continue reading)

Prabhu Ramachandran | 2 Apr 2011 08:20
Picon
Gravatar

Re: script to generate an animation from a file set, offscreen

On Saturday 02 April 2011 12:01 AM, Giovanni Ghigliotti wrote:
> Hi,
> adding the two lines
>    print mayavi
>    print mayavi.engine
> at the beginning of the script (run with mayavi2 -x script.py -o) gives:
>
> <__main__.MayaviOffscreen object at 0xc0fd4dc>
> ERROR|2011-04-01 11:30:24,454|'MayaviOffscreen' object has no attribute
> 'engine'
> Traceback (most recent call last):
>    File "/usr/bin/mayavi2", line 413, in run_script
>      execfile(script_name, g, g)
>    File "script.py", line 2, in<module>
>      print mayavi.engine
> AttributeError: 'MayaviOffscreen' object has no attribute 'engine'

Hmm, what version of Mayavi is this?  Can you try this:

mayavi2 -V

Also the script I attach works perfectly fine for me.  Could you please 
check if it works for you?

cheers,
prabhu
Attachment (t.py): text/x-python, 252 bytes
------------------------------------------------------------------------------
(Continue reading)

Giovanni Ghigliotti | 4 Apr 2011 19:48
Picon
Picon

Re: script to generate an animation from a file set, offscreen

Hi,

the script t.py runs fine for me with
  mayavi2 -x t.py
while with
  mayavi2 -x t.py -o
I get always the same error:
ERROR|2011-04-04 10:40:53,231|'MayaviOffscreen' object has no attribute
'engine'
Traceback (most recent call last):
  File "/usr/bin/mayavi2", line 413, in run_script
    execfile(script_name, g, g)
  File "t.py", line 4, in <module>
    print mayavi, mayavi.engine
AttributeError: 'MayaviOffscreen' object has no attribute 'engine'
<__main__.MayaviOffscreen object at 0xae4f4dc>

my mayavi version is:
  mayavi2 -V
Mayavi 3.3.2
which looks to be the latest accessible via Synaptic on Ubuntu 10.10.

Please don't waste too much time on this, I can have my work done even
without the flag -o.

thank you,
   giovanni

On Sat, 2011-04-02 at 11:50 +0530, Prabhu Ramachandran wrote:
> On Saturday 02 April 2011 12:01 AM, Giovanni Ghigliotti wrote:
(Continue reading)

suddha sourav | 6 Apr 2011 22:26
Picon

How can I turn on anti-aliasing in MayaVi?

This is my first mail to this list. First I'd like to thank the MayaVi team for making this astonishing piece of software possible. It's simply brilliant!

At this point I'm just playing with MayaVi to learn its features and plan to use it in classrooms.

I would like to know how I can set (and adjust, if possible) the anti-aliasing feature in a MayaVi scene. I can already use the anti-aliasing features while saving a scene - so no problem there - what I want to know is how to enable anti-aliasing inside the scene (when in interactive mode).

Thank you for your efforts.

Suddha Sourav


------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
MayaVi-users mailing list
MayaVi-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users
Gael Varoquaux | 7 Apr 2011 10:28
Favicon
Gravatar

Re: How can I turn on anti-aliasing in MayaVi?

Hi Suddha,

Sorry for the slow answer. It seems that I am always travelling.

So option to turn on antialiasing is not displayed in the UI, but you can
do this programmatically. If 'f' is the current scene, or figure, which
you can retrieve using 'mlab.gcf()':
http://github.enthought.com/mayavi/mayavi/auto/mlab_figure.html#enthought.mayavi.mlab.gcf
you can do the following:

f.scene.render_window.aa_frames = 8

# And trigger a refresh:
mlab.draw()

Hope this helps,

Gael

On Thu, Apr 07, 2011 at 02:26:27AM +0600, suddha sourav wrote:
>    This is my first mail to this list. First I'd like to thank the MayaVi
>    team for making this astonishing piece of software possible. It's simply
>    brilliant!
>    At this point I'm just playing with MayaVi to learn its features and plan
>    to use it in classrooms.
>    I would like to know how I can set (and adjust, if possible) the
>    anti-aliasing feature in a MayaVi scene. I can already use the
>    anti-aliasing features while saving a scene - so no problem there - what I
>    want to know is how to enable anti-aliasing inside the scene (when in
>    interactive mode).
>    Thank you for your efforts.
>    Suddha Sourav

> ------------------------------------------------------------------------------
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev

> _______________________________________________
> MayaVi-users mailing list
> MayaVi-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mayavi-users

--

-- 
    Gael Varoquaux
    Research Fellow, INSERM
    Associate researcher, INRIA
    Laboratoire de Neuro-Imagerie Assistee par Ordinateur
    NeuroSpin/CEA Saclay , Bat 145, 91191 Gif-sur-Yvette France
    Phone:  ++ 33-1-69-08-78-35
    Mobile: ++ 33-6-28-25-64-62
    http://gael-varoquaux.info

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
suddha sourav | 7 Apr 2011 16:13
Picon

Re: How can I turn on anti-aliasing in MayaVi?

Thanks, Gael! I'm grateful enough that you found the time to reply :-)

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
MayaVi-users mailing list
MayaVi-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users
suddha sourav | 12 Apr 2011 23:17
Picon

Circular Cut Plane

Hello Everyone!

I'm trying to help my students visualize how evaluating the z-transform of a discrete-time signal on the unit circle gives us the Fourier transform of the signal.

For this purpose, I need to cut a surface with a "Circular" cut plane.

I have read some posts and searched for related info, and the closest I have come to doing this is the DataSet Clipper. However, descriptions seem scarce and the tool looks quite convoluted for regular use. My question is, how can I use Dataset clipper for cutting a circular projection from a surface? (Think of getting the intersection of a surface and an upright cylinder).

Second, is there a probability that we can have a circular cut plane with adjustable radius? If not, where do I need to look to implement one?

Thank you all.

Suddha Sourav
------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
MayaVi-users mailing list
MayaVi-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users
Gael Varoquaux | 13 Apr 2011 22:59
Favicon
Gravatar

Re: Circular Cut Plane

Hi Sudha,

There is no black box way of doing this in Mayavi. I can suggest two ways
to approach the problem. 

The first would be to create 2 fields of data, one define the scalar that
you are interested in, and the other one define iso surfaces to cut
along. Then you can follow the Atomic Orbital example:
http://github.enthought.com/mayavi/mayavi/auto/example_atomic_orbital.html
This option is easy to implement, but will consume twice the amount of
memory that should be necessary.

The other option is to define a first scalar field, and define the
cutting surface using a totally different approach (for instance defining
directly a polydata, using a cylinder source, or using mlab.mesh). You
can then use a vtk 'ProbeData' filter to interpolate the first data
source on this surface. This will porbably be more efficient, but
requires more knowledge of the Mayavi and VTK objects.

Hope this helps,

Gaƫl

On Wed, Apr 13, 2011 at 03:17:36AM +0600, suddha sourav wrote:
>    I'm trying to help my students visualize how evaluating the z-transform of
>    a discrete-time signal on the unit circle gives us the Fourier transform
>    of the signal.
>    For this purpose, I need to cut a surface with a "Circular" cut plane.
>    I have read some posts and searched for related info, and the closest I
>    have come to doing this is the DataSet Clipper. However, descriptions seem
>    scarce and the tool looks quite convoluted for regular use. My question
>    is, how can I use Dataset clipper for cutting a circular projection from a
>    surface? (Think of getting the intersection of a surface and an upright
>    cylinder).
>    Second, is there a probability that we can have a circular cut plane with
>    adjustable radius? If not, where do I need to look to implement one?
>    Thank you all.
>    Suddha Sourav

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev

Gmane