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
// clear the environment | |
run("Close All"); | |
roiManager("Reset"); | |
//open an image | |
run("Fly Brain (1MB)"); | |
// make it composite, duplicate one slice and get information | |
run("Make Composite"); | |
run("Duplicate...", "duplicate channels=1 slices=27"); | |
getDimensions(width, height, channels, slices, frames); |
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
// clear the environment | |
run("Close All"); | |
run("Clear Results") | |
roiManager("Reset"); | |
// Set the measurements of intererest | |
run("Set Measurements...", "area mean standard min limit display redirect=None decimal=3"); | |
run("Gel (105K)"); | |
rename("Original"); |
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(label="Multiposition Files Directory",style="directory") image_directory | |
#@String(value="Select a file for flat field correction or write none", visibility="MESSAGE") textFF | |
#@File(label="Flatfield Stack File") ff_file | |
#@int(label="Downsample Factor", style = "slider", min = 1, max = 16, stepSize = 1) downsample | |
#@Boolean(label="Perform Stitching") is_do_stitch | |
#@Boolean(label="Compute Overlap") is_compute | |
#@Boolean(label="Keep Original Bit Depth") is_keep_bit_depth | |
#@String(label="Macro Mode",choices={"Fuse and display","Write to disk"}) output_type | |
#@Boolean(label="Save final stitched as *.ids (if write to disk)") save_Stiched_asIDS | |
#@Boolean(label="Delete temporary files (if write to disk)") delete_temp_files |
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
// @String(label="Macro Mode",choices={"Current Image","Current Folder"}) modeChoice | |
// @String(value="Parameters for Detection", visibility="MESSAGE") textDetection | |
// @Integer(label="Channel for detection",value=1) detection_chNbr | |
// @Integer(label="Gaussian Blur sigma",value=1) detection_gBlur | |
// @Integer(label="Find Maxima noise tolerance",value=100) detection_noiseTol | |
// @Integer(label="Clear False Positive cutoff - 0 to disable",value=200) detection_meanCutOff | |
// @String(value="Parameters for Measurements", visibility="MESSAGE") textMeasurements |
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(label="Multiposition Files Directory",style="directory") image_directory | |
//@String(value="Select a file for flat field correction or write none", visibility="MESSAGE") textFF | |
//@File(label="Flatfield Correction File", value="none") ff_file | |
//@int(label="Downsample Factor", style = "slider", min = "1", max = "16", stepSize = "1") downsample | |
//@Boolean(label="Compute Overlap") is_compute | |
//@String(label="Macro Mode",choices={"Fuse and display","Write to disk"}) output_type | |
//@LogService log | |
import ij.IJ; | |
import loci.formats.ImageReader; |
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
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 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
#@ ImagePlus imp | |
#@ Double tolerance | |
nT = imp.getNFrames() | |
imp.getStack(). | |
means_vals = (1..nT).collect{ | |
imp.setT(it) | |
return imp.getStatistics().mean | |
} |
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
/* = 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 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 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 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
#@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", ""); |
NewerOlder