Skip to content

Commit 6125595

Browse files
committed
fix(run_imarisconvert): set default output folder to file's directory
* Updated the default output folder in run_imarisconvert function to the directory of the input file if not specified. * This change ensures that converted files are saved in a more intuitive location.
1 parent f6804ee commit 6125595

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/imcflibs/imagej/misc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ def locate_latest_imaris(paths_to_check=None):
669669
return imaris_paths[-1]
670670

671671

672-
def run_imarisconvert(file_path, pixel_calibration=None, output_folder=None):
672+
def run_imarisconvert(file_path, pixel_calibration=None, output_folder=""):
673673
"""Convert a given file to Imaris format using ImarisConvert.
674674
675675
Convert the input image file to Imaris format (Imaris5) using the
@@ -696,7 +696,7 @@ def run_imarisconvert(file_path, pixel_calibration=None, output_folder=None):
696696
imaris_path = locate_latest_imaris()
697697

698698
if not output_folder:
699-
output_folder = os.getcwd()
699+
output_folder = os.path.dirname(file_path)
700700

701701
command = 'ImarisConvert.exe -i "%s" -of Imaris5 -o "%s"' % (
702702
file_path,

0 commit comments

Comments
 (0)