catmaid / CATMAID

Collaborative Annotation Toolkit for Massive Amounts of Image Data
https://catmaid.org
GNU General Public License v3.0
182 stars 56 forks source link

[BUG] Volume colors don't load from deep link #2227

Open jasper-tms opened 1 year ago

jasper-tms commented 1 year ago

Short description

I'm preparing a deep link to be included in a publication. The color of the volumes in the 3d viewer isn't loaded properly. I can see in the deep link's layout json that the color is correctly included:

'volumes':'[{\'id\':113,\'project_id\':61,\'color\':\'#4383D2\',\'opacity\':0.2,\'wireframe\':false,\'subdiv\':0,\'bb\':false},{\'id\':111,\'project_id\':61,\'color\':\'#4383D2\',\'opacity\':0.2,\'wireframe\':false,\'subdiv\':0,\'bb\':false},{\'id\':112,\'project_id\':61,\'color\':\'#4383D2\',\'opacity\':0.2,\'wireframe\':false,\'subdiv\':0,\'bb\':false}]'

but that color attribute doesn't seem to be applied correctly when loading the deep link, so my volumes are displayed in a default grey color.

To reproduce

Open this link: https://radagast.hms.harvard.edu/catmaidvnc/61/links/4tnffd8 and you'll get grey volumes. I generated this deep link while the volumes were a blue-ish color (#4383D2 to be precise)

More information

In the javascript console, I do see warnings upon loading that say THREE.Color: Unknown color #438X3D2 and that must be related to the problem because the volumes are supposed to be displayed in color #4383D2. The X is presumably sneaking in there from some bug?

I know my CATMAID version is a bit old – happy to update if this is a known bug that has been fixed, but I didn't see any issue related to this.

I vaguely recall dealing with volume color/opacity loading issues when @tomka was first developing the deep links feature, but I thought everything was behaving well by the time we decided to declare victory. (I don't have access to my old email account anymore so I can't double check, sorry.)

Thanks for the help, hopefully this is a quick one.