def to_python(self, value): """ Recreate python object from db. """ if isinstance(value, CppPointCloud): return value else: temp = CppPointCloud() if value is not None and len(value) > 0: temp.serialized_data = value.__str__() return temp
def load_pcd(path): """ Load a point cloud from the pcd_file <path>. """ temp = PointCloud() temp._cpp_pointcloud = CppPointCloud.load_pcd(path) return temp