code: def probeLine(img, p1, p2, res=100):
      
      line = vtk.vtkLineSource()
      line.SetResolution(res)
      line.SetPoint1(p1)
      line.SetPoint2(p2)
      probeFilter = vtk.vtkProbeFilter()
      probeFilter.SetSourceData(img)
      probeFilter.SetInputConnection(line.GetOutputPort())
      probeFilter.Update()
  
      lact = Actor(probeFilter.GetOutput(), c=None)  # ScalarVisibilityOn
      lact.mapper.SetScalarRange(img.GetScalarRange())
      return lact
docs: Takes a ``vtkImageData`` and probes its scalars along a line defined by 2 points `p1` and `p2`.
  
      .. hint:: |probeLine| |probeLine.py|_