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
4bfe7d0b
Commit
4bfe7d0b
authored
4 years ago
by
rhaase
Browse files
Options
Downloads
Patches
Plain Diff
added script for plotting circularity over time
parent
c451b03e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
04_Adv_ImageJ_Macro/example_code/analyse_rounding_assay_folder_plot.ijm
+57
-0
57 additions, 0 deletions
...Macro/example_code/analyse_rounding_assay_folder_plot.ijm
with
57 additions
and
0 deletions
04_Adv_ImageJ_Macro/example_code/analyse_rounding_assay_folder_plot.ijm
0 → 100644
+
57
−
0
View file @
4bfe7d0b
// configuration
folder = "C:/structure/teaching/lecture_applied_bioimage_analysis_2020/03_Feature_extraction_and_ImageJ_Macro/example_images/rounding_assay/";
result_csv_file = "summary.csv";
frame_delay_in_minutes = 0.2;
// configure measurement
run("Set Measurements...", "fit shape redirect=None decimal=3");
// retrieve all files in the folder in an array
filelist = getFileList(folder);
number_of_files = lengthOf(filelist);
// create two arrays to put measurements in later
time_array = newArray(number_of_files);
circularity_array = newArray(number_of_files);
for (i = 0; i < number_of_files; i++) {
image_file = filelist[i];
if ( endsWith(image_file, ".tif")) {
// process image
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("Clear Results");
run("Analyze Particles...", "display");
run("Summarize");
// read out value from table
circularity = getResult("Circ.", nResults() - 4);
// put value and time in array
time_array[i] = i * frame_delay_in_minutes;
circularity_array[i] = circularity;
// close the current image
close();
}
}
Plot.create("Circularity", "Time / min", "Circularity", time_array, circularity_array);
Plot.setColor("green");
Plot.show();
// save the result table
//IJ.renameResults("Summary", "Results");
saveAs("Results", folder + result_csv_file);
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