Closed GuillaumeLeGoc closed 7 months ago
Interesting :laughing: ! Thanks for your detailed issue description... I'd be happy with adding this feature. Is this something you could/would like to contribute @GuillaumeLeGoc (it sounds like you're almost there anyway)?
I don't know if you plan to retire brainrender in favor of the napari plugin in the near future (but the latter don't have the cell density feature out of the box -- yet ? π)
I am hoping (and it's in our roadmap) that brainrender-napari
would match the features of brainrender
by this summer, but I presume we'd keep maintaining brainrender
for a while after that (Some of the codebase might even be shared in the future and they would exist as alternative frontends for the same thing).
I drafted up a PR, navigating in highly unknown waters (tests, pre-commit, ...?). I hope that's ok π
Is your feature request related to a problem? Please describe. The colormap used in cell density is set to "Dark2" : https://github.com/brainglobe/brainrender/blob/980a76fee9796595561f99e760083cafea09f62d/brainrender/actors/points.py#L143
Describe the solution you'd like The PointsDensity class could accept a kwarg
cmap=colormap
in its constructor. Now,kwargs
are passed to vedo'sPoints.density
.Describe alternatives you've considered
PointsDensity
returns a vedo Volume, so I tried setting its color after its creation, mimicking what is done in PointsDensity : https://github.com/brainglobe/brainrender/blob/980a76fee9796595561f99e760083cafea09f62d/brainrender/actors/points.py#L140-L145This results in a weird box being plotted next to my brain :
Modifying the local actors/points.py file with the colormap I want yields the good result.
I don't know if you plan to retire brainrender in favor of the napari plugin in the near future (but the latter don't have the cell density feature out of the box -- yet ? π) but specifying the colormap would be nice. Cheers !