BIC-MNI / Display

MNI Display project, converted from CVS
Other
8 stars 4 forks source link

Change lookup table for labels? #8

Closed gdevenyi closed 9 years ago

gdevenyi commented 9 years ago

I'd like to generate a "visually distinct" colormap for Display's labels, using the tool http://tools.medialab.sciences-po.fr/iwanthue/

Based on https://github.com/BIC-MNI/Display/blob/850a50a4fa17349c0538673823607b0c1ebd7e37/slice_window/colour_coding.c#L85-L146 the colours are generated on the fly, is there somewhere I can override that?

rdvincent commented 9 years ago

The "Load Colour Map" command should do what you want. It's under the "File" menu. You need to create a file with the extension ".map" that contains a series of lines of the form: <label number> <desired-colour> The colour can be specified as three R G B values in the range 0-1, or as one of the colour names Display recognizes (e.g. "blue").

rdvincent commented 9 years ago

@gdevenyi Have you tried this yet?

gdevenyi commented 9 years ago

Woops, I didn't see your original reply. Yes it does!

Here's my map (generated from iwanthue) if you want to give it a try http://cobralab.net/files/label-lookup.map

gdevenyi commented 9 years ago

P.S. Any way I can do this on the command line?

rdvincent commented 9 years ago

@gdevenyi Display should correctly load colormap files and labels from the command line.

gdevenyi commented 9 years ago

So it does. I was expecting a flag but it will just happily use the file if you give it as an input. Thanks!

rdvincent commented 9 years ago

A flag is required to differentiate label files from other .mnc files, but .obj and .map files don't require any special flag.

gdevenyi commented 9 years ago

I generated a new map which cuts out the low-lightness colours so that colours are more distinct from the greyness of the brain: http://cobralab.net/files/distinct-labels.map

Finding this really helpful for lots of labels in small regions. Thanks for your help!