color maps for brain maps

91 views
Skip to first unread message

binarybottle

unread,
Apr 12, 2010, 11:18:59 PM4/12/10
to BrainCOLOR
thank you all very much for your thoughtful responses in our recent
discussion about coloring brain maps. i thought i should include them
as a thread in our google group. below are the messages without
images:

-----

hello!

a question for all labeling enthusiasts, perfect for a brain color
crowd:

who has given color schemes for brain labels some serious thought?
that is, color maps suitable for brain mapping, if not for framing?

at first, a hierarchical coloring scheme where the major lobes have
general colors (like green, red, etc.) with parcellation units having
variants on the major lobe color (like green-yellow, dark green, etc.
for the "green" lobe) sounds attractive, but i have concerns over how
distinctive the anatomical boundaries would be.

any thoughts or experience on the matter?

cheers,
@rno

-----

Hi Arno, et al.

It is possible to N-color a brain in some optimal way, as brain
parcellations are fairly similar to political maps, which can be 4-
colored. The algorithm is somewhere in ImageMath. I don't know
enough about the topology of the labels to be able to claim 4 is
enough ... anyway, I recognize that you don't want only 4 colors but
it is worth thinking about writing an algorithm that could "find" the
best coloring for the major set of labels and then also for the sub-
labels given a reasonable set of rules, perhaps based on vision and
contrast.

Just a thought.

B.A

-----

let me throw another constraint into this picture. the labels will
likely need to differ depending on inflated/non-inflated
representations.

cheers,
satra

-----

I know we have tried a few color schemes here. When I picked mine, I
did it manually just to try to make each gyrus distinct from its
neighbors. We've also tried coloring subdivisions using shades of a
single color, but I don't think that worked out well. I will check
with Amanda Hammond (our visualization director/graphic designers)
about that one.

It may be the case that you want different schemes for different users
(e.g., those who are generating the labels, different types of end
users, etc.).

It would also be good to have a scheme that is suitable for people who
are colorblind.

[david shattuck]

-----

Arno Klein

unread,
Apr 12, 2010, 11:22:00 PM4/12/10
to brain...@googlegroups.com
---------- Forwarded message ----------
From: Andrew J. Worth <An...@neuromorphometrics.com>
Date: Wed, Mar 31, 2010 at 11:21 AM
Subject: Re: color maps for brain maps

Hi All,

I think this color scheme is very important and we should spend some serious though on it.  For one, I know that the current scheme we are using is not so good:

NMM NMM

I believe that our scheme is based on the MGH CMA colors.  Even ignoring the blocky voxelization (these surfaces are not smoothed so we can see parcellation errors), this doesn't look good.   The random saturated colors emphasize certain borders and not others for no particular reason. 

The Mai/Paxinos/Voss atlas does a better job (though this is a bad picture):
Mai/Paxinos/Voss

And the Economo/Koskinas atlas as colored by Triarhou does this:
Economo/Koskinas/Triarhou

I think it should be possible to choose points in color space for all regions of interest that are distinct from each other (to give good apparent boundaries) and also to group those points together in color space to reflect the grouping, for instance, of regions within lobes.

Of course as far as software goes, you can swap in any old color map to change between different schemes so it would be easy to sample the above published schemes and compare them all on real parcellation results.

Andy.
Picture 3.png
Picture 2.png
Picture 4.png
Picture 1.png

Arno Klein

unread,
Apr 12, 2010, 11:31:03 PM4/12/10
to brain...@googlegroups.com

bennett --

this is along the lines of what i was thinking -- a psychophysics solution that considers perceptual differences of luminance and color.  i look forward to doing some experimentation with this, keeping in mind previous comments and concerns regarding optimal color mapping, color blindness, surface vs. volume representation, and colormaps used for existing brain atlases.

cheers,
@rno

---------- Forwarded message ----------
From: Bennett Landman <bennett...@vanderbilt.edu>
Date: Wed, Mar 31, 2010 at 12:38 PM
Subject: RE: color maps for brain maps

I was thinking about something exactly like this and coded up a quick solution.

We could find a color scheme to optimize a weighted combination of the :

1.       minimal perceptual difference between any two labels

2.       minimal chrominance difference between any two labels within a set of labels.

Four our cortical surfaces, we have 33 labels in 6 general categories.


Basically – 6 groups: browns, blues, pinks, cyan, greys, purples.

We could fold in addition constraints, such as on L* (to prevent black/white labels) – any artists with Matlab want to play with some code?

If you send me a .vtk or a matlab mesh dataset, I can try out some color schemes too.

-Bennett

image007.jpg

Bennett Landman

unread,
Apr 12, 2010, 11:39:44 PM4/12/10
to brain...@googlegroups.com

Definitely fun to play with. Let me know if you want to work together on anything. I’m finishing this term’s finals while getting new students ramped up for the summer. Great times!

image001.jpg

Arno Klein

unread,
Apr 12, 2010, 11:42:15 PM4/12/10
to brain...@googlegroups.com
---------- Forwarded message ----------
From: Bennett Landman <bennett...@vanderbilt.edu>
Date: Thu, Apr 1, 2010 at 2:52 PM
Subject: RE: color maps for brain maps

This was generated by:

argmin perceptualLumaPenalty – perceptualPairwiseDiff + perceptualGroupwiseColorSimiliarity

I used the simplex method based on the CIE L*a*b* colorspace. The result is to keep all the colors in a reasonable luminance range (no dark gray/white), find colors such that the minimal perceptual difference between any two colors is maximized and choose chrominance for groups keeps various structures in the same color family. We could easily factor in geographic weightings to give more importance to local perceptual differences.

Adjusting the relative importance weightings of these criteria is an art form (as is adjusting the initial color seeds for each grouped region). It’s fun – and the results are pretty.

Purples – frontal.

Reds – parietal

Green – temporal

Teal – occipital

Cingulate is also colors.

 


[Re: problems of using a "color family" for the color-blind]

We could easily alter optimization function (the CIE function) for trichromatic to include monochromacy, dichromacy, or anomalous trichromacy. These have well defined color models which are “easy” to use.
image001.jpg

Andrew J. Worth

unread,
Apr 13, 2010, 9:14:41 AM4/13/10
to brain...@googlegroups.com
Wow, very cool Bennett!

It looks like you've come up with a nice color-choosing tool.  What does it run on?  What I mean is, can I implement it within NVM or VTK?  Where there is an art, an artist is needed -- I'd like to see what the Anatomists can do with this when they have access to all of the parameters.  There are multiple color schemes in NVM that need to be set up (cortical, subcortical & white matter).  I'm thinking that WM parcellation could be shown with the same colors as the cortical parcellation units except for a larger value for L* (i.e. "whiter").

Andy.

Bennett Landman

unread,
Apr 13, 2010, 11:41:01 AM4/13/10
to brain...@googlegroups.com

I’m thrilled to see that there is interest – and I appreciate Arno’s insight. I’ll clean up the code and make a little demo. Currently, it runs in matlab, but the approach is simple and can be ported simply. I’ll try to get this wrapped up in the next two weeks – we’re closing out for finals and things are quite busy.

image001.jpg

Jason Tourville

unread,
Apr 13, 2010, 2:31:32 PM4/13/10
to brain...@googlegroups.com
I'm anxious to see this how this type of color scheme (groups of regions within a particular area share a color family) looks during the labeling process. My hunch was that while this is great for displaying data, it would increase errors during the labeling process.  However, if we can find enough easily differentiable colors within each group, this may actually improve error detection. This would be more likely with more groups, so rather than just lobular groups, add others (e.g., orbitofrontal, peri-Sylvian, medial frontal/parietal/occipital). Any thoughts on what the maximum number of groups (i.e., color families) might be?

Jason

On Tue, Apr 13, 2010 at 11:41 AM, Bennett Landman <bennett...@vanderbilt.edu> wrote:

I’m thrilled to see that there is interest – and I appreciate Arno’s insight. I’ll clean up the code and make a little demo. Currently, it runs in matlab, but the approach is simple and can be ported simply. I’ll try to get this wrapped up in the next two weeks – we’re closing out for finals and things are quite busy.

 

From: brain...@googlegroups.com [mailto:brain...@googlegroups.com] On Behalf Of Andrew J. Worth


Sent: Tuesday, April 13, 2010 8:15 AM
To: brain...@googlegroups.com




--
Jason A. Tourville, Ph.D.
Research Assistant Professor
Department of Cognitive and Neural Systems
Boston University
677 Beacon St.
Boston, MA 02215
Phone: (617)353-6181
Fax: (617)353-7755
image001.jpg

Bennett Landman

unread,
Apr 14, 2010, 2:20:53 PM4/14/10
to brain...@googlegroups.com

Any particular recommendations on a group structure? The main obstacle is that with more colors, the perceptual difference between any two colors decreases.

image001.jpg

Arno Klein

unread,
Jul 14, 2010, 12:14:16 AM7/14/10
to brain...@googlegroups.com

bennett --

is the code you were working on regarding
minimal perceptual difference + group chrominance in a state that's ready to share? 

cheers,
@rno



On Tue, Apr 13, 2010 at 11:41 AM, Bennett Landman <bennett...@vanderbilt.edu> wrote:

I’m thrilled to see that there is interest – and I appreciate Arno’s insight. I’ll clean up the code and make a little demo. Currently, it runs in matlab, but the approach is simple and can be ported simply. I’ll try to get this wrapped up in the next two weeks – we’re closing out for finals and things are quite busy.

 

From: brain...@googlegroups.com [mailto:brain...@googlegroups.com] On Behalf Of Andrew J. Worth


Sent: Tuesday, April 13, 2010 8:15 AM
To: brain...@googlegroups.com

image001.jpg

Bennett Landman

unread,
Jul 14, 2010, 1:08:54 PM7/14/10
to brain...@googlegroups.com

Short answer no. But… here it is anyway.

 

The files perceptual… define perceptual error penalties between sets of colors.

 

perceptualLumaPenaltyCIE – computes a soft minimum brightness for any label

 

perceptualPairwiseDiffCIE – computes the average minimum distance between any two label colors

 

perceptualGroupwiseColorSimiliarityCIE – computes the average minimum distance between members of groups of colors.

 

Colorspace.m is a library routine for converting between colorspaces.

 

I throw all the above into an optimizer with some tradeoff balancing terms… poor … out spits a new color map.

 

Convergence is not that fast and the “quality” of the results is subjective. L

 

It’s going to take some artistic skill to define appropriate tradeoffs, but these metrics provide very reasonable handles to control quantitative metrics of “optimality”.

 

Here’s an example code:

 

 

L = [7 5 4 5 5 6];

 

N = sum(L);

 

LL= ((hsv(length(L))));

 

RGB = 0*((hsv((N))));off=0;

for i=1:length(L)

    for j=1:L(i)

    RGB(off+j,:)=LL(i,:);

    end

    off = off+L(i);

end

RGB=min(1,max(0,RGB+randn(size(RGB))/30));

 

B = COLORSPACE('RGB->LAB',RGB);

B(:,1)=80+40*(rand(size(B(:,1)))-.5);

RGB=COLORSPACE('RGB<-LAB',B);

 

B(:,1)=80;

RGB=COLORSPACE('RGB<-LAB',B);

options = optimset('TolX',.01,'MaxIter',1e5,'Display','iter');

xRGB = COLORSPACE('RGB->LAB',RGB);

x = fminsearch(@(x) .5e5*perceptualLumaPenaltyCIE(x(:),80,5)-10*perceptualPairwiseDiffCIE(x(:))+perceptualGroupwiseColorSimiliarityCIE(x(:),L)/5,xRGB,options);

 

B=reshape(x,[length(x(:))/3 3]);

B(:,1) = min(255,max(0,B(:,1)));

B(:,2) = min(255,max(-255,B(:,2)));

B(:,3) = min(255,max(-255,B(:,3)));

 

x=COLORSPACE('RGB<-LAB',B);

 

figure(1)

close all; imagesc(1:N); colormap(min(1,max(0,x))); axis off

title('New');

 

figure(2)

imagesc(1:N); colormap(RGB); axis off

title('Original');

 

 


Result:

image001.jpg
image002.png
image003.png
colorspace.m
perceptualGroupwiseColorSimiliarityCIE.m
perceptualLumaPenaltyCIE.m
perceptualPairwiseDiffCIE.m

Arno Klein

unread,
Jul 14, 2010, 1:31:13 PM7/14/10
to brain...@googlegroups.com

thanks, bennett! 

i have a lot of grant writing this fall, so i want to make sure i've got the roygbiv and colormap projects wrapped up before sfn rolls around...

cheers,
@rno


From: brain...@googlegroups.com [mailto:brain...@googlegroups.com] On Behalf Of Arno Klein

image001.jpg
image003.png
image002.png

Bennett Landman

unread,
Jul 14, 2010, 1:38:32 PM7/14/10
to brain...@googlegroups.com

Good plan. We’re wrestling with SPIE-MI down in Nashville – along with seemingly constant thunderstorms. Once we get a few bugs worked out, I’ll send you a preview of our labeling adventures… they might be useful for the brainColor project.

 

-bennett

image002.png
image003.png
image004.jpg

Arno Klein

unread,
Oct 25, 2010, 11:28:49 AM10/25/10
to braincolor, Ramin Parsey

hello!

given that neuroscience 2010 is right around the corner, i took a break from grant writing to give the brain-coloring a go myself so that i would understand the issues more intimately.  i approached it a bit differently than bennett.  in order to assure maximally distinct colors, i thought that it would be a good idea to choose as close to a perceptually uniform color space as possible.  i chose CIELuv (http://en.wikipedia.org/wiki/CIELUV_color_space) and tried three different experiments:
  1. uniform sampling of the actual CIELuv chromaticity diagram (fixed luminance)
  2. uniform sampling of CIE L*u*v* space
  3. uniform sampling of the CIELch cylindrical representation of CIELuv
in the attached image, i have uniformly sampled the CIELch hues at staggered luminosities for 33 colors (as bennett had done) and 62 colors (the number of cortical regions in the present braincolor protocol), and converted the colors to srgb (using the python-colormath library for conversions to rgb: http://code.google.com/p/python-colormath).  the problem with this (and all three experiments) is that the CIE color model encompasses all colors perceptible by a normal human, which extends well beyond the color gamut of electronic monitors that usually resort to srgb:

two more things to think about: 
  • we could sample srgb colors transformed to the CIELuv/CIELch space so as to uniformly sample within the color gamut we expect labelers to label in.  this has been done in far too complicated ways by others:
"A web service to personalise map colouring" (Steinruecken, Joerg)
"Uniform color scale applications to computer graphics" (Tajima, J 1983)
  • neighborhood mapping.  initial grouping of colors into a color family for each lobe would be very easy -- all i have to do is to divide the CIELch cylindrical pie up any way i please and uniformly sample within each slice of the pie.  however, at 63 colors the distinctiveness would be low, even with staggered luminosities (and the colors would be indistinguishable for people with any form of color blindness). but perhaps this could be alleviated by maximizing distinctiveness of regions that share the same border (as brian and satra mentioned).
unfortunately,  i have more grant deadlines before sfn, so any help would be greatly appreciated -- this means feedback, too!  i was very pleased with what bennett was able to produce in such a short stint.  if we can pull something good together very rapidly, i would be happy to make a poster for sfn.  if not, then i would be happy to put some more time into this later to do a more thorough job...

cheers,
@rno
image007.jpg
CIELch_33colors_62colors.png

Arno Klein

unread,
Oct 25, 2010, 1:47:35 PM10/25/10
to braincolor, Ramin Parsey

hello again!

since i wrote the previous email, i have received responses to a few of the emails i have been sending to authors of interesting colormap papers i've been reading (see one in the p.s.).

and let me relay a very interesting suggestion from satra this afternoon.  rather than try to create a colormap where all colors are very distinct from one another, concentrate on making the boundaries distinct.  for example, one could have the center of a region be one color and the outer boundary one or more different colors, distinct from the boundaries of the adjacent regions.  in my mind, this helps us to think of the problem from two perspectives, that of a viewer vs. that of a labeler.  andy and jason, correct me if i'm wrong, but a labeler doesn't need to see big differences among big regions that most viewers are interested in, but needs to see the individual boundaries clearly as they're drawing them.  if this is indeed true, then implementing a colormap for boundaries could potentially sidestep the problem.  (a middle ground could perhaps be achieved by using radial gradients, with a central color easing into its boundary coloar.)

cheers,
@rno

p.s. dmitri, the author of one of the links i sent, wrote to me:

"I believe you need to start making assumptions, or just go by the assumptions that have already been made. One of them, is that the CIELAB/CIELCH is perceptually uniform, which it isn't. This lack of uniformity is twofold: differences among more or less chromatic colors (the higher the chromaticity the less detectable the color differences to the human observer), and differences in the degree of uniformity among different hues (a DE od 1.00 for yellow colors is different than a DE of 1.00 for blue colors). In order to compensate for this lack of uniformity the scientific community has chosen to develop improved color difference calculation formulas instead of new color spaces. Therefore you get DEcmc, DE94 and DE2000.

That being said, unless you want to solve the color science problem, follow the assumptions. I'd say you need to chose a color space, and then map the highest chromatic value within that color space. Chormaticity and lightness might need to vary as the chromaticity and lightness of yellow is so much different than the chromaticity and lightness of cyan or red. If I were to attempt a project like yours, I would just pick up the colors that are different more than 0.30 DE2000 from each other, that are within the color gamut of a given color space, and that are within 0.3 DC of the outer gamut (or at the 96th percentile of the reproducible chromaticity) within a given hue. Does this make sense? I'm just suggesting three assumptions as the asnwer to your question is most likely no: the colors are not perceptually uniform, but we assume that they are.

You would get more than 60 distinct colors."
image007.jpg

Andrew J. Worth

unread,
Oct 25, 2010, 3:15:52 PM10/25/10
to brain...@googlegroups.com, Ramin Parsey
Hi All,

Good work, Arno!  I'll have to think about that some more, but in the meanwhile, I wanted to mention that Jason and I have been diligently at work for the SfN poster.  We're taking Jason's protocol figures and setting them up so they can be easily re-colored by an arbitrary color map.  By the end of the day, I should have a working example.  The python code I'm writing works in two parts.  In the first, an eps file is prepared to be recolored by identifying each colored region.  In the second, the prepared file is recolored using a specified label map file.

If we can combine Bennett's/Arno's code with my script we'll be able to generate some nice looking color maps.  I'm assuming that we'll be able to edit the maps by hand or else set the constraints such that good color combinations will come out.  I am looking forward to seeing what Jason might produce using such a tool.  

For the poster, we don't have to have solved all possible brain color mapping problems, we just have to have a convincing demo of the tool.

Andy.

<image007.jpg>

Arno Klein

unread,
Oct 25, 2010, 3:22:05 PM10/25/10
to brain...@googlegroups.com, Ramin Parsey

that's good news, andy and jason!

if you've gotten this far, perhaps then i will try the srgb gamut sampled within CIELch with varying chromaticity.  bennett, if you've got something closer to the finish line for 62 cortical labels, please speak up!

cheers,
@rno

Jason Tourville

unread,
Oct 25, 2010, 3:30:40 PM10/25/10
to brain...@googlegroups.com, Ramin Parsey
Hi there,
Andy recently pointed out that I have not yet provided you with a list of the cortical ROIs grouped by anatomical criteria. My apologies for this. Attached you will find a word doc that lists the ROIs of the "MGS" protocol grouped by primary (lobular) and secondary (roughly surface orientation) categories. The lobular division is fairly standard and one that we should probably respect in the first pass. You needn't feel constrained to the secondary subdivisions, however. Let me know if another format for this doc or some input regarding anatomically-motivated modifications would be useful

Arno alluded to the notion that a color scheme optimized for a labeler (group 1) may be different than one optimized for anatomy students, teachers, brain mappers, atlas publishers, etc (group 2). I think this is a key point. For the labeler, maximum contrast between adjacent regions is key. Such a person has no need for color groupings by category, anatomical or otherwise. Anatomical color groupings would actually make the job harder. For group 2, the color groupings provide a useful means of communicating some organizing principle. While the two different goals are related (optimizing perceptual contrast with a some range), I suspect that it might be far easier to accommodate the labeler than the others. The other group, however, is much bigger (including newbie labelers!) and is probably the one toward which this effort, or at least the poster, should be geared. Unlike labelers, who want to distinguish a region label and move on as quickly as possible, these users will likely spend more time studying the atlas and using the colors as a means of grouping rather than discretizing brain regions. My not-very-brief point is that I think we should approach these two target audiences differently and, for now, focus less on getting the highest contrast distance within a color group and more on creating appealing color families and flexibility. 

Regarding Satra's suggestion, this sounds like a great idea for group 2 as it would provide a means of increasing contrast within a color group. It might be trouble for volume labelers, however. It implies that a region color on one slice would differ from that same region on another slice. This variation could make the labeler's job a little harder and, I'm not sure if it's necessary. On the other hand, I'd be interested in seeing how this would look on volume data if it's easy to implement.

Hope these points are worth the time it took to read them!

Jason 



image007.jpg
ROI_groupings.doc

Arno Klein

unread,
Oct 25, 2010, 9:51:51 PM10/25/10
to braincolor, Ramin Parsey

thank you for the document and for your comments, jason!

and i believe that you're right -- we should consider both use cases, but target the didactic/illustrative case (group 2) first for our poster.

as for applying different colors for the center of an roi and its boundary, i believe that this could be done in a useful way for volume-based labeling as well.  i think it would be easier if i were to sketch the ideas out on paper...

cheers,
@rno
image007.jpg
Reply all
Reply to author
Forward
0 new messages