Christopher Snyder | 23 Aug 13:18 2015
Picon

how to set ctf and otf for volume rendering-- not in scripting mode

Hi,

This problem is well covered in scripting mode here

In the case of a gui, Gael suggested somewhere using the record function. I find it does not reflect changes in the ctf widget.

Here is my code. I find that I can access the ctf fine, and that the ctf I access is sensitive to changes in the gui widget. I just can't find a way to set the ctf.

class Vis(HasTraits):
    scene     = Instance(MlabSceneModel,())    
    save=Button()
    load=Button()
    editor=SceneEditor(scene_class=MayaviScene)
    def __init__(self,G):
        self.G=G
        HasTraits.__init__(self)
        self.array_src=ArraySource()
        self.array_src.scalar_data=G
        self.scene.mayavi_scene.add_child(self.array_src)
        self.vol_module=Volume()
        self.volume=self.array_src.add_module(self.vol_module)

    def _save_fired(self):
        self.my_crf=self.vol_module.volume_property.rgb_transfer_function ##Works!!
    def _load_fired(self):
        self.vol_module.volume_property.set_color(self.init_crf) ##Fails and I need help
 
   traits_view = View( ..)

vis=Vis(G)
vis.configure_traits()



Obvious workarounds like settings _ctf directly don't seem to work.

Thanks,
Chris
------------------------------------------------------------------------------
_______________________________________________
MayaVi-users mailing list
MayaVi-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users
Christopher Snyder | 13 Aug 10:42 2015
Picon

bug with volume colortransfer function mayavi

Dear all,

I think I have come across a genuine bug. It seems that something very strange and certainly unintuitive is happening with the colortransferfunction(CTF) interface.

I'll describe here what I've shown in the attached movie.

Action: mlab.pipeline.volume(whatever). It doesn't matter how the volume rendering is created.
Result: The volume source is displayed as red. Fine.

Action: The user just clicks on the volume transfer function without changing it much. You can even move it back to exactly where it was.
Result: The volume source totally changes colors from red to green: suggesting the CTF in the "Mayavi pipeline" window is not the same as the one originally used in "Mayavi Scene 1"

Action: The user,  having clicked on the opacity transfer function at least once, clicks away. Then the user clicks back.
Result: The CTF totally changes to this blue-red fade instead of this nice three-color style before. If the user messes with the OTF once more, update CTF will change the volume again! from this green color to this red-purple-ish.

Note: It's not just "clicking away" and clicking back that causes this weird change in CTF. I originally ran into this problem while changing data sources. I had say 5 difference volumes. Whenever I would say "array_src.scalar_values=my_volumes.next()" the CTF would change from a rgb to a blue-red fade if and only if I had tried to alter the ctf manually in the GUI.

I really hope we can get this resolved.

Thanks,
Chris Snyder

------------------------------------------------------------------------------
_______________________________________________
MayaVi-users mailing list
MayaVi-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users
Christopher Snyder | 1 Aug 15:15 2015
Picon

ArraySource vs ScalarField produces different results

Specifically I can't get them to look the same by adjusting all the parameters I can find on the GUI.

Side question: I couldn't figure out how to synchronize the colormaps for each scene to get a rigorous comparison.

On the one hand I call mlab.pipeline.volume(scalar_field_object) and I get a very nice volume that is mostly translucent except for the main region of intensity.

On the other I have this ArraySource.add_module(mlab.modules.Volume()) #sudo code, don't actually try either of these things, and I get very opaque image volumes even from areas of low intensity.

Any thoughts ?

Chris
------------------------------------------------------------------------------
_______________________________________________
MayaVi-users mailing list
MayaVi-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users
Christopher Snyder | 29 Jul 01:02 2015
Picon

volume rendering with anisotropic, but regularly spaced pixels, (delz=2*delz=2*dely)

Hi there,

My usual routine involves
ix,iy,iz=np.indices(Image)
s=mlab.pipeline.scalar_field(spacing[0]*ix,spacing[1]*iy,spacing[2]*iz,Image)
mlab.pipeline(volume(s))

However, I am strapped for memory. Actually forming the indices ix,iy,iz is putting a burden on my code. Is there some workaround, perhaps through the depths of vtk, that lets me specify this with just the scalar tuple (1,1,2) ??? 

Thanks in anticipation,
Chris Snyder
------------------------------------------------------------------------------
_______________________________________________
MayaVi-users mailing list
MayaVi-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users
Andrew Andrade | 23 Jul 01:02 2015
Picon

Representing an additional scalar on barchart

Hello everyone,

Sorry for my noobness, I am somewhat new to Mayavi. I have 3d visualization working using the bar chart.  The data is discrete across all four variables (not a surface)

I have a 4th dimention of the same size and I wanted to represent that via color, effectively showing the relationship between the 4 variables.

Any idea how to do this? I found this post [1] , but my values are a list of scalars not a function. 

Where results is a pandas dataframe, if I put in barchart(results.var1, results.var2 ,results.var3, results.var4) it gives me incorrect plots, so I am confused what the S argument is for the function. Any ideas?


Thanks,

Andrew

http://gael-varoquaux.info/programming/mayavi-representing-an-additional-scalar-on-surfaces.html
------------------------------------------------------------------------------
_______________________________________________
MayaVi-users mailing list
MayaVi-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users
Felix Repp | 15 Jul 14:59 2015
Picon

set_active_attribute returns error using vtk 6.x

Hello list,

I ran in to a problem running code on a Linux installation where vtk 6.0 
is used.

Adding two arrays to a dataset, mlab.pipeline.set_active_attribute does 
not recognize the name of the second array.

The problem can be reproduced using the atomic orital example:

http://docs.enthought.com/mayavi/mayavi/auto/example_atomic_orbital.html

The following error message is returned:
TraitError: The 'point_scalars_name' trait of a SetActiveAttribute 
instance must be one of ['scalar', ''], but a value of 'angle' <type 
'str'> was specified.

A colleague of mine ran into the same problem using the current Canopy 
installation under Windows where vtk 6.2 is used, so I guess it is 
related to vtk 6.x, as the code works well  using VTK 5.x

Did anyone else run into this Problem? Is there a workaround?

Thanks a lot,
Felix

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
Christopher Snyder | 13 Jul 23:35 2015
Picon

native multiresolution viewing in mayavi

Hi there,

I have a large image that I would like to visualize, and I would like users to be able to interact with pieces of it at full resolution.

The strategy seems to be to display a subsampled image at first and have higher resolution images displayed as the users zooms in.

It seems like such a common thing to want, I was wondering if anyone has already done this. I can't seem to find anything on it though.

Thanks,
Chris
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
MayaVi-users mailing list
MayaVi-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users
Christopher Snyder | 13 Jul 23:30 2015
Picon

This email is a test

I would appreciate it if someone could respond to me telling me if they got this email.

I sent an email some time ago with no response. I also don't recall seeing any mailing list emails.

--Chris
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
MayaVi-users mailing list
MayaVi-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users
Christopher Snyder | 26 Jun 22:54 2015
Picon

automatically setting the scalar opacity for vol image data

Hi there,

I would truly truly be grateful if someone could help me with this. It has caused me much strife.

I would like to change the opacity scaling to some default piecewise function when I first run my code -- without messing with the GUI or the pop up window: volume.edit_traits()

I've tried many related ways, but for sanity I'll stick to a prototypical example:
#########
volume=mlab.pipeline.volume(mlab.pipeline.scalar_field(sIzi,sIxi,sIyi,I))
from tvtk.util.ctf import PiecewiseFunction
otf = PiecewiseFunction()
otf.add_point(0.0,0.0)
#otf.add_point(0.25,0.0)
otf.add_point(0.35,0.15)
otf.add_point(1.0,.25)

volume.volume_property.set_scalar_opacity(otf)

#########

This code seems to edit the opacity, but it acts as if I had typed in 0.0025 (or maybe 0.025?) and 0.0035 instead of 0.35. For clarity, I would like slope of the opacity function to change at the 25% and 35% percentiles.

Thanks,
Chris


------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
MayaVi-users mailing list
MayaVi-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users
Tom | 22 Jun 17:02 2015
Picon

Problem with mayavi 4.4.0 - mlab.figure.scene.save() and mlab.text3d()

Hallo,
I'm using mayavi 4.4.0, Windows 8, python 2.7 on my PC & my laptop.
However, there are 2 issues with mayavi
1. On my laptop, I can call mlab.figure.scene.save() to save screen 
shot. But the same code doesn't work on my PC (error).

2. On my PC, mlab.text3d() works well, but on my laptop, the code show 
nothing (but there is no error).

Could somebody help me?
Thanks
Tom

------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
Prabhu Ramachandran | 3 Jun 16:37 2015
Picon

[ANN] Mayavi-4.4.1 release

Hello,

Enthought is pleased to announce Mayavi-4.4.1.  Mayavi is a general purpose,
cross-platform Python package for 2-D and 3-D scientific data visualization.
Mayavi integrates seamlessly with numpy and provides a convenient Pythonic
wrapper for the VTK API.  It provides a high-level visualization API that sits
on top of the powerful VTK (http://www.vtk.org) library. It provides a
stand-alone UI to help visualize your data. Mayavi is easy to extend and embed
in your own dialogs and UIs.

For more information see here:

  http://docs.enthought.com/mayavi/mayavi/index.html

Mayavi-4.4.0 is available as part of the free Canopy
(https://store.enthought.com/downloads/) packages.  4.4.1 will be available soon.

This is a major public release as this is the first public version of Mayavi to
support VTK-6.x and also support VTK-5.x.  Mayavi-4.4.1 (and 4.4.0) should work
with all VTK 6.x releases as well as the latest development version. We did have
a 4.4.0 release but did not announce it widely. For more details on the
enhancements and fixes please see here:

http://docs.enthought.com/mayavi/mayavi/auto/changes.html#mayavi-4-4-1

and here:

http://docs.enthought.com/mayavi/mayavi/auto/changes.html#mayavi-4-4-0

This release is important as this will allow us to track major improvements that
are part of the VTK-6.x releases.

We are thankful to the following for their contributions towards this release:

Deepak Surti, Prabhu Ramachandran, Robert Kern, Mark Kness, Ioannis Tziakos,
Mark Dickinson, Paul Müller, Gael Varoquaux

cheers,
Mayavi Developers

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

Gmane