Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions multipers/io.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ def scc_reduce_from_str_to_slicer(
full_resolution: bool
dimension: int, presentation dimension to consider
clear: bool, removes temporary files if True
id: str, temporary files are of this id, allowing for multiprocessing
verbose: bool
backend: "mpfree", "multi_chunk" or "2pac"
"""
Expand Down Expand Up @@ -270,15 +269,12 @@ def rhomboid_tiling_to_slicer(
int k_max,
int degree = -1,
bool reduce=True,
id:Optional[str] = None,
bool clear:bool = True,
bool verbose:bool=False,
bool multi_chunk = False,
):
"""TODO"""
if id is None:
id = str(threading.get_native_id())
global input_path, output_path, pathes
global pathes
backend = "rhomboid_tiling"
_init_external_softwares(requires=[backend])
if point_cloud.ndim != 2 or not point_cloud.shape[1] in [2,3]:
Expand All @@ -295,7 +291,7 @@ def rhomboid_tiling_to_slicer(
if verbose:
print(command)
os.system(command)
slicer._build_from_scc_file(path=output_path+id, shift_dimension=-1 if degree <= 0 else degree-1 )
slicer._build_from_scc_file(path=output_path, shift_dimension=-1 if degree <= 0 else degree-1 )



Expand Down
4 changes: 2 additions & 2 deletions multipers/slicer.pyx.tp
Original file line number Diff line number Diff line change
Expand Up @@ -877,11 +877,11 @@ def minimal_presentation(
_init_external_softwares(requires=[backend])
if len(degrees)>0:
def todo(int degree):
return minimal_presentation(slicer, degree=degree, backend=backend, slicer_backend=slicer_backend, vineyard=vineyard, id=id, **minpres_kwargs)
return minimal_presentation(slicer, degree=degree, backend=backend, slicer_backend=slicer_backend, vineyard=vineyard, **minpres_kwargs)
return tuple(
Parallel(n_jobs=n_jobs, backend="threading")(delayed(todo)(d) for d in degrees)
)
# return tuple(minimal_presentation(slicer, degree=d, backend=backend, slicer_backend=slicer_backend, vineyard=vineyard, id=id, **minpres_kwargs) for d in degrees)
# return tuple(minimal_presentation(slicer, degree=d, backend=backend, slicer_backend=slicer_backend, vineyard=vineyard, **minpres_kwargs) for d in degrees)
assert degree>=0, f"Degree not provided."
if not np.any(slicer.get_dimensions() == degree):
return type(slicer)()
Expand Down