class_docstr: Base algorithm to preserve type.
  
  Parameters
  ----------
  nInputPorts : int, default: 1
      Number of input ports for the algorithm.
  
  nOutputPorts : int, default: 1
      Number of output ports for the algorithm.
docstr: Get input data object.
  
  This will convert ``vtkPointSet`` to ``vtkPolyData``.
  
  Parameters
  ----------
  inInfo : vtk.vtkInformation
      The information object associated with the input port.
  
  port : int
      The index of the input port.
  
  idx : int
      The index of the data object within the input port.
  
  Returns
  -------
  _vtk.vtkDataObject
      The input data object.
code: def GetInputData(self, inInfo, port, idx):
      """
      Get input data object.
  
      This will convert ``vtkPointSet`` to ``vtkPolyData``.
  
      Parameters
      ----------
      inInfo : vtk.vtkInformation
          The information object associated with the input port.
  
      port : int
          The index of the input port.
  
      idx : int
          The index of the data object within the input port.
  
      Returns
      -------
      _vtk.vtkDataObject
          The input data object.
      """
      inp = wrap(
          _vtk.VTKPythonAlgorithmBase.GetInputData(
              self, inInfo, port, idx
          )
      )
      if isinstance(inp, pyvista.PointSet):
          return inp.cast_to_polydata()
      return inp
  
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 PreserveTypeAlgorithmBase obj's underlying member method code with example usage: obj.GetInputData(inInfo, port, idx) and returns: inp, inp