Traitsui, combining array and Range.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Traitsui, combining array and Range.

Jan Kurzawski
Hi all,

I want to change the position of scalar_cut_plane in mayavi and make a slider that will allow me to choose the x value and move the cut_plane. Unfortunately i noticed that when I am changing the position manualy and look at record log this is what i get 

scalar_cut_plane.implicit_plane.widget.origin = array([ 120.04980529,  128.5       ,  128.5       ])
scene.scene.do_render = True

So as you can see this is an array.

I want to change just the first value but when i try to initialize the parameter like this =

origin=numpy.array(Range(1,128.5,256),128.5,128.5)) it says that i need and array shape (3,0)

On the other hand when i use:

origin = Array(np.float64, (3,)) this is displayed as the array in gui so i can put the value in the table but i want a slider.

Any suggesestions will be great.

I can ofcourse use image_plane_widget and change the slide_index(one value not an array) but there are some issues with rendering the surface and planes.

Thanks for any help!

Enthought-Dev mailing list
[hidden email]