Adding arrows, text and other types of annotation to multiple frames of a movie in ImageJ

Hi -
I have a question similar to the question posted by:

I am trying to find an efficient, straightforward way to add various types of annotations, such as text, arrows, circles, outlines, etc. to a movie using FIJI.

There is a very nice macro available:
Annotation_to_overlay1.3.ijm. I believe this was written by Dr. Straatman (@krs5) from the University of Leicester. I have used it for several movies and it works quite well and is very intuitive. It allows the user to place annotation of choice on a subset of frames in the movie.

What I am interested is something similar to that macro but that would permit the user to move the annotation object (ie an arrow) to different locations through the specified frames.

For example, a movie of 40 frames in which a cell is migrating from frames 7 through 14. I want an arrow (that is the same shape and size through out the frames so I don’t want to have to re-draw it every time) to track with the cell just through those frames. It would be great to be able to do something like the Annotation_to_overlay macro where I could specify “arrow” and “frames 7 through 14” and a arrow would appear just on those frames. Then, before it is “flattened” (as is done in the macro at this point) I would like to be able to go through each frame and change the location of the arrow to follow the movement of the cell. When I have adjust the location of the each arrow on each frame, then there would be the option to “flatten” the arrow overlay so that it is permanent on those particular frames. Similarly, it would also be useful to be able to do something similar with text (or a circle or a square…) as a label could be added that moved with the arrow following the cell of interest.

Is there something out there that I haven’t found or might there be a way to modify the Annotation_to_overlay macro for added flexibility to permit movement of object prior to flattening (which I think is beyond my coding skill level)?

I have tried playing around with making an arrow and putting it in the ROI manager, then adding to the next frame, then moving it, etc. In addition to being cumbersome I have found that with that method it is easy to make errors such that annotations you want end up on incorrect frames and things just don’t end up where you want them.

Insights and suggestions are much appreciated.

1 Like

Hi and welcome to the forum,

this tool might be the something you could look into:
http://image.bio.methods.free.fr/arrows.html

1 Like

Just another suggestion would be to use TrackMate to automatically track the positions of the cell migration:

https://imagej.net/TrackMate from @tinevez and others.

The movies indicate the possibility to somehow annotate the tracks and offer other several nice functions which could be useful for your analysis.

2 Likes

Thank you both for your replies and suggestions, especially since they will be useful for those interested in just adding arrows. However, perhaps my example was too narrow and did not fully convey what I am trying to do. I would like find a straightforward, efficient way to add a variety of annotations (so not just arrows, but also possibly outlines (ie outlining a structure), circles, text, etc.) to movies for presentation and publication. And the movies are not necessarily time lapse but may include scans through z stacks (such as pointing out a cell structure like an axon that may be in slightly different locations though the z stack) or 3D rotations. I realize that this is asking for significant flexible functionality but thought I would see if others had also tried to tackle this issue. Thank you again for your support and suggestions.

1 Like

Dear Jayne,

Happy you found the macro I wrote useful. I have updated the macro to include the option to adjust the location of your selection. You can download the latest version from
https://www2.le.ac.uk/colleges/medbiopsych/facilities-and-services/cbs/AIF/software-1/imagej-macros. Also solved a problem with selections in time series not working.

Best wishes

Kees

Dr Ir K.R. Straatman
Advanced Imaging Facility
Centre for Core Biotechnology Services
University of Leicester
www.le.ac.uk/advanced-imaging-facility

4 Likes

This is great @krs5 ! I checked the link to download the macro - but it does not appear to be working. It’s requesting a login for University IT account.

Dear Ellen,

Sorry, should work now.

Kees

1 Like

Fantastic! Thank you! I will try it out and let you know if I have any questions. It seems to have downloaded for me.

What is the best way to cite the use of your macros? I didn’t see an associated publication or any indication as to how you would like the macros cited. We just submitted a manuscript this week where I used the Annotation_to_overlay1.3 and I included the link in the methods section, but if there is another way that you would prefer it to be cited, please let me know so that I can corrected in the paper revisions (assuming it gets accepted - fingers crossed). Want to make sure credit is given where credit is due.

Thank you for your help with this.

1 Like

I played around with the 1.4 version, trying several different things, and it does just what I need it to do! One does need to be careful when there putting 2 annotations on the same frame (eg an arrow and associated text) when using the “moving” option. Due to the way the ROI manager manages the overlays both annotations are “selected” so it is possible to move either one of the annotations - which is fine, the user just needs be mindful of that so they don’t accidentally move something they didn’t mean to. Thank you so much for updating this and adding a whole level of flexibility to movie annotation.