New Annotation Script: DrawAnnotation

Mike1485

Well-known member
Sometimes you want to produce a version of your image with an arrow pointing to something of interest, perhaps a supernova, an asteroid, or an artefact that you would like help removing. You may also wish to add some free form text alongside to describe the object. Until now that is awkward to do in PixInsight and I tend to resort to loading the image into a different program to do this. So, I have put together this new script called DrawAnnotation. It has a preview facility and allows you to define an arrow and text and place these with mouse clicks. An illustration of the interface is included below. To get the script just add the following to your repository list: https://www.cosmicphotons.com/pi-scripts/drawannotation/. The script will install into the Script>Render menu. Please let me know any feedback or if you find any bugs.

CS, Mike

DrawAnnotationSmall.jpg
 
Sometimes you want to produce a version of your image with an arrow pointing to something of interest, perhaps a supernova, an asteroid, or an artefact that you would like help removing. You may also wish to add some free form text alongside to describe the object. Until now that is awkward to do in PixInsight and I tend to resort to loading the image into a different program to do this. So, I have put together this new script called DrawAnnotation. It has a preview facility and allows you to define an arrow and text and place these with mouse clicks. An illustration of the interface is included below. To get the script just add the following to your repository list: https://www.cosmicphotons.com/pi-scripts/drawannotation/. The script will install into the Script>Render menu. Please let me know any feedback or if you find any bugs.

CS, Mike

View attachment 18684
Do you know if the XISF format can support layers? I don't use any annotation tools in PI because I don't want to keep around multiple copies of the same image, just marked up in different ways. So I end up with a master image and I do all my later sizing, bordering, and annotating in a certain third-party application that does support layers. This means that when I make a new version of the image in PI, I can just drop it on the image layer and all my annotation is still there. That would be a fantastic PI feature, native XISF files with overlaid annotation layers that could be turned on or off and/or replaced.
 
Do you know if the XISF format can support layers? I don't use any annotation tools in PI because I don't want to keep around multiple copies of the same image, just marked up in different ways. So I end up with a master image and I do all my later sizing, bordering, and annotating in a certain third-party application that does support layers. This means that when I make a new version of the image in PI, I can just drop it on the image layer and all my annotation is still there. That would be a fantastic PI feature, native XISF files with overlaid annotation layers that could be turned on or off and/or replaced.
Although the XISF format can support multiple images in one file, there is not, so far as I am aware, any concept of layers. Perhaps this is something for a future incarnation of PI!
 
Although the XISF format can support multiple images in one file, there is not, so far as I am aware, any concept of layers. Perhaps this is something for a future incarnation of PI!
It would be a great addition. It might be fairly easy to implement if layers were just additional images flagged as layers for display purposes.
 
Fantastic! Thanks Mike! Got tired of doing it freehand with cumbersome tools. Now this is probably beyond the scope of the topic but how would you create a mouse-over showing the arrow and text? What would I need for that?
Thanks again!
Dave
 
Fantastic! Thanks Mike! Got tired of doing it freehand with cumbersome tools. Now this is probably beyond the scope of the topic but how would you create a mouse-over showing the arrow and text? What would I need for that?
Thanks again!
Dave
The mouse over functionality needs to be built into the platform you use to display the image. For example on Astrobin you can specify a revision image that is displayed on mouse over. So you can upload a revision with annotations and use this for the mouse over.
 
Thanks Mike, I like that script a lot!
Found one minor issue, though: when reapplying it from a process container it somehow lost my text (SN2023ixf of course) and replaced it with the font name (SansSerif in my case). Not sure if that's a general problem of script params in containers but all the other params perfectly survived...

Regards,
Stephan
 
Thanks Mike, I like that script a lot!
Found one minor issue, though: when reapplying it from a process container it somehow lost my text (SN2023ixf of course) and replaced it with the font name (SansSerif in my case). Not sure if that's a general problem of script params in containers but all the other params perfectly survived...

Regards,
Stephan
Update released!
 
Hi Mike, a possible extra feature, should you have the time to develop the script more: variable transparency for the arrow & text. It'd be useful particularly for the latter, to add authorship and other info in a corner in a less intrusive way.

Thank you for the script anyway!
 
Hi Mike, a possible extra feature, should you have the time to develop the script more: variable transparency for the arrow & text. It'd be useful particularly for the latter, to add authorship and other info in a corner in a less intrusive way.

Thank you for the script anyway!
Thanks Razvan, a nice idea - maybe for a future release!
CS, Mike
 
Hi Mike, a possible extra feature, should you have the time to develop the script more: variable transparency for the arrow & text. It'd be useful particularly for the latter, to add authorship and other info in a corner in a less intrusive way.

Thank you for the script anyway!
I have just released version 1.4 adding opacity controls to both the text and the arrow. Enjoy!
CS, Mike
 
Back
Top