class_docstr: Internal class to contain picking utilities.
class_docstr_tok: ["Internal","class","to","contain","picking","utilities","."]
docstr: Enable rectangle based cell picking through the scene.
  
  Parameters
  ----------
  callback : callable, optional
      When input, calls this callable after a selection is made.
      The picked cells is the only passed argument.
  
  show : bool, default: True
      Show the selection interactively.
  
  style : str, default: "wireframe"
      Visualization style of the selection frustum. One of the
      following: ``style='surface'``, ``style='wireframe'``, or
      ``style='points'``.
  
  line_width : float, default: 5.0
      Thickness of selected mesh edges.
  
  color : ColorLike, default: "pink"
      The color of the selected frustum when shown.
  
  show_message : bool | str, default: True
      Show the message about how to use the cell picking tool. If this
      is a string, that will be the message shown.
  
  font_size : int, default: 18
      Sets the font size of the message.
  
  start : bool, default: True
      Automatically start the cell selection tool.
  
  show_frustum : bool, default: False
      Show the frustum in the scene.
  
  **kwargs : dict, optional
      All remaining keyword arguments are used to control how
      the selection frustum is interactively displayed.
docstr_tok: ["Enable","rectangle","based","cell","picking","through","the","scene",".","Parameters","--","--","--","--","--","callback",":","callable",",","optional","When","input",",","calls","this","callable","after","a","selection","is","made",".","The","picked","cells","is","the","only","passed","argument",".","show",":","bool",",","default",":","True","Show","the","selection","interactively",".","style",":","str",",","default",":","``","wireframe","''","Visualization","style","of","the","selection","frustum",".","One","of","the","following",":","``","style='surface","'","``",",","``","style='wireframe","'","``",",","or","``","style='points","'","``",".","line_width",":","float",",","default",":","5.0","Thickness","of","selected","mesh","edges",".","color",":","ColorLike",",","default",":","``","pink","''","The","color","of","the","selected","frustum","when","shown",".","show_message",":","bool","|","str",",","default",":","True","Show","the","message","about","how","to","use","the","cell","picking","tool",".","If","this","is","a","string",",","that","will","be","the","message","shown",".","font_size",":","int",",","default",":","18","Sets","the","font","size","of","the","message",".","start",":","bool",",","default",":","True","Automatically","start","the","cell","selection","tool",".","show_frustum",":","bool",",","default",":","False","Show","the","frustum","in","the","scene",".","*","*","kwargs",":","dict",",","optional","All","remaining","keyword","arguments","are","used","to","control","how","the","selection","frustum","is","interactively","displayed","."]
code: def enable_rectangle_through_picking(
      self,
      callback=None,
      show=True,
      style="wireframe",
      line_width=5,
      color="pink",
      show_message=True,
      font_size=18,
      start=False,
      show_frustum=False,
      **kwargs,
  ):
      """Enable rectangle based cell picking through the scene.
  
      Parameters
      ----------
      callback : callable, optional
          When input, calls this callable after a selection is made.
          The picked cells is the only passed argument.
  
      show : bool, default: True
          Show the selection interactively.
  
      style : str, default: "wireframe"
          Visualization style of the selection frustum. One of the
          following: ``style='surface'``, ``style='wireframe'``, or
          ``style='points'``.
  
      line_width : float, default: 5.0
          Thickness of selected mesh edges.
  
      color : ColorLike, default: "pink"
          The color of the selected frustum when shown.
  
      show_message : bool | str, default: True
          Show the message about how to use the cell picking tool. If this
          is a string, that will be the message shown.
  
      font_size : int, default: 18
          Sets the font size of the message.
  
      start : bool, default: True
          Automatically start the cell selection tool.
  
      show_frustum : bool, default: False
          Show the frustum in the scene.
  
      **kwargs : dict, optional
          All remaining keyword arguments are used to control how
          the selection frustum is interactively displayed.
  
      """
      self_ = weakref.ref(self)
  
      def finalize(picked):  # numpydoc ignore=GL08
          if picked is None:
              # Indicates invalid pick
              with self_().iren.poked_subplot():
                  self_()._clear_picking_representations()
              return
  
          self._picked_cell = picked
  
          if show:
              # Use try in case selection is empty
              with self_().iren.poked_subplot():
                  _kwargs = kwargs.copy()
                  self_().add_mesh(
                      picked,
                      name=_kwargs.pop(
                          "name", PICKED_REPRESENTATION_NAMES["through"]
                      ),
                      style=style,
                      color=color,
                      line_width=line_width,
                      pickable=_kwargs.pop("pickable", False),
                      reset_camera=_kwargs.pop("reset_camera", False),
                      **_kwargs,
                  )
  
          if callback is not None:
              _poked_context_callback(
                  self_(), callback, self_().picked_cells
              )
  
      def through_pick_callback(selection):  # numpydoc ignore=GL08
          picked = pyvista.MultiBlock()
          renderer = self_().iren.get_poked_renderer()
          for actor in renderer.actors.values():
              if actor.GetMapper() and actor.GetPickable():
                  input_mesh = pyvista.wrap(
                      actor.GetMapper().GetInputAsDataSet()
                  )
                  input_mesh.cell_data["orig_extract_id"] = np.arange(
                      input_mesh.n_cells
                  )
                  extract = _vtk.vtkExtractGeometry()
                  extract.SetInputData(input_mesh)
                  extract.SetImplicitFunction(selection.frustum)
                  extract.Update()
                  picked.append(pyvista.wrap(extract.GetOutput()))
  
          if picked.n_blocks == 0:
              self_()._picked_cell = None
          elif picked.combine().n_cells < 1:
              self_()._picked_cell = None
          elif picked.n_blocks == 1:
              self_()._picked_cell = picked[0]
          else:
              self_()._picked_cell = picked
  
          finalize(self_()._picked_cell)
  
      self.enable_rectangle_picking(
          callback=through_pick_callback,
          show_message=show_message,
          font_size=font_size,
          show_frustum=show_frustum,
          start=start,
          style=style,
          color=color,
      )
  
imports: from functools import partial, wraps
  from typing import Tuple, cast
  import warnings
  import weakref
  import numpy
  import pyvista
  from pyvista.core.errors import PyVistaDeprecationWarning
  from pyvista.core.utilities.misc import try_callback
  from .None import _vtk
  from .composite_mapper import CompositePolyDataMapper
  from .errors import PyVistaPickingError
  from .opts import ElementType, PickerType
label_desc: Use image node_id 10 for calling the PickingMethods obj's underlying member method code with example usage: obj.enable_rectangle_through_picking(callback, show, style, line_width, color, show_message, font_size, start, show_frustum) without return types