This file contains 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
name=getTitle(); | |
run("Make Substack...", "channels=1"); | |
rename("Predicted object probability"); | |
proba_ID = getImageID(); | |
run("Fire"); | |
selectWindow(name); | |
run("Make Substack...", "channels=2-33"); |
This file contains 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
// = CODE DESCRIPTION = | |
// Image annotations are saved as a ROIset.zip in a '/ROI Sets' folder, so they can be re-open in Image-j | |
// The ROIset.zip saving/naming convention respect the ImageJ's BIOPLib.ijm (from PTBIOP update site). | |
// | |
// == INPUTS == | |
// A QuPath project, with annotations. | |
// | |
// == OUTPUTS == | |
// The annotations are saved as a ROIset.zip in a '/ROI Sets' folder, | |
// |
This file contains 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
// adapted from https://gist.github.com/NicoKiaru/ae00117cd6d33fea500d2867a5e669d9 | |
// | |
// = CODE DESCRIPTION = | |
// Add ROIs to ImageJ roiManager from an image with labels. | |
// | |
// == INPUTS == | |
// A label image, grey or RGB. | |
// | |
// == OUTPUTS == | |
// Rois in ImageJ roiManager. |
This file contains 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
#@File(label="Please select an UserName-Lab", style="directory") selected_dir | |
#@String() projectName | |
/* | |
* Macro to create a folder accordingly to BIOP template. | |
* | |
* | |
* | |
* git need to be installed |
This file contains 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
#@File(label= "Input composite multi channel image" ) image_path | |
#@int(label= "Channel A index") channelA | |
#@int(label= "Channel A threshold", value=5) thresholdA | |
#@int(label= "Channel B index") channelB | |
#@int(label= "Channel B threshold", value=30) thresholdB | |
// make sure everything is clean |
This file contains 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
#@File image_path | |
#@Integer(value=1) ch_idx | |
#@Boolean(value=true) closeImages | |
table_name = "FP_thresholds"; | |
open(image_path ); | |
img_name = getTitle(); | |
print(img_name); |
This file contains 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
// select an image with imcomplete labelling | |
// with first and last slice, plus some slices in the middle where you notice changes | |
#@File() image_path ; | |
// here we clear the environment | |
run("Close All"); | |
print("\\Clear"); | |
// Open image and get some infos about your file | |
open( image_path ); |
This file contains 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
/* QuPath-Script to export annotations to label tif images (e.g. to be used for stardist) | |
Use "Run for project" to export annotations for all images within a QuPath project | |
Afterwards both images and mask tiffs will be stored in the project subfolder | |
ground_truth | |
├── images | |
└── masks | |
This file contains 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
#@ File image_path | |
#@ String seriesNbr | |
#@ String (choices={"max","avg","sum","none"}) zProj | |
import org.apache.commons.io.FilenameUtils | |
import ij.* | |
import ij.plugin.ZProjector | |
import ij.io.FileSaver |
This file contains 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
// https://forum.image.sc/t/macro-function-close-others-in-groovy/44630 | |
// Using ID as proposed by @imagejan | |
import ij.WindowManager | |
#@ ImagePlus imp | |
WindowManager.getIDList() | |
.findAll{ it != imp.getID() } | |
.each{ WindowManager.getImage(it).close() } | |
null // suppress result processing by SciJava |