Skip to content
Snippets Groups Projects
Commit 4e908b7e authored by Christian Kento Rasmussen's avatar Christian Kento Rasmussen
Browse files

removed print

parent 45c29070
No related branches found
No related tags found
1 merge request!102Conv zarr tiff folders
...@@ -38,10 +38,7 @@ class Convert: ...@@ -38,10 +38,7 @@ class Convert:
output_ext = get_file_extension(output_path) output_ext = get_file_extension(output_path)
output_path = stringify_path(output_path) output_path = stringify_path(output_path)
print("sdf", os.path.isdir(input_path) , input_ext, output_ext) if os.path.isfile(input_path):
if os.path.isfile(input_path) and output_ext:
match input_ext, output_ext: match input_ext, output_ext:
case (".tif", ".zarr") | (".tiff", ".zarr"): case (".tif", ".zarr") | (".tiff", ".zarr"):
return self.convert_tif_to_zarr(input_path, output_path) return self.convert_tif_to_zarr(input_path, output_path)
...@@ -59,10 +56,8 @@ class Convert: ...@@ -59,10 +56,8 @@ class Convert:
case (".zarr", ".nii.gz"): case (".zarr", ".nii.gz"):
return self.convert_zarr_to_nifti(input_path, output_path, compression=True) return self.convert_zarr_to_nifti(input_path, output_path, compression=True)
case (".zarr", ""): case (".zarr", ""):
print("1")
self.convert_zarr_to_tiff_stack(input_path, output_path) self.convert_zarr_to_tiff_stack(input_path, output_path)
case ("", ".zarr"): case ("", ".zarr"):
print("2")
return self.convert_tiff_stack_to_zarr(input_path, output_path) return self.convert_tiff_stack_to_zarr(input_path, output_path)
case _: case _:
raise ValueError("Unsupported file format") raise ValueError("Unsupported file format")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment