Commit f9d6da52 authored by Christian Tischer's avatar Christian Tischer

EMBL Course

parent 045f9546
// TODO: add user interface for opening a label image file (https://imagej.net/Script_Parameters)
// TODO: add user interface for min and max area
run("Region Morphometry");
minArea = 0;
maxArea = 200;
// TODO: Duplicate the label image, in order not to loose the original one
for ( i = 0; i < Table.size; ++i )
{
area = Table.get( "Area", i );
label = Table.getString( "Label", i );
// TODO: Add some text output to tell the user what is happening...
if ( area < minArea || area > maxArea )
{
run("Replace/Remove Label(s)", "label(s)="+label+" final=0");
}
}
// TODO (Optional): Relabel the filtered label image such that labels start from 1 and none are missing
This diff is collapsed.
# Image analysis automation
## Automated object filtering
<img src='https://g.gravizo.com/svg?
digraph G {
shift [fontcolor=white,color=white];
label_image -> table [label=" measure_shape"];
table -> filtered_objects;
filtered_objects -> label_image [label=" remove"];
}
'/>
### Activity: Automatically remove objects from label image
- Open image: `xy_8bit_labels__four_objects.tif`
- Devise code to automatically remove objects from the label image, e.g.
- Remove all cells larger than N pixels in area
### Formative assessment
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