Skip to content
Open
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
24 changes: 13 additions & 11 deletions PyReconstruct/modules/gui/main/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ def srcToZarr(self, create_new=True):
str(zarr_converter.absolute()),
"convert_zarr",
str(cores),
f"\"{self.series.src_dir}\"",
self.series.src_dir,
zarr_fp
]

Expand All @@ -421,19 +421,20 @@ def srcToZarr(self, create_new=True):
str(zarr_converter.absolute()),
"convert_zarr",
str(cores),
f"\"{self.series.src_dir}\""
self.series.src_dir
]

# Pass argv as a list on every platform, never through a shell, so paths
# read from the series file stay single literal arguments.
if os.name == 'nt':

subprocess.Popen(
convert_cmd, creationflags=subprocess.CREATE_NO_WINDOW
)

else:

convert_cmd = " ".join(convert_cmd)
subprocess.Popen(convert_cmd, shell=True, stdout=None, stderr=None)
subprocess.Popen(convert_cmd, stdout=None, stderr=None)

def changeUsername(self, new_name : str = None):
"""Edit the login name used to track history.
Expand Down Expand Up @@ -1997,7 +1998,7 @@ def exportToZarr(self):
convert_cmd = launch_prefix + [
str(zarr_converter.absolute()),
"create_ng_zarr",
f"\"{self.series.jser_fp}\""
self.series.jser_fp
]

for argname, arg in args.items():
Expand All @@ -2010,24 +2011,25 @@ def exportToZarr(self):

convert_cmd += [
"--output",
f"\"{arg}\""
str(arg)
]

else:

convert_cmd += [argname] + str(arg).split()

# Pass argv as a list on every platform, never through a shell, so paths
# read from the series file stay single literal arguments.
if os.name == 'nt':

subprocess.Popen(
convert_cmd,
creationflags=subprocess.CREATE_NO_WINDOW
)

else:

convert_cmd = " ".join(convert_cmd)
subprocess.Popen(convert_cmd, shell=True, stdout=None, stderr=None)
subprocess.Popen(convert_cmd, stdout=None, stderr=None)

# AUTOSEG FUNCTIONS TEMPORARILY REMOVED

Expand Down