class_docstr: Algorithm to control active scalars.
  
  The output of this filter is a shallow copy of the input data
  set with the active scalars set as specified.
  
  Parameters
  ----------
  name : str
      Name of scalars used to set as active on the output mesh.
      Accepts a string name of an array that is present on the mesh.
      Array should be sized as a single vector.
  
  preference : str, default: 'point'
      When ``mesh.n_points == mesh.n_cells`` and setting
      scalars, this parameter sets how the scalars will be
      mapped to the mesh.  The default, ``'point'``, causes the
      scalars to be associated with the mesh points.  Can be
      either ``'point'`` or ``'cell'``.
docstr: Perform algorithm execution.
  
  Parameters
  ----------
  _request : vtk.vtkInformation
      The request object.
  inInfo : vtk.vtkInformationVector
      Information about the input data.
  outInfo : vtk.vtkInformationVector
      Information about the output data.
  
  Returns
  -------
  int
      1 on success.
code: def RequestData(self, _request, inInfo, outInfo):
      """Perform algorithm execution.
  
      Parameters
      ----------
      _request : vtk.vtkInformation
          The request object.
      inInfo : vtk.vtkInformationVector
          Information about the input data.
      outInfo : vtk.vtkInformationVector
          Information about the output data.
  
      Returns
      -------
      int
          1 on success.
  
      """
      try:
          inp = wrap(self.GetInputData(inInfo, 0, 0))
          out = self.GetOutputData(outInfo, 0)
          output = inp.copy()
          if output.n_arrays:
              output.set_active_scalars(
                  self.scalars_name, preference=self.preference
              )
          out.ShallowCopy(output)
      except Exception as e:  # pragma: no cover
          traceback.print_exc()
          raise e
      return 1
  
imports: import traceback
  import numpy
  import pyvista
  from pyvista.core.errors import PyVistaPipelineError
  from pyvista.core.utilities.helpers import wrap
  from pyvista.plotting import _vtk
label_desc: Use image node_id 2 for calling the ActiveScalarsAlgorithm obj's underlying member method code with example usage: obj.RequestData(_request, inInfo, outInfo) and returns: int