Point annotation colors are determined based on the order that points layers are created. Therefore, the colors can be different when I revisit an image I have already annotated. This happens when I do not annotate point annotations in the same order as how the annotations are stored in the dictionary. For example, if I have point annotations named a, b, c (stored in the dictionary in this order) and I annotate c, then b, and then a, the colors will be c-green, b-fuchsia, a-red. If I go to another image and back to this image again, since the plugin reads from the dictionary, the colors will be a-green, b-fuchsia, and c-red instead.
Steps to reproduce
Create multiple point annotations in the template.
Annotate point annotations in a different order than what is showing in the UI.
Go to another image and back to this image.
The color associated with each point annotation will be different.
Note
The colors are determined from a list of colors self.colors in viewer.py. A color is selected by indexing this list with the number of existing points layers in create_points_layer(). I think this need to be modified.
Issue
Point annotation colors are determined based on the order that points layers are created. Therefore, the colors can be different when I revisit an image I have already annotated. This happens when I do not annotate point annotations in the same order as how the annotations are stored in the dictionary. For example, if I have point annotations named a, b, c (stored in the dictionary in this order) and I annotate c, then b, and then a, the colors will be c-green, b-fuchsia, a-red. If I go to another image and back to this image again, since the plugin reads from the dictionary, the colors will be a-green, b-fuchsia, and c-red instead.
Steps to reproduce
Note
The colors are determined from a list of colors
self.colors
inviewer.py
. A color is selected by indexing this list with the number of existing points layers increate_points_layer()
. I think this need to be modified.