Icon

Analyze_​Particles

Analyze Particles

This workflow performs very simple image segmentation and object feature calculation on ImageJ’s Blobs sample image. It is modeled after an equivalent ImageJ macro:

// read the image data
//run("Blobs (25K)");
open("blobs.tif");

// preprocessing -- image smoothing
run("Duplicate...", " ");
run("Median...", "radius=1");

// thresholding -- separate foreground from background
setAutoThreshold("Huang");

// morphological operations -- erode x2
run("Create Mask");
setOption("BlackBackground", false);
run("Erode");
run("Erode");

// define measurements
run("Set Measurements...", "area mean standard redirect=None decimal=3");

// segment objects -- i.e. connected component analysis
run("Analyze Particles...", "add");

// cleanup temporary images
close();
close();

// measure objects on the original data
selectWindow("blobs.tif");
roiManager("Measure");

// save the measurements to a CSV file
saveAs("Results", "measurements.csv");

open("blobs.tif")run("Median...", "radius=1")setAutoThreshold("Huang");selectWindow("blobs.tif");roiManager("Measure");saveAs("Results", "measurements.csv");run("Erode");run("Erode");run("Analyze Particles...", "add");Image Reader Median Filter Global Thresholder Joiner Image SegmentFeatures CSV Writer MorphologicalImage Operations Connected ComponentAnalysis StructuringElement Creator open("blobs.tif")run("Median...", "radius=1")setAutoThreshold("Huang");selectWindow("blobs.tif");roiManager("Measure");saveAs("Results", "measurements.csv");run("Erode");run("Erode");run("Analyze Particles...", "add");Image Reader Median Filter Global Thresholder Joiner Image SegmentFeatures CSV Writer MorphologicalImage Operations Connected ComponentAnalysis StructuringElement Creator

Nodes

Extensions

Links