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
cytos = getDetectionObjects().findAll{it.getPathClass() == getPathClass('cells')} | |
nuclei = getDetectionObjects().findAll{it.getPathClass() == getPathClass('nuclei')} | |
print cytos | |
print nuclei | |
// Combine cytos and nuclei detections to create cell objects | |
def cells = cytos.collect{ cyto -> | |
cell_nucs = nuclei.findAll{ nuc -> cyto.getROI().contains( nuc.getROI().getCentroidX() , nuc.getROI().getCentroidY() )} | |
if ( !cell_nucs.isEmpty() ) { |
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
#@ ImagePlus imp | |
#@ Double tolerance | |
nT = imp.getNFrames() | |
imp.getStack(). | |
means_vals = (1..nT).collect{ | |
imp.setT(it) | |
return imp.getStatistics().mean | |
} |
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 = | |
* This QuPath script fills thae image Annotations objects with circular detections objects of a user defined diameter. | |
* In combination with "Measure > Show measurements maps" it can be helpfull to quickly create meaningful heatmaps. | |
* | |
* == INPUTS == | |
* Annotation(s) and RegionOfInterest diamater (in microns) | |
* | |
* == OUTPUTS == | |
* circular detections objects of a user defined diameter | |
* |
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 file_path | |
IJ.run("Close All", ""); | |
// the folder containing the lif | |
dir = file_path.getParent() | |
// a subfolder to save images | |
output_dir = new File( dir ,"outputRom1PC") | |
output_dir.mkdir() |
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
#@ImagePlus imp // imp should be a 3D label image | |
#@String stat_name // morpholibJ output table after Analyze Regions 3D | |
// using morpholibJ , update site : IJPB-plugins | |
IJ.run("Analyze Regions 3D", "voxel_count volume surface_area mean_breadth sphericity euler_number bounding_box centroid equivalent_ellipsoid ellipsoid_elongations max._inscribed surface_area_method=[Crofton (13 dirs.)] euler_connectivity=6"); | |
// Duplicate the imp and make it 32-bit | |
imp_label = imp.duplicate(); | |
IJ.run(imp_label, "32-bit", ""); |
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
run("Close All"); | |
roiManager("reset"); | |
// ring thickness | |
step = 10 ; | |
// prepare a test image | |
setForegroundColor(255, 255, 255); | |
setBackgroundColor(0, 0, 0); | |
newImage("Shape", "8-bit black", 512, 512, 1); | |
makePolygon(258,122,171,192,115,272,167,430,232,350,229,302,289,338,324,300,329,236,411,160); |
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 | |
#@RoiManager rm | |
#@ CommandService command | |
#@ Double (label="Nuclei Proba. Threshold", value=0.5) threshold_proba_nuc | |
#@ Double (label="Nuclei min. intensity (A.U.)", value=10) minInt_nuc | |
#@Integer (label="Max Frame Gap") frameGap | |
#@Double (label="Linking Max Distance") linkDistance | |
#@Integer (label="Gap Closing Max Distance") gapClosingDistance | |
// authors : olvier.burri & romain.guiet (at) epfl.ch |
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
run("Close All"); | |
run("Blobs (25K)"); | |
img1 = getImageID(); | |
run("Invert LUT"); | |
run("32-bit"); | |
rename("On_disableSmoothing"); | |
run("Duplicate...", "title=Off_disableSmoothing"); | |
img2 = getImageID(); |
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_spots = "pinkySpots"; | |
name_filtered_spots = name_spots+"-filtered"; | |
rt = new ResultsTable() | |
rt.reset() | |
// Here teh script expect to find the demo.ims file in the folder Fiji>Plugins>BIOP | |
def plugins_dir = IJ.getDirectory("plugins") | |
def biop_dir = new File(plugins_dir , "BIOP") | |
ims_name = "HeLa_H2B-mcherry_Tubline-EGFP_mitochondria-MitoTracker_reduced.ims" |
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
oneOval = 1 ; | |
//size_Array = newArray(1,5,10,20,50,100); | |
size_Array = newArray(7,9,11,15,20,25,50); | |
int_Array = newArray(5,10,20,50,100,150,250); | |
Array.getStatistics(size_Array, size_Array_min, size_Array_max, size_Array_mean, size_Array_stdDev); | |
//print(size_Array_max); |
NewerOlder