Commit eccf5da8 authored by rhaase's avatar rhaase

upload 13 Multi-Dimensional Image Analysis

parent ed0990a4
This diff is collapsed.
open("C:/structure/teaching/lecture_applied_bioimage_analysis_2020/13_n-dimensional_image_data/data/grey_spirals.tif");
run("CLIJ2 Macro Extensions", "cl_device=");
Ext.CLIJ2_clear();
input = getTitle();
Ext.CLIJ2_push(input);
// blur with normal Gaussian blur
sigma = 10;
Ext.CLIJ2_gaussianBlur2D(input, output_blurred, sigma, sigma);
Ext.CLIJ2_pull(output_blurred);
// blur with tiled Gaussian blur, no margin
tile_size = 32;
margin = 0;
Ext.CLIJxt_gaussianBlur3D(input, output_blurred_tiles_no_margin, sigma, sigma, 0, tile_size, tile_size, 1, margin, margin, 0);
Ext.CLIJ2_pull(output_blurred_tiles_no_margin);
// blur with tiled Gaussian blur, no margin
tile_size = 32;
margin = 10;
Ext.CLIJxt_gaussianBlur3D(input, output_blurred_tiles_margin, sigma, sigma, 0, tile_size, tile_size, 1, margin, margin, 0);
Ext.CLIJ2_pull(output_blurred_tiles_margin);
// blur with tiled Gaussian blur, no margin
tile_size = 32;
margin = 20;
Ext.CLIJxt_gaussianBlur3D(input, output_blurred_tiles_margin, sigma, sigma, 0, tile_size, tile_size, 1, margin, margin, 0);
Ext.CLIJ2_pull(output_blurred_tiles_margin);
run("Close All");
run("CLIJ2 Macro Extensions", "cl_device=");
// first example: blobs
run("Blobs (25K)");
blobs = getTitle();
Ext.CLIJ2_push(blobs);
Ext.CLIJ2_create2D(blobs_scaled, 512, 512, 8);
Ext.CLIJ2_scale2D(blobs, blobs_scaled, 512.0 / 256.0, 512.0 / 254.0, false);
Ext.CLIJ2_thresholdOtsu(blobs_scaled, binary_blobs);
Ext.CLIJ2_pull(binary_blobs);
// first example: spirals
open("C:/structure/teaching/lecture_applied_bioimage_analysis_2020/13_n-dimensional_image_data/data/binary_spirals.tif");
binary_spiral = getTitle();
Ext.CLIJ2_push(binary_spiral);
// run global and tiles CCA
connected_components_analysis(binary_blobs);
connected_components_analysis(binary_spiral);
function connected_components_analysis(input) {
// normal Connected Components Labeling
Ext.CLIJ2_connectedComponentsLabelingBox(input, output_cca);
Ext.CLIJ2_pull(output_cca);
run("glasbey_on_dark");
setMinAndMax(0, 256);
// tiled Connected Components Labeling, no margin
tile_size = 170;
margin = 0;
Ext.CLIJxt_connectedComponentsLabelingBox(input, output_cca_tiles_no_margin, tile_size, tile_size, 1, margin, margin, 0);
Ext.CLIJ2_pull(output_cca_tiles_no_margin);
run("glasbey_on_dark");
setMinAndMax(0, 256);
// clean up
Ext.CLIJ2_release(output_cca);
Ext.CLIJ2_release(output_cca_tiles_no_margin);
}
\ No newline at end of file
This image diff could not be displayed because it is too large. You can view the blob instead.
This image diff could not be displayed because it is too large. You can view the blob instead.
Daniela Vorkel, Robert Haase, Myers lab, CSBD / MPI CBG
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment