Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (25 sloc) 692 Bytes
// CLIJ example macro: autoThreshold.ijm
// This macro shows how to apply an automatic
// threshold method to an image in the GPU.
// Author: Robert Haase
// December 2018
// ---------------------------------------------
// Get test data
run("Blobs (25K)");
getDimensions(width, height, channels, slices, frames);
input = getTitle();
mask = "Mask";
// Init GPU
run("CLIJ Macro Extensions", "cl_device=");
// push data to GPU
// cleanup ImageJ
run("Close All");
// create a mask using a fixed threshold
Ext.CLIJ2_automaticThreshold(input, mask, "Otsu");
// show result
You can’t perform that action at this time.