[GRASS-dev] colors for volumes

Helena Mitasova hmitaso at unity.ncsu.edu
Thu Nov 11 00:19:25 EST 2010


just a follow up that copying a suitable color file to the given grid3 file directory works
and creating a pretty complex visualization with cut-off slices and isosurfaces was surprisingly easy
(there is apparently a small bug in the GUI when entering the value for isosurface - it does not
allow me to type anything until I accept it empty and re-open it - other than that it worked great).
This was with the Tcltk nviz - as far as I remember slices are not supported in wxnviz yet.

Suzanne, I will email you more details on how to modify your colors,

Helena

-------------- next part --------------
A non-text attachment was scrubbed...
Name: JRxytz_2slices_isosurf.jpg
Type: image/jpg
Size: 74126 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20101111/580fbe29/JRxytz_2slices_isosurf-0001.jpg
-------------- next part --------------

Helena Mitasova
Associate Professor
Department of Marine, Earth, and Atmospheric Sciences
2800 Faucette Drive, Rm. 1125 Jordan Hall
North Carolina State University
Raleigh, NC 27695-8208
hmitaso at unity.ncsu.edu





On Nov 10, 2010, at 11:33 PM, Helena Mitasova wrote:

> We are trying to work with some volume data and we haven't been able to find a module that 
> would actually create a color file for grid3d.
> Apparently nviz reads the colors from the color table if it is present
> http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/lib/ogsf/Gvl3.c
> 
> and the G3D library provides functions for color support
> http://grass.osgeo.org/programming6/g3dlib.html
> 
> G3D Color Support
> Applications can use the standard grass functions to work with colors, except for the file manipulations.
> int G3d_removeColor(char *name) Removes the primary and/or secondary color file. See G_remove_colr for details.
> Returns always 0.
> int G3d_readColors(char *name, char *mapset, struct Colors colors) Reads color file for map name in mapset into the colors structure. See G_read_colors(Raster_Color_Table) for details and return values.
> int G3d_writeColors(char *name, char *mapset, struct Colors colors)Writes colors stored in colors structure into the color file for map name in mapset. See G_write_colors (Raster_Color_Table) for details and return values.
> 
> but there is no r3.color (based on r.color?) and rather surprisingly v.vol.rst does not create a color file (as v.surf.rst does),
> neither do r.to.rast3 or v.to.rast3 (those probably are OK to use the default colors).
> I assume that writing or copying a color file into the relevant grid3d directory would work (I can try it out),
> but that is not a solution for normal users - I am wondering how difficult it would be to write r3.color module,
> to make the colors on 3D rasters adjustable
> 
> Helena _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev



More information about the grass-dev mailing list