mlab visualization

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

mlab visualization

David Ohlemacher
Hello all,

I am using mayavi to display some data from NOAA  (longitude, latitude,
elevation).   This is working quite nicely with Qt.

    snippet of code:
    ---------------------
    self.scene = Instance(MlabSceneModel, ())
    self.plot  = self.scene.mlab.surf(self.nDistXs, self.nDistYs, self.nDs)
    self.axis  = self.scene.mlab.axes(color=(1,0,1),
                             ranges=[self.lonMin, self.lonMax,
    self.latMin, self.latMax, self.dMin, self.dMax])
    self.axis.axes.label_format = '%-#6.5g'

I have some questions:

1.  How do I get the axes to scale with my object?  Or change an axis scale?

     When I add axes to my plot, they are scaled correctly.  But if I
then 'warp' the z-axis (height) of my plot, the axes do not adjust.    I
warped it using WarpScalar  Normal: F2.    Should I instead scale my nDs
array (elevation) before plotting?

2. How can I constrain my visualization so that the z axis is always
displayed up as the user interacts with it?

     Now it rotates in any direction, but only z up makes sense for my
data.  This is difficult for the user.

3. I would like to read the Mayavi source. GitHub's mayavi
<https://github.com/enthought/mayavi/tree/c8b7df5a9549b40eb234abf88276e9dffc1aa8d2>
link for getting package tarballs is broken (404).

4. Q3 brings up another issue. I installed mayavi by using debian
testing(Mayavi version 4.0.0 - VTK version 5.8.0).  It was easy and
works fine.   Should I manually install 4.1.1?    Will I gain
features/bug fixes in 4.1.1?

Thanks,

David
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: mlab visualization

David Ohlemacher
I figured out that my axes were not connected to the correct plot.

Reading the source is helping along with using the recording feature
from the pipeline.

Still would love a little help with Q2 and Q4.



On 04/02/2012 03:07 PM, David Ohlemacher wrote:

> Hello all,
>
> I am using mayavi to display some data from NOAA  (longitude,
> latitude, elevation).   This is working quite nicely with Qt.
>
>     snippet of code:
>     ---------------------
>     self.scene = Instance(MlabSceneModel, ())
>     self.plot  = self.scene.mlab.surf(self.nDistXs, self.nDistYs,
>     self.nDs)
>     self.axis  = self.scene.mlab.axes(color=(1,0,1),
>                             ranges=[self.lonMin, self.lonMax,
>     self.latMin, self.latMax, self.dMin, self.dMax])
>     self.axis.axes.label_format = '%-#6.5g'
>
> I have some questions:
>
> 1.  How do I get the axes to scale with my object?  Or change an axis
> scale?
>
>     When I add axes to my plot, they are scaled correctly.  But if I
> then 'warp' the z-axis (height) of my plot, the axes do not adjust.    
> I warped it using WarpScalar  Normal: F2.    Should I instead scale my
> nDs array (elevation) before plotting?
>
> 2. How can I constrain my visualization so that the z axis is always
> displayed up as the user interacts with it?
>
>     Now it rotates in any direction, but only z up makes sense for my
> data.  This is difficult for the user.
>
> 3. I would like to read the Mayavi source. GitHub's mayavi
> <https://github.com/enthought/mayavi/tree/c8b7df5a9549b40eb234abf88276e9dffc1aa8d2>
> link for getting package tarballs is broken (404).
>
> 4. Q3 brings up another issue. I installed mayavi by using debian
> testing(Mayavi version 4.0.0 - VTK version 5.8.0).  It was easy and
> works fine.   Should I manually install 4.1.1?    Will I gain
> features/bug fixes in 4.1.1?
>
> Thanks,
>
> David

--
David Ohlemacher
Principle Software Engineer
Scientific Solutions Inc.
99 Perimeter Rd Nashua New Hampshire 03063
603-880-3784

. o .
. . o
o o o

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

controlling orientation of surf()

David Ohlemacher
Hello list,

How can I constrain my visualization so that the z axis is always
displayed up as the user interacts with it?    Now it rotates in any
direction, but only 'z up' makes sense for my data.  This is difficult
for the user.

Alternatively, I added a trait widget that reorientates my surf() if
clicked.  Having to click it is silly.   How can I get notified when the
user moves the plot?

Regards,

David

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: controlling orientation of surf()

Gael Varoquaux
Hi David,

One of the reasons why I have a hard time answering email, is that I get
too much of it. Having several times the same question in my mailbox
doesn't help.

I apologize for not being as reactive as I would like, I just can't scale
up to both an intensive day job, and an active open-source development
life.

Cheers,

Gael

On Wed, Apr 04, 2012 at 10:43:55AM -0400, David Ohlemacher wrote:
> Hello list,

> How can I constrain my visualization so that the z axis is always
> displayed up as the user interacts with it?    Now it rotates in any
> direction, but only 'z up' makes sense for my data.  This is difficult
> for the user.

> Alternatively, I added a trait widget that reorientates my surf() if
> clicked.  Having to click it is silly.   How can I get notified when the
> user moves the plot?

> Regards,

> David

> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev

--
    Gael Varoquaux
    Researcher, INRIA Parietal
    Laboratoire de Neuro-Imagerie Assistee par Ordinateur
    NeuroSpin/CEA Saclay , Bat 145, 91191 Gif-sur-Yvette France
    Phone:  ++ 33-1-69-08-79-68
    http://gael-varoquaux.info
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev