[GRASS-SVN] r50134 - grass/trunk/raster/r.out.vtk

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jan 11 09:26:39 EST 2012


Author: neteler
Date: 2012-01-11 06:26:39 -0800 (Wed, 11 Jan 2012)
New Revision: 50134

Modified:
   grass/trunk/raster/r.out.vtk/r.out.vtk.html
Log:
+Paraview RGB visualization notes; examples updated; HTML polished

Modified: grass/trunk/raster/r.out.vtk/r.out.vtk.html
===================================================================
--- grass/trunk/raster/r.out.vtk/r.out.vtk.html	2012-01-11 14:26:31 UTC (rev 50133)
+++ grass/trunk/raster/r.out.vtk/r.out.vtk.html	2012-01-11 14:26:39 UTC (rev 50134)
@@ -1,32 +1,33 @@
 <h2>DESCRIPTION</h2>
 
-Outputs <i>Raster</i> maps in <i>VTK-ASCII</i> format.  <i>Map's</i> are
-valid Raster map's in the current mapset.  <i>output</i> is the name of
+Outputs <i>raster</i> maps in <i>VTK-ASCII</i> format. <i>Map's</i> are
+valid raster map's in the current mapset.  <i>output</i> is the name of
 an VTK-ASCII file which will be written in the current working directory.
 If <i>output</i> is not specified then <b>stdout</b> is used.  
 The module is sensitive to region settings (set with g.region).
-<br>
-<br>
+<p>
+
 Elevation, scaling, point/celldata, vector and RGB Data are supported.
 If the map is in LL projection, the elevation values will automatically scaled to 
 degrees. It is supposed that the elevation values are provided in meters. 
 If the elevation values are in a different unit than meters, use 
 the scale parameter to convert the units. 
-<br>
-<br>
+<p>
+
 If no elevation map is given, the user can set the hight of the map by one value. 
 Point or cell data are available. Also scaling is supported for this elevation value. 
 The elevation value must be provided in meters.
-<br>
-<br>
+<p>
+
 The RGB input requires three raster maps: red, green, blue  - in this order. 
 The maps must have values between 0 and 255, otherwise you will get lots of warnings
 and the values are set to 0.
 More than one RGB dataset (3 maps) is not supported. 
-<br>
-<br>
+<p>
+
 The vector input requires three raster maps: x, y, z -- defining the vector coordinates  - in this order. 
 More than one vector dataset (3 maps) is not supported. 
+
 <h2>NOTES</h2>
 This filter generates: 
 <ul>
@@ -49,18 +50,15 @@
 If elevation map is chosen, a polygonal grid is created with <i>quads</i>, 
 but the user can choose also <i>triangle strips</i> or <i>vertices</i>. 
 These dataformats a documented at <em><a href="http://www.vtk.org">VTK Toolkit</a></em>.
-<br>
-<br>
+<p>
+
 If the "-c" flag is used and the data should be visualised together with other data exported via *.out.vtk
 modules, be sure the "-c" flag was also set in these modules.
 But this will only work with data from the SAME location 
 (The reference point for the coordinates transformation is based on the center point of the default region).
-<br>
-<br>
 
+<h3>Difference between point- and celldata</h3>
 
-
-<h3>Difference between point- and celldata</h3>
 r.out.vtk can export raster cells with different representations.
 <ul>
    <li>
@@ -75,19 +73,19 @@
        can hold different values, but the user can only visualize one value at a time. 
    </li>
 </ul>
+
 <h2>EXAMPLE</h2>
 
 <h3>Simple Spearfish example</h3>
 
 <div class="code"><pre>
-#set a nice region
-g.region -d
-g.region n=4926970 s=4914857 w=591583 e=607793 res=50
+# set region
+g.region n=4926970 s=4914857 w=591583 e=607793 res=50 -p
 
-#export the data
+# export the data
 r.out.vtk input=elevation.10m,slope,aspect elevation=elevation.10m output=/tmp/out.vtk
 
-# visualize in paraview or other VTK viewer:
+# visualize in Paraview or other VTK viewer:
 paraview --data=/tmp/out.vtk
 </pre></div>
 
@@ -95,30 +93,39 @@
 
 <div class="code"><pre>
 #set the region
-g.region -d
-g.region n=4926970 s=4914857 w=591583 e=607793 res=50
+g.region n=4926990 s=4914840 w=591570 e=607800 res=30 -p
 
-#we are using r.in.onearth (available from the grass addon wiki) to create rgb data
-#get some satellite images with r.in.onearth
-r.in.onearth -l output=Sat tmband=Red
-r.in.onearth -l output=Sat tmband=IR1
-r.in.onearth -l output=Sat tmband=IR2
+# using r.in.wms to create RGB data to get a satellite coverage
+r.in.wms layers=global_mosaic mapserver=http://wms.jpl.nasa.gov/wms.cgi \
+         output=wms_global_mosaic
 
-#export the data
-r.out.vtk rgbmaps=SatLandsatTM_IR1,SatLandsatTM_IR2,SatLandsatTM_Red elevation=elevation.10m output=/tmp/out.vtk
+# export the data to VTK
+r.out.vtk rgbmaps=wms_global_mosaic.red,wms_global_mosaic.green,wms_global_mosaic.blue elevation=elevation.10m output=/tmp/out.vtk
 
-# visualize in paraview or other VTK viewer:
+# visualize in Paraview or other VTK viewer:
 paraview --data=/tmp/out.vtk
 </pre></div>
 
-<br>
+<b>Paraview RGB visualization notes</b><br>
+To achieve proper RGB overlay:
+<ul>
+<li> In Paraview, click "Apply"
+<li> Select the "Display" tab and choose "Color by" to switch from input scalars to rgb scalars
+<li> Disable the "Map Scalars" check button in the display tab to avoid the use of a lookup table 
+</ul>
+
 <h2>SEE ALSO</h2>
 
-<em><a href="r3.out.vtk.html">r3.out.vtk</a></em><br>
-<em><a href="r.out.ascii.html">r.out.ascii</a></em><br>
-<em><a href="g.region.html">g.region</a></em><br>
+<em>
+<a href="r3.out.vtk.html">r3.out.vtk</a>,
+<a href="r.out.ascii.html">r.out.ascii</a>,
+<a href="g.region.html">g.region</a>
+</em>
 
-<h2>AUTHORS</h2>
+<br>
+<a href="http://grass.osgeo.org/wiki/GRASS_and_Paraview">GRASS and Paraview Wiki page</a>
+
+<h2>AUTHOR</h2>
 Soeren Gebbert
 
 <p><i>Last changed: $Date$</i>



More information about the grass-commit mailing list