From 361870acbab4a43a3ed282714d20d90918c7ffd5 Mon Sep 17 00:00:00 2001 From: romainGuiet Date: Mon, 9 Dec 2024 12:45:33 +0100 Subject: [PATCH] update example scripts --- resources/scripts/cellpose_macro.ijm | 4 ++-- resources/scripts/cellpose_script.groovy | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/resources/scripts/cellpose_macro.ijm b/resources/scripts/cellpose_macro.ijm index 2cec30d..89ae955 100644 --- a/resources/scripts/cellpose_macro.ijm +++ b/resources/scripts/cellpose_macro.ijm @@ -1,5 +1,5 @@ -conda_env_path = "D:/conda/conda-envs/cellpose-307-gpu" +#@File(style="directory" , label="Select conda environment") conda_env_path //run("Blobs (25K)"); // uncomment to test image_title = getTitle(); -run("Cellpose ..." ,"imp="+image_title+" conda_env_path="+conda_env_path+" diameter=30 model=cyto3 model_path= ch1=1 ch2=1 additional_flags=--use_gpu" ); \ No newline at end of file +run("Cellpose ..." ,"imp="+image_title+" conda_env_path="+conda_env_path+" env_type=conda diameter=30 model=cyto3 model_path= ch1=1 ch2=1 additional_flags=--use_gpu" ); \ No newline at end of file diff --git a/resources/scripts/cellpose_script.groovy b/resources/scripts/cellpose_script.groovy index cfea21b..3503514 100644 --- a/resources/scripts/cellpose_script.groovy +++ b/resources/scripts/cellpose_script.groovy @@ -11,7 +11,7 @@ IJ.runMacro("close('\\\\Others');") // cellpose parameters def cp = new Cellpose(); -cp.conda_env_path = conda_env_path +cp.env_path = conda_env_path // Or comment the line avove and set the path manually // to locate your conda env from a terminal type "conda env list", it will return the path you can paste below //cp.conda_env_path = new File ( "D:/conda/conda_envs/cellpose/" ) ; @@ -20,7 +20,8 @@ cp.diameter = 50; cp.model = "cyto3"; cp.ch1 = 1 ; cp.ch2 = 2 ; -cp.additional_flags= "--use_gpu, --do_3D, --anisotropy, 4 , --restore_type , denoise_cyto3"; +//cp.additional_flags= "--use_gpu, --do_3D, --anisotropy, 4 , --restore_type , denoise_cyto3"; +cp.additional_flags= "--use_gpu, --restore_type , denoise_cyto3"; // cellpose run cp.run(); // get the output labels image @@ -35,4 +36,4 @@ cp_imp.setDisplayRange(0, 12); return import ch.epfl.biop.wrappers.cellpose.ij2commands.Cellpose -import ij.IJ; \ No newline at end of file +import ij.IJ;