daavoo / pyntcloud

pyntcloud is a Python library for working with 3D point clouds.
http://pyntcloud.readthedocs.io
MIT License
1.42k stars 224 forks source link

pyntcloud.get_filter prints to the console. #324

Closed justinmcgrath closed 2 years ago

justinmcgrath commented 2 years ago

Describe the bug Calling get_filter() on a pyntcloud object causes things to be printed to the console. Functions should not print to the console, as then it is difficult for the user to control what is displayed.

To Reproduce

import numpy as np
from pyntcloud import PyntCloud
import pandas as pd

a = np.array([[1,2,3],
              [1.1,1.9,3.2],
              [0.9,2.1,2.8]])

pc = PyntCloud(pd.DataFrame(a, columns=["x", "y", "z"]))
kdtree = pc.add_structure("kdtree")
sor_filter = pc.get_filter('SOR', kdtree_id=kdtree, k=6, z_max=1)

Expected behavior If there is no problem, nothing should be printed. Relevant information should be returned and the user chooses what to print.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.