pycortex
pycortex copied to clipboard
VolumeRGB and VertexRGB don't have the same signature and functionality (e.g., `shared_range`, custom colors, etc.)
The main issue is:
VolumeRGBacceptsshared_vmin, shared_vmax, shared_rangeto ensure that the same vmin, vmax are used across the three channelsVertexRGBdoes not accept any of those keyword arguments. But callingVertexRGB(..., shared_vmin=0, shared_vmax=1, shared_range=True)succeeds.
I spent way too much time debugging RGB maps on fsaverage only to realize that VertexRGB does not have a shared_range kwarg. But because we pass **kwargs to most pycortex objects, VertexRGB did not blow up (as it should do when an unsupported keyword argument is passed).
The safest option is still to pass uint8 values to either VolumeRGB or VertexRGB rather than using float and relying on vmin/vmax.
BUT we should uniform the signature of both {Volume,Vertex}RGB to avoid this issue.
(And perhaps avoid passing **kwargs in general unless we explicitly raise ValueErrors if a keyword is not supported.)