Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lecture_applied_bioimage_analysis_2020
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
rhaase
lecture_applied_bioimage_analysis_2020
Commits
5d1fb96b
Commit
5d1fb96b
authored
4 years ago
by
rhaase
Browse files
Options
Downloads
Patches
Plain Diff
added solution using imagej
parent
188069e9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
05_BioImage_Analysis_Tools/imagej/BlobImagesSegmentation_exercise.ijm
+53
-0
53 additions, 0 deletions
...Analysis_Tools/imagej/BlobImagesSegmentation_exercise.ijm
with
53 additions
and
0 deletions
05_BioImage_Analysis_Tools/imagej/BlobImagesSegmentation_exercise.ijm
0 → 100644
+
53
−
0
View file @
5d1fb96b
// blob segmentation of images in folders
//
// This script analyses folders full of image with blobs and measures their average size
//
// Author: Robert Haase, rhaase@mpi-cbg.de
// May 2019
//
///////////////////////////////////
folder = "C:/structure/mpicloud/Projects/201909_Teaching_BioImageAnalysis_Praque/prague/05_examples/example_images/";
function main() {
run("Clear Results");
processFolder(folder + "condition_A/");
saveAs("Results", folder + "ResultsA.xls");
run("Clear Results");
processFolder(folder + "condition_B/");
saveAs("Results", folder + "ResultsB.xls");
run("Clear Results");
}
function processFolder(foldername) {
filelist = getFileList(foldername);
number_of_files_in_folder = lengthOf(filelist);
// go through all images, segment them and collect results in a table
for (i = 0; i < number_of_files_in_folder; i++) {
open(foldername + filelist[i]);
processImage();
close();
}
}
function processImage() {
// remoive noise
run("Gaussian Blur...", "sigma=5");
// segment
setAutoThreshold("Otsu dark");
setOption("BlackBackground", true);
run("Convert to Mask");
// analyze
run("Set Measurements...", "area redirect=None decimal=3");
run("Analyze Particles...", "display");
}
main();
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment