Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set label colors #170

Open
gdivita opened this issue Oct 4, 2024 · 1 comment
Open

Set label colors #170

gdivita opened this issue Oct 4, 2024 · 1 comment

Comments

@gdivita
Copy link

gdivita commented Oct 4, 2024

Greetings,
Our organization has been using Gate to do manual annotations on clinical records for years now. One of the main complaints from the annotators is the shifting colors from annotations from open process or if the tool used was done on a different machine.

I'm fairly familiar with the last official gate release source code (9.0.1) and have used various gate api's programmatically. I've been looking for a way to invoke the annotation editor with a gate annotated xml file with the colors of the labels set, but have not figured out a way to do either invoking the editor with a file loaded, nor have the colors set.

Are either possible?

Thanks in advance,

@ianroberts
Copy link
Member

The mapping from annotation type to colour is actually saved in the .gate.xml config file, so it is persistent on a given machine provided "save options on exit" is enabled in the advanced settings (this is the default, so it should be unless the user has disabled it). If you want the users to see the same colours then you somehow need to arrange for them all to load a configuration with the same colour settings in it.

The most basic "no code" way to do this is simply to send them a copy of your config file (~/.gate.xml on Linux or Mac, typically C:\Users\<you>\gate.xml on Windows) and tell them to save it at the same place. But you would be well advised to trim down your config file before you send it to just include the critical attribute gate.gui.docview.AnnotationSetsView.colours, which specifies the colour mapping, without including the other attributes that control things like which plugins you have loaded automatically at startup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants