David Thompson:
 |>      If you have some arbitrary field with colors and a colormap, and you
 |>want to convert it to field with direct colors, what's the simplest way to
 |>do that?  Map comes to mind, but I clearly don't want interpolation. 
 |>
 |>      Is there a module for this I've forgotten about?
 |
 |I would assume that Lookup could be used quite easily, but its ins 
 |and outs always get me and takes me quite a while to remember how to 
 |use it.

Lookup works well:

   cmap       = Extract  ( field, "color map" );
   #cmap_field = Construct( {[0]}, {[1]}, 256, cmap );
   field2     = Mark     ( field, "colors" );
   do_it      = Lookup   ( field2, cmap, "colors" );

If the "color map" is fed into Lookup as a naked array (cmap), it's about
as fast as using Color with a colormap field (cmap_field) -- 4 seconds.  If
you feed cmap_field into Lookup though, it takes quite a bit longers (30
seconds) for some reason.

Thanks David.  I prefer the Lookup method since the speed is comparable and
you don't have to build the dummy field to get it to work.

Randy

-- 
Randall Hopper (mailto:[EMAIL PROTECTED])
Lockheed Martin Operation Support
EPA Scientific Visualization Center
US EPA N127-01; RTP, NC 27711

Reply via email to