# Path: pcloudpy/core/filters/base.py
# class FilterBase(BaseObject):
#     """
#     Base Class for all Filter Objects
# 
#     Attributes
#     ----------
#     input_: vtkPolyData
#         Input Data  to be filtered
# 
#     output_: vtkPolyData
#         Output Data
# 
#     """
# 
#     def __init__(self):
# 
#         self.input_ = None
#         self.output_ = None
# 
#     def set_input(self, input_data):
# 
#         """
#         set input data
# 
#         Parameters
#         ----------
#         input-data : vtkPolyData
# 
#         Returns
#         -------
#         is_valid: bool
#             Returns True if the input_data is valid for processing
# 
#         """
#         if isinstance(input_data, vtkPolyData):
#             self.input_ = input_data
#             return True
#         else:
#             return False
# 
# 
#     def get_output(self):
# 
#         if self.output_:
#             return self.output_
# 
#     def update(self):
#         pass
# 
# Path: pcloudpy/core/io/converters.py
# def get_points_normals_from(polydata):
# 
#     nodes_vtk_array = polydata.GetPoints().GetData()
#     array = vtk_to_numpy(nodes_vtk_array)
# 
#     numberArrays = polydata.GetPointData().GetNumberOfArrays()
#     for i in range(numberArrays):
#         if polydata.GetPointData().GetArrayName(i) == "Normals":
#             array_normals = vtk_to_numpy(polydata.GetPointData().GetScalars("Normals"))
#             return array, array_normals
#     else:
#         raise Exception("No available Normals")
# 
# def get_polydata_from(points, tr_re):
# 
#     numberPoints = len(points)
#     Points = vtkPoints()
#     ntype = get_numpy_array_type(Points.GetDataType())
#     points_vtk = numpy_to_vtk(np.asarray(points, order='C',dtype=ntype), deep=1)
#     Points.SetNumberOfPoints(numberPoints)
#     Points.SetData(points_vtk)
# 
#     Triangles = vtkCellArray()
#     for item in tr_re:
#         Triangle = vtkTriangle()
#         Triangle.GetPointIds().SetId(0,item[0])
#         Triangle.GetPointIds().SetId(1,item[1])
#         Triangle.GetPointIds().SetId(2,item[2])
#         Triangles.InsertNextCell(Triangle)
# 
#     polydata = vtkPolyData()
#     polydata.SetPoints(Points)
#     polydata.SetPolys(Triangles)
# 
#     polydata.Modified()
#     polydata.Update()
# 
#     return polydata


import numpy as np
from vtk import vtkPolyData
from pcloudpy.core.filters.base import FilterBase
from ..io.converters import get_points_normals_from, get_polydata_from
from pypoisson import poisson_reconstruction
        self.full_depth = full_depth
        self.scale = scale
        self.samples_per_node=samples_per_node
        self.cg_depth=cg_depth
        self.enable_polygon_mesh=enable_polygon_mesh
        self.enable_density = enable_density

    def set_input(self, input_data):
        """
        set input data

        Parameters
        ----------
        input-data : vtkPolyData

        Returns
        -------
        is_valid: bool
            Returns True if the input_data is valid for processing

        """
        if isinstance(input_data, vtkPolyData):
            super(ScreenedPoisson, self).set_input(input_data)
            return True
        else:
            return False


    def update(self):


# Path: pcloudpy/core/filters/base.py
# class FilterBase(BaseObject):
#     """
#     Base Class for all Filter Objects
# 
#     Attributes
#     ----------
#     input_: vtkPolyData
#         Input Data  to be filtered
# 
#     output_: vtkPolyData
#         Output Data
# 
#     """
# 
#     def __init__(self):
# 
#         self.input_ = None
#         self.output_ = None
# 
#     def set_input(self, input_data):
# 
#         """
#         set input data
# 
#         Parameters
#         ----------
#         input-data : vtkPolyData
# 
#         Returns
#         -------
#         is_valid: bool
#             Returns True if the input_data is valid for processing
# 
#         """
#         if isinstance(input_data, vtkPolyData):
#             self.input_ = input_data
#             return True
#         else:
#             return False
# 
# 
#     def get_output(self):
# 
#         if self.output_:
#             return self.output_
# 
#     def update(self):
#         pass
# 
# Path: pcloudpy/core/io/converters.py
# def get_points_normals_from(polydata):
# 
#     nodes_vtk_array = polydata.GetPoints().GetData()
#     array = vtk_to_numpy(nodes_vtk_array)
# 
#     numberArrays = polydata.GetPointData().GetNumberOfArrays()
#     for i in range(numberArrays):
#         if polydata.GetPointData().GetArrayName(i) == "Normals":
#             array_normals = vtk_to_numpy(polydata.GetPointData().GetScalars("Normals"))
#             return array, array_normals
#     else:
#         raise Exception("No available Normals")
# 
# def get_polydata_from(points, tr_re):
# 
#     numberPoints = len(points)
#     Points = vtkPoints()
#     ntype = get_numpy_array_type(Points.GetDataType())
#     points_vtk = numpy_to_vtk(np.asarray(points, order='C',dtype=ntype), deep=1)
#     Points.SetNumberOfPoints(numberPoints)
#     Points.SetData(points_vtk)
# 
#     Triangles = vtkCellArray()
#     for item in tr_re:
#         Triangle = vtkTriangle()
#         Triangle.GetPointIds().SetId(0,item[0])
#         Triangle.GetPointIds().SetId(1,item[1])
#         Triangle.GetPointIds().SetId(2,item[2])
#         Triangles.InsertNextCell(Triangle)
# 
#     polydata = vtkPolyData()
#     polydata.SetPoints(Points)
#     polydata.SetPolys(Triangles)
# 
#     polydata.Modified()
#     polydata.Update()
# 
#     return polydata


# Path: pcloudpy/core/filters/ScreenedPoisson.py
import numpy as np
from vtk import vtkPolyData
from pcloudpy.core.filters.base import FilterBase
from ..io.converters import get_points_normals_from, get_polydata_from
from pypoisson import poisson_reconstruction

        self.full_depth = full_depth
        self.scale = scale
        self.samples_per_node=samples_per_node
        self.cg_depth=cg_depth
        self.enable_polygon_mesh=enable_polygon_mesh
        self.enable_density = enable_density

    def set_input(self, input_data):
        """
        set input data

        Parameters
        ----------
        input-data : vtkPolyData

        Returns
        -------
        is_valid: bool
            Returns True if the input_data is valid for processing

        """
        if isinstance(input_data, vtkPolyData):
            super(ScreenedPoisson, self).set_input(input_data)
            return True
        else:
            return False


    def update(self):


        points, normals = get_points_normals_from(self.input_)