GRASS and Paraview: Difference between revisions
Line 56: | Line 56: | ||
* see [[Stereo anaglyphs]] | * see [[Stereo anaglyphs]] | ||
[[Category: Visualization]] | [[Category: Visualization]] |
Revision as of 18:19, 26 March 2013
3D visualization of GRASS data with Paraview
Download Paraview at http://www.paraview.org (available for Linux, MacOSX and MS-Windows) (screenshot gallery)
2D/3D Raster/voxel export
GRASS GIS is one of the few GIS with volume data support. Here data are stored as a 3D raster with a unit volume called a voxel (volume pixel). Voxels are designed to support for example representations of trivariate continuous fields.
- 2D raster maps: r.out.vtk
- 3D raster (voxel) maps: r3.out.vtk
2D/3D Vector export
- 2D/3D vector maps: v.out.vtk
Visualization
Start Paraview, load VTK data, and choose the correct readers : for example "Legacy VTK file"....it is fairly intuitive to use. In the Properties section click the Apply button, next in the Display section set "Surface" in Representation menu, and set the name of the file that you had load on the Color menu. Then with Edit menu you can set the color scale. In Paraview you have many filtes to process the data. A useful filter is "Cell data to point data". In the "Filters" drop-down menu you can find it in the "Alphabetical" list. (don't hesitate to expand this part)
paraview --data=/tmp/threelayer.vtk
RGB visualization
Data export with r.out.vtk:
r.out.vtk input=dsm_s_michele elevation=dsm_s_michele \ rgbmaps=ofd_s_michele.red,ofd_s_michele.green,ofd_s_michele.blue \ out=s_michele_color.vtk
Load into Paraview:
paraview --data=s_michele_color.vtk
- In Paraview, click "Apply"
- Select the "Display" tab and choose "Color by" to switch from input scalars to rgb scalars
- Disable the "Map Scalars" check button in the display tab to avoid the use of a lookup table
Shown as stereo anaglyphs
paraview --stereo --data=s_michele_color.vtk
- In Paraview, click "Apply"
- Select the "Display" tab and choose "Color by" to switch from input scalars to rgb scalars
- Disable the "Map Scalars" check button in the display tab to avoid the use of a lookup table
Creating Stereo anaglyphs
- see Stereo anaglyphs