def Execute(self):

        if self.Surface == None:
            self.PrintError('Error: No input surface.')

        if self.PolyBall == None:
            self.PrintError('Error: No input polyball.')

        evaluationArray = vtk.vtkDoubleArray()
        evaluationArray.SetName(self.EvaluationArrayName)
        evaluationArray.SetNumberOfComponents(1)
        evaluationArray.SetNumberOfTuples(self.Surface.GetNumberOfPoints())

        polyball = None
        if self.Type == "polyball":
            polyball = vtkvmtk.vtkvmtkPolyBall()
        elif self.Type == "tubes":
            polyball = vtkvmtk.vtkvmtkPolyBallLine()
        polyball.SetInputData(self.PolyBall)
        polyball.SetPolyBallRadiusArrayName(self.RadiusArrayName)

        for i in range(self.Surface.GetNumberOfPoints()):
            point = self.Surface.GetPoint(i)
            value = polyball.EvaluateFunction(point)
            evaluationArray.SetValue(i, value)

        self.Surface.GetPointData().AddArray(evaluationArray)
    def Execute(self):

        if self.Surface == None:
            self.PrintError("Error: No input surface.")

        if self.PolyBall == None:
            self.PrintError("Error: No input polyball.")

        evaluationArray = vtk.vtkDoubleArray()
        evaluationArray.SetName(self.EvaluationArrayName)
        evaluationArray.SetNumberOfComponents(1)
        evaluationArray.SetNumberOfTuples(self.Surface.GetNumberOfPoints())

        polyball = None
        if self.Type == "polyball":
            polyball = vtkvmtk.vtkvmtkPolyBall()
        elif self.Type == "tubes":
            polyball = vtkvmtk.vtkvmtkPolyBallLine()
        polyball.SetInputData(self.PolyBall)
        polyball.SetPolyBallRadiusArrayName(self.RadiusArrayName)

        for i in xrange(self.Surface.GetNumberOfPoints()):
            point = self.Surface.GetPoint(i)
            value = polyball.EvaluateFunction(point)
            evaluationArray.SetValue(i, value)

        self.Surface.GetPointData().AddArray(evaluationArray)