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
import java.awt.Color | |
import ij.process.ColorProcessor | |
import ij.process.AutoThresholder | |
import ij.plugin.filter.ThresholdToSelection | |
import ij.IJ | |
// modified from : | |
// https://petebankhead.github.io/qupath/scripting/2018/03/08/script-imagej-to-qupath.html | |
// This scripts allow threholding of a color deconvoltuion channel ('DAB', 'Hematoxylin',...) |
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
macro "Assess Bleaching [F2]" { | |
// Measure Half time and relate it to number of frames | |
run("Close All"); | |
// Get the contents of the clipboard as text | |
text = String.paste; | |
// Split the lines and then the rows so as to get the X and Y coordinates | |
line = split(text, "\n"); | |
n = line.length; | |
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
// This workflow represents the end result that can be obtain by following Dr. Sara McArdle's "Running a complex project in QuPath" tutorial at https://www.youtube.com/watch?v=7AvuzAgHk5o | |
// @author Olivier Burri | |
// Prepare the image type | |
setImageType('FLUORESCENCE') | |
// Clean up the current image data, as we assume we will be starting from scratch | |
clearAllObjects() | |
// Directly create detections from a previously created pixel classifier called "Ck" |
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
#@ File imagesDirectory (label="Directory with images", style="directory") | |
#@ String extension (label="Image extension", value="tif") | |
#@ String quPathExe (label="Path to QuPath Executable", value="C:/QuPath-0.3.2/QuPath-0.3.2 (console).exe") | |
import groovyx.gpars.GParsPool | |
def folder = imagesDirectory | |
def convertedFolder = new File( folder.getParent(), "converted") | |
convertedFolder.mkdirs() |
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
#@ File saveLocation (label="Location of MIDI save file") | |
/** | |
* Testing Spots to Sound using MIDI | |
* Each hit is given a unique note based on some metric and intensity is related to volume | |
* | |
* = AUTHOR INFORMATION = | |
* Code written by Olivier Burri, EPFL - SV - PTECH - BIOP | |
* for Samuel Vernon, McCabe Lab | |
* 2022.08.23 |
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
// Save the whole Image | |
def downsample = 4 | |
// Save the whole Image | |
def request = RegionRequest.createInstance( getCurrentServer(), downsample ) | |
def imageData = getCurrentImageData() |
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
// Create cytoplasm ROI before adding it to the Roi Manager? | |
def getcytoplasm = true | |
// START OF SCRIPT | |
// Use ImageJ's RoiManager | |
def rm = RoiManager.getInstance() == null ? new RoiManager() : RoiManager.getInstance() | |
rm,.reset() |
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
// Export Rendered view of S1HL as open in QuPath with metadata tag in file name | |
// Author: Olivier Burri | |
// originally for Julie Meystre, LNMC | |
// Date: 2022 03 11 | |
// NOTE: Make sure that all settings are as you want them on a currently open image (Channels, hidden Pathclasses, Annotation names, ...) before you start, as your current display and layer settings will be applied to all image if you use "Run for Project" | |
def downsample = 5 | |
def regionClass = "S1HL" | |
def metadataName = "Distance to midline" |
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
/** | |
* Use StarDist in TrackMate from the latest version and export results | |
* Using a custom StarDist Model | |
* Author: Olivier Burri, EPFL SV PTECH BIOP | |
* Last Modification: March 2022 | |
* | |
* Due to the simple nature of this code, no copyright is applicable | |
* | |
*/ |
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
// You are a smart one | |
// But we did not share a solution to this code :) | |
// Here it is again just for you: | |
// You are a smart one | |
// But we did not share a solution to this code :) | |
// Here it is again just for you: | |
run("Set Measurements...", "area mean standard modal min limit display redirect=None decimal=3"); |