Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
L
lecture_applied_bioimage_analysis
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rhaase
lecture_applied_bioimage_analysis
Commits
7df7da5e
Commit
7df7da5e
authored
May 07, 2019
by
rhaase
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'imagej_macro2' into 'master'
Imagej macro2 See merge request
!3
parents
ad6411ee
0fb33929
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
128 additions
and
0 deletions
+128
-0
05_ImageJ-macro_programming.pptx
05_ImageJ-macro_programming.pptx
+0
-0
05_example_code_and_data/analyse_rounding_assay.ijm
05_example_code_and_data/analyse_rounding_assay.ijm
+26
-0
05_example_code_and_data/analyse_rounding_assay_folder.ijm
05_example_code_and_data/analyse_rounding_assay_folder.ijm
+34
-0
06_ImageJ-macro_programming.pptx
06_ImageJ-macro_programming.pptx
+0
-0
06_example_code/save_csv_file.ijm
06_example_code/save_csv_file.ijm
+11
-0
06_example_code/visualise_area_in_colors.ijm
06_example_code/visualise_area_in_colors.ijm
+57
-0
No files found.
05_ImageJ-macro_programming.pptx
View file @
7df7da5e
No preview for this file type
05_example_code_and_data/analyse_rounding_assay.ijm
0 → 100644
View file @
7df7da5e
// configuration
folder = "C:/structure/teaching/lecture_applied_bioimage_analysis/05_example_data/rounding_assay/";
image_file = "rounding_assay0035.tif";
result_csv_file = "summary.csv";
// configure measurement
run("Set Measurements...", "fit shape redirect=None decimal=3");
// process imagge
open(folder + image_file);
setAutoThreshold("MaxEntropy dark");
setOption("BlackBackground", true);
run("Convert to Mask");
// get rid of single pixels
run("Erode");
run("Dilate");
// measure properties
run("Analyze Particles...", "summarize");
// save the result table
IJ.renameResults("Summary", "Results");
saveAs("Results", folder + result_csv_file);
05_example_code_and_data/analyse_rounding_assay_folder.ijm
0 → 100644
View file @
7df7da5e
// configuration
folder = "C:/structure/teaching/lecture_applied_bioimage_analysis/05_example_data/rounding_assay/";
result_csv_file = "summary.csv";
// configure measurement
run("Set Measurements...", "fit shape redirect=None decimal=3");
// retrieve all files in the folder in an array
filelist = getFileList(folder);
for (i = 0; i < lengthOf(filelist); i++) {
image_file = filelist[i];
if ( endsWith(image_file, ".tif")) {
// process imagge
open(folder + image_file);
setAutoThreshold("MaxEntropy dark");
setOption("BlackBackground", true);
run("Convert to Mask");
// get rid of single pixels
run("Erode");
run("Dilate");
// measure properties
run("Analyze Particles...", "summarize");
close();
}
}
// save the result table
IJ.renameResults("Summary", "Results");
saveAs("Results", folder + result_csv_file);
06_ImageJ-macro_programming.pptx
0 → 100644
View file @
7df7da5e
File added
06_example_code/save_csv_file.ijm
0 → 100644
View file @
7df7da5e
path = "C:/structure/teaching/lecture_applied_bioimage_analysis/06_example_code/test.csv";
headline = "Number, number squared";
File.append(headline, path);
for (i = 0; i < 10; i++) {
contentline = "" + i + ", " + pow(i, 2);
File.append(contentline, path);
}
06_example_code/visualise_area_in_colors.ijm
0 → 100644
View file @
7df7da5e
// This script analyses a time lapse of images showing yeast cells.
// It measures their size and visualises
// cells in different colors depending on their features:
// * red: too small
// * green: others
//
//
// Robert Haase, rhaase@mpi-cbg.de
// May 2019
// open an image from the rounding assay
open("C:/structure/teaching/lecture_applied_bioimage_analysis/05_example_code_and_data/rounding_assay/rounding_assay0004.tif");
// save the window title for later - we want to switch to this image
original_image_title = getTitle();
// duplicate the image and segment it
run("Duplicate...", " ");
setAutoThreshold("Triangle dark");
run("Convert to Mask");
// binary closing
run("Dilate");
run("Dilate");
run("Erode");
run("Erode");
// connected components analysis -> send results to ROI Manager
run("Analyze Particles...", " show=Nothing add");
// switch back to original image
selectWindow(original_image_title);
roiManager("Show None");
number_of_regions = roiManager("count");
for (i = 0; i < number_of_regions; i++ ) {
// measure area ( = pixel count)
run("Set Measurements...", "area redirect=None decimal=3");
roiManager("Select", i);
roiManager("Measure");
pixel_count = getResult("Area", nResults - 1);
// visualise if ROIs are too small or not
if (pixel_count > 10) {
Overlay.addSelection("green");
} else {
Overlay.addSelection("red");
}
}
// clean up after the job is done
if (number_of_regions > 0) {
roiManager("deselect");
roiManager("delete");
}
run("Clear Results");
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment