Transfer Feature Color Modes to Blender View
Closed this issue · 4 comments
Hi @tinevez,
I have been recently using the Feature Color Modes with the intent to visualize these colors in 3d using the Blender-Bridge. Unfortunately, the Blender import from Mastodon only understands color information coming from tags. I had a quick talk with @stefanhahmann and he said in principle, we could introduce a new button into the Feature Color Modes GUI that would generate a new tag set from any previously created color feature. Do you think this could be a solution for this issue or are there better options?
Hello @jgirstmair
I think we could find a better way. The problem with this approach is that it requires creating a tag-set structure with tags and colors taken from discretized feature values,, binning colors together. That would feel a bit clumsy and brittle, and invalidated as soon as the user modifies the tag-set structure or the feature color mode.
I would be more elegant to make the blender bridge works with the feature color mode no? What are the limitations that block this?
Right now Blender reads tables from a .csv file including color information from tags, @maarzt correct? Maybe we could write the generated color feature values of the current .mastodon project into the .csv file before sending it to Blender. Could this work?
I think so yes. It is possible to encode a RGB color over a single int
.
This is what the core interface for coloring objects from features does:
https://github.com/mastodon-sc/mastodon/blob/master/src/main/java/org/mastodon/ui/coloring/ColorGenerator.java#L42-L53
and it could be reused as is.
I am closing this issue in favor of mastodon-sc/mastodon-blender-view#23