[GRASS-user] r.colors -e for G3d?

Hamish hamish_b at yahoo.com
Wed Jun 15 02:19:38 EDT 2011


Hi,

I've got a 3D raster with a very skewed distribution.
For viewing the slices (r3.to.rast) I'd like to use a
single set of color rules for all of the z-levels.

So I'd like to run the ever-amazing 'r.colors -e' to
equalize over the full distribution, but how to do
that for all the z-level slices at once?

ideas:
-r.region translate them and then patch them all
together on the same horizontal plane, calc the color
rules, then apply the mosaic's set of rules to all
the original slices.

-same but interleave the slices at 1/n resolution
instead of r.region + r.patch.

-use `r3.univar -e percentile=a,b,c,d,...` to re-
create what `r.colors -e` does, perhaps poorly.
(is there a set number of histogram steps r.colors -e
breaks things up into? the 256 from lib/gis/color_hist.c?)

-modify r.colors's get_fp_stats() to scan over
multiple input rasters in a loop?


The rules file I'd like to use starts out with 263
levels, so more than I'd like to interpolate by
hand.
(grass-addons/raster/r.colors.tools/palettes/palette_sst.gcolors)

my data is all > 0.0


once I have that I'd like to write an addon module
which converts a grass color table to a VTK .xml
color table, so they can be used there too, and also
figure out how to auto-set NVIZ G3D isosurface
colors from them.


thanks,
Hamish



More information about the grass-user mailing list