remove part of iso_surface in mayavi -


i trying find hints in documentation of mayavi without success.

in visualization of complex data remove part of computed iso_surface. e.g., have code

field =  mlab.pipeline.gaussian_splatter(data) iso = mlab.pipeline.iso_surface(field, contours=[0.07]) 

i may remove part of iso_surface explicitly explaining data limited along x, y or z doing

field.filter.model_bounds = array([-1.,  1., -1.,  1., -1., 1.]) 

but can not find way explain arbitrary directed plane. instance, limit data (1,1,1) direction.

is there way this?

you can use data_set_clipper clip data. clipper either interactive or non interactive. demonstrate non interactive version:

fld = mlab.pipeline.scalar_field(data) clip = mlab.pipeline.data_set_clipper(fld) clip.widget.widget_mode='implicitplane' clip.widget.widget.enabled=0 clip.widget.widget.normal=(1,1,1) clip.widget.widget.origin=(20,20,20) #(0,0,0) not centre corner iso = mlab.pipeline.iso_surface(clip, contours=[0.07]) 

if want clip more have put clipped data data_set_clippe:

clip2=mlab.pipeline.data_set_clipper(clip) 

however, not satisfied approach uses lot of resources. if has better solution glad see it.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -