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
97e20a04
Commit
97e20a04
authored
May 04, 2019
by
rhaase
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add example code and exercises
parent
f039bcae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
0 deletions
+47
-0
06_ImageJ-macro_programming.pptx
06_ImageJ-macro_programming.pptx
+0
-0
06_example_code/visualise_area_in_colors.ijm
06_example_code/visualise_area_in_colors.ijm
+47
-0
No files found.
06_ImageJ-macro_programming.pptx
View file @
97e20a04
No preview for this file type
06_example_code/visualise_area_in_colors.ijm
0 → 100644
View file @
97e20a04
// 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