Skip to content

Instantly share code, notes, and snippets.

@CellKai
CellKai / segment-twice.groovy
Last active September 5, 2018 10:41
QuPath script that segments two populations of cells based on different channels
import static qupath.lib.scripting.QPEx.*
setImageType('FLUORESCENCE');
// ch1 = A594 (PVcells, cell staining), ch2 = a488 (cell stain to identify brain region layer 4, do not quantify), ch3 = dapi
// make sure all regions are selected so measurments are performed within them
selectAnnotations();
// run the watershed segmentation on channel 4 (dapi), get nucleus and cell objects
runPlugin('qupath.imagej.detect.nuclei.WatershedCellDetection', '{"detectionImageFluorescence": 3, "requestedPixelSizeMicrons": 0.0, "backgroundRadiusMicrons": 8.0, "medianRadiusMicrons": 0.0, "sigmaMicrons": 1.5, "minAreaMicrons": 10.0, "maxAreaMicrons": 400.0, "threshold": 100.0, "watershedPostProcess": true, "cellExpansionMicrons": 5.0, "includeNuclei": true, "smoothBoundaries": true, "makeMeasurements": true}');
@CellKai
CellKai / qupath-imcf-default-settings.reg
Last active July 27, 2018 17:45
batch script to start QuPath with defined configuration
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\JavaSoft\Prefs\io.github.qupath]
"qupath/Stylesheet"="/Modena /Dark"
"last/Update/Check"="1532698450285"
"do/Auto/Update/Check"="false"
"max/Memory/M/B"="6000"
"qupath/Setup/Value"="1"
"default/Path/Classes"="r/O0/A/B/X/Ny/A/B/Nq/Y/X/Zh/Ln/V0a/Wwu/Q/X/Jy/Y/Xl/Ma/X/N0e/I/H/S/H/Zn/H/Y/Z0/D/A/A/F/J/A/A/Rza/Xple/H/A/A/A/A/A/Hdw/Q/A/A/A/A/Hc3/I/A/J/H/F1c/G/F0a/C5sa/W/Iub2/Jq/Z/W/N0cy5jb/G/Fzc2/Vz/Ll/Bhd/Gh/Db/G/Fzcw/A/A/A/A/A/A/A/A/A/B/Ag/A/D/T/A/A/I/Y29sb3/J/S/R0/J0/A/B/N/Mam/F2/Y/S9s/Y/W5n/L0lud/G/Vn/Z/X/I7/T/A/A/Ebm/Ft/Z/X/Q/A/Ekxq/Y/X/Zh/L2xhbmcv/U3/Rya/W5n/O0w/A/C3/Bhcm/Vud/E/Ns/Y/X/Nzd/A/Am/T/H/F1c/G/F0a/C9sa/W/Ivb2/Jq/Z/W/N0cy9jb/G/Fzc2/Vz/L1/Bhd/Gh/Db/G/Fzczt4c/H/Ny/A/B/Fq/Y/X/Zh/Lmxhbmcu/S/W50/Z/Wdlch/Lio/K/T3g/Yc4/Ag/A/B/S/Q/A/Fdm/Fsd/W/V4cg/A/Qam/F2/Y/S5s/Y/W5n/Lk51b/W/Jlcoasl/R0/Ll/O/C/L/Ag/A/Ae/H/D\\/Q/E/B/Ac/H/Bzc/Q/B+/A/A/Jzc/Q/B+/A/Af\\y/A/A/Ad/A/A/F/V/H/Vtb3/Jwc3/E/Afg/A/Cc3/E/Afg/A/H\\5b/Iln/Q/A/Bl/N0cm9t/Y/X/Bzc/Q/B+/A/A/Jzc/Q/B+/