Ideas for automation of root measurements

Hello community,

I am looking for hints for a rather complex use case. I want to analyze the angle of plant roots which involves a insane amount of manual steps at the moment that I want to semi-automate.

For the following workflow I would like to ask if you can provide me with hints how to implement it. In principle I have experience with Python and Java but the Fiji macro way would be preferable as it would be easier, I guess. I am not the enduser…

  1. Open directory of images or one image
  2. Iterate over the images
  3. Rotate each image
  4. Manually set the scale for each image by selecting two points on a scale
  5. For each plant on the image manually mark 3 points and measure the angle between them and draw it on the image
  6. After clicking a finish button the image with all marked angles is saved with a different name and the measured angles are exported as csv
  7. The next image is opened and repeat starts at step 3

So the workflow invokes multiple user interactions and waitings and I am not sure how to implement user interaction like waiting for the 3 clicks and so

Any help is appreciated!

Good day,

please post typical unprocesses images in the original TIF- or PNG-format.
No JPG-format though, because JPG introduces artifacts!
(Converting a JPG-compressed image to TIFF- or PNG-format doesn’t make sense.)
You may also post images as Zip-archives or make them accessible via a dropbox-like service.

Please comment the images with respect to the angle in question, because there may be a possibility to automate this process too.

Also, please tell us what rotation you have in mind!



Hello Herbie,

thanks for your reply. Sadly I do not have the permissions to publish any images :frowning:

I already searched a lot regarding full automation. Found a webpage and tools like Rootrace and Smartroot (imagej plugin) but no approach was working.

One image contains of 60 plants and roots (or not) with many different variations which must be considered by human eyes.

The rotation you ask is trivial, just 90 degres right. (run(“Rotate 90 Degrees Right”):wink:

As I said I would appreciate some hints on how to build complex user driven semi-automated control flow into Fiji :slight_smile:

Many thanks

Without typical images I see no way to help you and I can only recommend that you study ImageJ in all its details to get a founded idea of what is possible.

You may start with the User Guide.

If you have a concept of the processing, you can automate it by use of the ImageJ-macro language. Coding macros is really easy but you need to have an idea of the available macro functions.

Finally, don’t forget the macro recorder that gives you the macro code for operations that you initiate from the ImageJ-GUI.

Good luck


Hi @Allaman

I can help with the user interaction point, but tend to agree with @anon96376101 in regards to anything further. To proceed with your workflow, you will need to do some reading.

waitForUser(“adjust selection, then hit OK”);

The link you provided has a bunch of interesting tools.

Why reinvent the wheel?


Hello @anon96376101,

thanks for the links I will dig through them and when there raise concrete problems I ask again

Hello @yempski,

thanks for your hint. I will search for different kinds of wait* for functions and gui elements. The problem of tools I looked at is that they cannot handle 60 roots in one image, or they cannot handle plants also have no or malformed roots at all, or they assume the same scale (this is not guaranteed on each image), or they only handle complex root topologies and not tiny 1cm like roots…
But I admit I haven’t tried the tool you mentioned. I’ll give it a try!