def bounds(self):
        """ Bounds of all actors present in the rendering window """
        the_bounds = [np.inf, -np.inf, np.inf, -np.inf, np.inf, -np.inf]

        def _update_bounds(bounds):
            def update_axis(ax):
                if bounds[ax*2] < the_bounds[ax*2]:
                    the_bounds[ax*2] = bounds[ax*2]
                if bounds[ax*2+1] > the_bounds[ax*2+1]:
                    the_bounds[ax*2+1] = bounds[ax*2+1]
            for ax in range(3):
                update_axis(ax)
            return

        for actor in self._actors.values():
            if isinstance(actor, vtk.vtkCubeAxesActor):
                continue
            if ( hasattr(actor, 'GetBounds') and actor.GetBounds() is not None
                 and id(actor) != id(self.bounding_box_actor)):
                _update_bounds(actor.GetBounds())

        return the_bounds
def bounds ( self ) : the_bounds = [ np . inf , - np . inf , np . inf , - np . inf , np . inf , - np . inf ] def _update_bounds ( bounds ) : def update_axis ( ax ) : if bounds [ ax * 2 ] < the_bounds [ ax * 2 ] : the_bounds [ ax * 2 ] = bounds [ ax * 2 ] if bounds [ ax * 2 + 1 ] > the_bounds [ ax * 2 + 1 ] : the_bounds [ ax * 2 + 1 ] = bounds [ ax * 2 + 1 ] for ax in range ( 3 ) : update_axis ( ax ) return for actor in self . _actors . values ( ) : if isinstance ( actor , vtk . vtkCubeAxesActor ) : continue if ( hasattr ( actor , 'GetBounds' ) and actor . GetBounds ( ) is not None and id ( actor ) != id ( self . bounding_box_actor ) ) : _update_bounds ( actor . GetBounds ( ) ) return the_bounds
Bounds of all actors present in the rendering window