def METHOD_NAME(self):
    self.PrintLog("Using thresholding to remove endcaps.")
    th = vtk.vtkThreshold()
    th.SetInputData(self.Surface)
    th.SetInputArrayToProcess(0, 0, 0, 1, self.CellEntityIdsArrayName)
    th.ThresholdBetween(self.EndcapsThresholdLow, self.EndcapsThresholdHigh)
    th.Update()
    gf = vtk.vtkGeometryFilter()
    gf.SetInputConnection(th.GetOutputPort())
    gf.Update()
    self.DoubleSurface = gf.GetOutput()