Created
October 21, 2025 07:24
-
-
Save romainGuiet/bc3ffbc951e8e8b0733dfb66327e5879 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //PARAMETERS | |
| nuclei_ch = 3 | |
| measure_ch = 1 | |
| conda_env_path = "D:/conda/conda-envs/cellpose-3111" // replace with the path to your cellpose environment | |
| image_title = getTitle(); | |
| // do some cleaning | |
| roiManager("reset"); | |
| run("Clear Results"); | |
| close("\\Others"); | |
| // duplicate your nuclei channel | |
| run("Duplicate...", "duplicate title=nuclei channels="+nuclei_ch); | |
| // run cellpose from Fiji (PTBIOP update site , github : https://github.com/BIOP/ijl-utilities-wrappers | |
| run("Cellpose ..." ,"imp=nuclei conda_env_path="+conda_env_path+" env_type=conda diameter=30 model=cyto3 model_path= ch1=1 ch2=1 additional_flags=--use_gpu" ); | |
| // convert label image to ROIs (also from (PTBIOP update site , https://github.com/BIOP/ijp-LaRoMe ) | |
| run("Label image to ROIs", ""); | |
| // Measure | |
| selectImage(image_title); | |
| Stack.setChannel(measure_ch); | |
| roiManager("Show All"); | |
| roiManager("Measure"); | |
| // prepapre output image | |
| run("Flatten"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment