""" A mostly-general Traits UI editor for viewing things in TVTK scenes. """ # Authors: Robert Kern <robert.kern [at] gmail.com> # Prabhu Ramachandran <prabhu [at] aero.iitb.ac.in> # Copyright (c) 2007, Enthought, Inc. # License: BSD Style. # Import the toolkit specific version. from tvtk.pyface.toolkit import toolkit_object ActorEditor = toolkit_object('actor_editor:ActorEditor')
"""A VTK interactor scene which provides a convenient toolbar that allows the user to set the camera view, turn on the axes indicator etc. """ # Authors: Prabhu Ramachandran <*****@*****.**>, # Dave Peterson <*****@*****.**> # Copyright (c) 2006, Enthought, Inc. # License: BSD Style. # Import the toolkit specific version. from tvtk.pyface.toolkit import toolkit_object DecoratedScene = toolkit_object('decorated_scene:DecoratedScene')
#------------------------------------------------------------------------------ # Copyright (c) 2005, Enthought, Inc. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE.txt and may be redistributed only # under the conditions described in the aforementioned license. The license # is also available online at http://www.enthought.com/licenses/BSD.txt # Thanks for using Enthought open source! # # Author: Enthought, Inc. # Description: <Enthought pyface package component> #------------------------------------------------------------------------------ """A VTK interactor scene widget for the PyFace wxPython backend. See the class docs for more details. """ # Author: Prabhu Ramachandran <*****@*****.**> # Copyright (c) 2004-2007, Enthought, Inc. # License: BSD Style. # Import the toolkit specific version. from tvtk.pyface.toolkit import toolkit_object Scene = toolkit_object('scene:Scene')
import numpy as np from traits.api import HasTraits, Instance from traitsui.api import View, Item, HGroup, VGroup from tvtk.api import tvtk from tvtk.pyface.toolkit import toolkit_object import wx from .._wxgui.app import get_app from .._wxgui.frame import EelbrainFrame from .._wxutils import ID, Icon SCENE_NAME = 'scene_%i' SURFACES = ('inflated', 'pial', 'smoothwm') # undecorated scene Scene = toolkit_object('scene:Scene') class MayaviView(HasTraits): view = Instance(View) def __init__(self, width, height, n_rows, n_columns): HasTraits.__init__(self) n_scenes = n_rows * n_columns if n_scenes < 1: raise ValueError("n_rows=%r, n_columns=%r" % (n_rows, n_columns)) self.scenes = tuple(MlabSceneModel() for _ in xrange(n_scenes)) for i, scene in enumerate(self.scenes):
"""A `SceneEditor` for the `SceneModel`. """ # Authors: Prabhu Ramachandran <prabhu [at] aero.iitb.ac.in> # Robert Kern <robert.kern [at] gmail.com> # # Copyright (c) 2007, Enthought, Inc. # License: BSD Style. # Import the toolkit specific version. from tvtk.pyface.toolkit import toolkit_object SceneEditor = toolkit_object('scene_editor:SceneEditor')
"""A `SceneEditor` for the `SceneModel`. """ # Authors: Prabhu Ramachandran <prabhu [at] aero.iitb.ac.in> # Robert Kern <robert.kern [at] gmail.com> # # Copyright (c) 2007, Enthought, Inc. # License: BSD Style. # Import the toolkit specific version. from tvtk.pyface.toolkit import toolkit_object SceneEditor = toolkit_object("scene_editor:SceneEditor")