This file is indexed.

/usr/share/doc/grass-doc/html/r3.out.vtk.html is in grass-doc 6.4.3-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>GRASS GIS manual: r3.out.vtk</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="grassdocs.css" type="text/css">
</head>
<body bgcolor="white">

<img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade>

<h2>NAME</h2>
<em><b>r3.out.vtk</b></em>  - Converts 3D raster maps into the VTK-ASCII format.
<h2>KEYWORDS</h2>
raster3d, voxel, export
<h2>SYNOPSIS</h2>
<b>r3.out.vtk</b><br>
<b>r3.out.vtk help</b><br>
<b>r3.out.vtk</b> [-<b>psmoc</b>]  [<b>input</b>=<em>name</em>[,<i>name</i>,...]]   [<b>output</b>=<em>name</em>]   [<b>null</b>=<em>float</em>]   [<b>top</b>=<em>string</em>]   [<b>bottom</b>=<em>string</em>]   [<b>rgbmaps</b>=<em>string</em>[,<i>string</i>,...]]   [<b>vectormaps</b>=<em>string</em>[,<i>string</i>,...]]   [<b>elevscale</b>=<em>float</em>]   [<b>dp</b>=<em>integer</em>]   [--<b>verbose</b>]  [--<b>quiet</b>] 

<h3>Flags:</h3>
<DL>
<DT><b>-p</b></DT>
<DD>Create VTK pointdata instead of VTK celldata (celldata is default)</DD>

<DT><b>-s</b></DT>
<DD>Create 3d elevation output with a top and a bottom surface, both raster maps are required.</DD>

<DT><b>-m</b></DT>
<DD>Use 3D raster mask (if exists) with input maps</DD>

<DT><b>-o</b></DT>
<DD>Scale factor effects the origin</DD>

<DT><b>-c</b></DT>
<DD>Correct the coordinates to fit the VTK-OpenGL precision</DD>

<DT><b>--verbose</b></DT>
<DD>Verbose module output</DD>
<DT><b>--quiet</b></DT>
<DD>Quiet module output</DD>
</DL>

<h3>Parameters:</h3>
<DL>
<DT><b>input</b>=<em>name[,<i>name</i>,...]</em></DT>
<DD>G3D map(s) to be converted to VTK-ASCII data format</DD>

<DT><b>output</b>=<em>name</em></DT>
<DD>Name for VTK-ASCII output file</DD>

<DT><b>null</b>=<em>float</em></DT>
<DD>Float value to represent no data cell/points</DD>
<DD>Default: <em>-99999.99</em></DD>

<DT><b>top</b>=<em>string</em></DT>
<DD>top surface 2D raster map</DD>

<DT><b>bottom</b>=<em>string</em></DT>
<DD>bottom surface 2D raster map</DD>

<DT><b>rgbmaps</b>=<em>string[,<i>string</i>,...]</em></DT>
<DD>Three (R,G,B) 3D raster maps to create RGB values [redmap,greenmap,bluemap]</DD>

<DT><b>vectormaps</b>=<em>string[,<i>string</i>,...]</em></DT>
<DD>Three (x,y,z) 3D raster maps to create vector values [xmap,ymap,zmap]</DD>

<DT><b>elevscale</b>=<em>float</em></DT>
<DD>Scale factor for elevation</DD>
<DD>Default: <em>1.0</em></DD>

<DT><b>dp</b>=<em>integer</em></DT>
<DD>Number of significant digits (floating point only)</DD>
<DD>Options: <em>0-20</em></DD>
<DD>Default: <em>12</em></DD>

</DL>
<h2>DESCRIPTION</h2>

The module <em>r3.out.vtk</em> outputs 3D raster maps into VTK-ASCII format.
Maps are valid 3D raster maps in the current mapset search path. The
<em>output</em> parameter is the name of a VTK-ASCII file which will be
written in the current working directory. If <em>output</em> is not
specified then standard output (stdout) is used. The module is sensitive
to region settings (set with <em>g.region</em>).

<h2>NOTES</h2>

This module generates <i>structured points</i> with <i>celldata</i> 
(default) or <i>pointdata</i>. If top and bottom surfaces are requested
an <i>unstructured grid</i> with <i>celldata</i> or a <i>structured grid</i>
with <i>pointdata</i> is generated.
This data is put in a simple VTK-ASCII file. Neither XML nor 
binary output are supported. It is possible to choose more then one 3D raster
map
to be written in the VTK-ASCII file. Each <i>celldata</i> is named as the
3D raster map it represents. The user can visualize this file with the 
<em><a href="http://www.vtk.org">VTK Toolkit</a></em>, 
<em><a href="http://www.paraview.org">ParaView</a></em> and 
<em><a href="http://mayavi.sourceforge.net">MayaVi</a></em> which are based on
VTK. In case of 3D raster map with partially no data, the threshold filter in
ParaView can be used to visualize the valid data. Just filter all data which is
greater/lesser than the chosen null value in the VTK-ASCII file.

<p>
The top and bottom region values are expected in meters. 
If a Latitude-Longitude (LL) coordinates are used, the elevation value for each
voxel will be converted into degrees.

<p>
The <em>input</em>, <em>rgbmaps</em> and <em>vectormaps</em> parameters are
optional, so only the geometry can be exported.

<p>
If the user defines <em>top</em> and <em>bottom</em> and the 2D and 3D region
values differ, the 2D resolution will be adjusted to the 3D resolution. The
elevation maps are expected in meters. If Lat/Long coordinates are used, the
elevation will automatically converted into degree.
If the surface and bottom maps are in a different unit than meters, use the
scale parameter to convert them into meters.

<p>
The RGB voxel data can be created from 2D raster maps (Landsat TM images) 
with <em><a href="r.to.rast3.html">r.to.rast3</a></em>. The values of the RGB maps
must be within 0 and 255. If not, the values are automatically set
to 0 and warnings will be printed to stderr.

<p>
The vector data is created from three 3D raster maps. Each map represents a vector component.
So x, y and z components are required in this order. This data can be visualized with Glyph3d or 
StreamTracer filters within Paraview.

<p>
If the <em>-c</em> flag is used and the data should be visualised together with
other data exported via <em>*.out.vtk</em> modules, be sure the <em>-c</em> 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).

<h3>Difference between point- and celldata</h3>

<em>r3.out.vtk</em> can export 3D raster maps with different representations.
<ul>
<li> <em>pointdata</em> -- the cells/values are represented by the center of the
cell. Instead of cells, points are created. Each point can hold different
values, but the user can only visualize one value at a time.</li>
<li> <em>celldata</em> The cells are created with the same hight, width and depth
as in GRASS. Each cell 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>
g.region -d
g.region res=150 res3=150 t=80 b=0 tbres=10
r.mapcalc "bottom = 1800. - elevation.10m"

# synthetic data, could be geological structures:
r3.mapcalc "map3d = row()+col()+depth()"

#export of volume to VTK:
r3.out.vtk -s input=map3d top=elevation.10m bottom=bottom output=/tmp/out.vtk

# visualize in paraview or other VTK viewer:
paraview --data=/tmp/out.vtk
</pre></div>

<h3>Spearfish example with RGB data</h3>

<div class="code"><pre>
#set the region
g.region -d
g.region n=4926970 s=4914857 w=591583 e=607793 res=50 res3=50 t=80 b=0 tbres=10

#create a bottom surface
r.mapcalc "bottom = 1800. - elevation.10m"

# synthetic data, could be geological structures:
r3.mapcalc "map3d = row()+col()+depth()"

#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

#Convert the 2d maps to 3d raster maps with r.to.rast3
r.to.rast3 input=SatLandsatTM_Red output=SatLandsatTM_Red
r.to.rast3 input=SatLandsatTM_IR1 output=SatLandsatTM_IR1
r.to.rast3 input=SatLandsatTM_IR2 output=SatLandsatTM_IR2

#export of volume to VTK:
r3.out.vtk -s rgbmaps=SatLandsatTM_IR1,SatLandsatTM_IR2,SatLandsatTM_Red
input=map3d top=elevation.10m bottom=bottom output=/tmp/out.vtk

# visualize in paraview or other VTK viewer:
paraview --data=/tmp/out.vtk 
</pre></div>

<h3>Spearfish example with vector data</h3>

<div class="code"><pre>
# set the region
g.region -d
g.region n=4926970 s=4914857 w=591583 e=607793 res=50 res3=50 t=80 b=0 tbres=10

# create a bottom surface
r.mapcalc "bottom = 1800. - elevation.10m"

# synthetic data, could be geological structures:
r3.mapcalc "map3d = row()+col()+depth()"

# synthetic vector data, could be groundwater stream vectors
r3.mapcalc "x_part = sin(row())"
r3.mapcalc "y_part = cos(col())"
r3.mapcalc "z_part = sin(depth())"


# export the stuff data to VTK:
r3.out.vtk -s vectormaps=x_part,y_part,z_part input=map3d top=elevation.10m
bottom=bottom output=/tmp/out.vtk

# visualize in paraview or other VTK viewer:
paraview --data=/tmp/out.vtk 
# Now use the Glyph and Stream-Trace Filter to get nice vectors and streamlines
</pre></div>


<h3>Slovakia3d example</h3>

<div class="code"><pre>
#reduce resolution:
g.region -dp3 res=1000 res3=1000
r.mapcalc "bottom = 100"

#export of volume to VTK:
r3.out.vtk -s in=precip3d.500z50 top=dem500 bottom=bottom
out=/tmp/slovakia3d.vtk

# visualize in paraview or other VTK viewer:
paraview --data=/tmp/slovakia3d.vtk
# set Display style to 'surface#
# set Actor Control z to 10
</pre></div>

<h2>SEE ALSO</h2>

<em>
<a href="r.out.vtk.html">r.out.vtk</a>,
<a href="r3.out.ascii.html">r3.out.ascii</a>,
<a href="g.region.html">g.region</a>
</em>

<h2>AUTHOR</h2>
S&ouml;ren Gebbert

<p><i>Last changed: $Date: 2011-09-13 13:13:36 -0700 (Tue, 13 Sep 2011) $</i>
<HR>
<P><a href="index.html">Main index</a> - <a href="raster3D.html">raster3D index</a> - <a href="full_index.html">Full index</a></P>
<P>&copy; 2003-2013 <a href="http://grass.osgeo.org">GRASS Development Team</a></p>
</body>
</html>