[Chimera-users] Surface color key

Thomas Goddard goddard at cgl.ucsf.edu
Wed Jul 19 22:00:31 PDT 2006

Hi Alex,

  Chimera is not able to produce a color key for coloring done
with the Surface Color tool.  I think the best way to proceed is to use
Photoshop or GIMP (free).  I believe you can make rectangles with linear
color gradients in both those image editting programs.  You would need
to record the radii and (red, green, blue) color values for each radius
used in Chimera and use the same colors in Photoshop or GIMP.

  The trouble with making the key in Chimera is that Chimera has very
limited 2-D graphics capabilities -- only 2D text labels are
available.  I haven't tried making the color key in Photoshop or GIMP
and it may prove difficult.

  Here is a way to make the color bar in Chimera that makes a cube and
colors it with the Surface Color tool by distance along the X axis.
Then you save the image, cut a strip of it out using Photoshop and add
labels.  Use menu entry Tools / Utilities / Benchmark, set the
standard model size to 256 in the Benchmark dialog and press the
"surface" button under the "Show standard model" line (*not* the
surface button on the top line).  This shows a cube with extent -1 and
+1 along each axis.  The surface is composed of triangles on a 256 by
256 grid on each square face.  The surface will be listed in the menu
in Surface Color dialog that you used to do the radial coloring -- it
will just show its model number since it has no name.  Choose that
surface in the Surface Color dialog and switch to coloring it using
"Height".  Set the axis to "1 0 0" (x-axis).  Hopefully you still have
the radial colormap shown in the Surface Color dialog.  Now adjust the
data values by dividing them by 100 or some other value so that they
lie in 0 to 1.  Maybe you will want to subtract a constant so that the
values range from about -1 to 1 so most of the cube is colored.  Press
the Color button to show this coloring.  Press the orient button on
the volume dialog to show the standard orientation (box aligned with
xy axes).  Save the Chimera image.  When you add text labels in
Photoshop to a strip cut from this image just linearly interpolate
along the strip between the smallest and largest radius -- that is
exactly correct.

  Looks like I could add to Surface Color some code to make the color
key using a rectangular Chimera surface without all the rigamarole.
I've added that to my requested feature list although I do not expect
it to be implemented soon because there are many higher priority
features to add.


More information about the Chimera-users mailing list