DGtalTools  1.5.beta
3DSDPViewer

Displays a sequence of 3d discrete points by using QGLviewer.

Usage: 3dSDPViewer [OPTIONS] 1 [f] [lineSize] [filterVectors]

Allowed options are :

Positionals:
1 TEXT:FILE REQUIRED input file: sdp (sequence of discrete points).
Options:
-h,--help Print this help message and exit
-i,--input TEXT:FILE REQUIRED input file: sdp (sequence of discrete points).
--SDPindex UINT x 3 specify the sdp index (by default 0,1,2).
-c,--pointColor INT x 4 set the color of points: r g b a.
-l,--lineColor INT x 4 set the color of line: r g b a.
-m,--addMesh TEXT append a mesh (off/obj) to the point set visualization.
--customColorMesh UINT x 4 set the R, G, B, A components of the colors of the mesh faces (mesh added with option --addMesh).
--customAlphaMesh UINT set single alpha(A) components of the colors of the mesh faces (mesh added with option --addMesh).
--importColors import point colors from the input file (R G B colors should be by default at index 3, 4, 5).
--setColorsIndex UINT x 3 Needs: --importColors
customize the index of the imported colors in the source file (used by --importColor). By default the initial indexes are 3, 4, 5.
--importColorLabels import color labels from the input file (label index should be by default at index 3).
--setColorLabelIndex UINT=3 customize the index of the imported color labels in the source file (used by -importColorLabels).
-f,--filter FLOAT=100 filter input file in order to display only the [arg] percent of the input 3D points (uniformly selected).
--noPointDisplay usefull for instance to only display the lines between points.
--drawLines draw the line between discrete points.
-x,--scaleX FLOAT=1 set the scale value in the X direction
-y,--scaleY FLOAT=1 set the scale value in the Y direction
-z,--scaleZ FLOAT=1 set the scale value in the Z direction
--sphereResolution UINT=30 defines the sphere resolution (used when the primitive is set to the sphere).
-s,--sphereRadius FLOAT=0.2 defines the sphere radius (used when the primitive is set to the sphere).
--sphereRadiusFromInput takes, as sphere radius, the 4th field of the sdp input file.
--lineSize FLOAT=0.2 defines the line size (used when the --drawLines or --drawVectors option is selected).
-p,--primitive TEXT:{voxel,glPoints,sphere}=voxel
set the primitive to display the set of points.
-v,--drawVectors TEXT SDP vector file: draw a set of vectors from the given file (each vector are determined by two consecutive point given, each point represented by its coordinates on a single line.
-u,--unitVector FLOAT=0 specifies that the SDP vector file format (of --drawVectors option) should be interpreted as unit vectors (each vector position is be defined from the input point (with input order) with a constant norm defined by [arg]).
--filterVectors FLOAT=100 filters vector input file in order to display only the [arg] percent of the input vectors (uniformly selected, to be used with option --drawVectors else no effect).
--interactiveDisplayVoxCoords by using this option the coordinates can be displayed after selection (shift+left click on voxel).
graph_traits< DGtal::DigitalSurface< TDigitalSurfaceContainer > >::vertex_descriptor source(typename graph_traits< DGtal::DigitalSurface< TDigitalSurfaceContainer > >::edge_descriptor edge, const DGtal::DigitalSurface< TDigitalSurfaceContainer > &digSurf)

Basic example:

You can display a set of 3D points with sphere primitive and lines:

$ 3DSDPViewer $DGtal/tests/samples/sinus3D.dat -p sphere -s 0.3 --drawLines --lineSize 5

You should obtain such a result:

Resulting visualization.

Example with interactive selection :

This tool can be useful to recover coordinates from a set of voxels. To do it, you have to add the option allowing to activate the interactive selection (with –interactiveDisplayVoxCoords), for instance if you apply:

$ 3dSDPViewer $DGtal/tests/samples/sinus3D.dat --interactiveDisplayVoxCoords

you should be able to select a voxel by using the SHIFT key and by clicking on a voxel:

Visualization of large point set

If you need to display an important number of points, you can use the primitive glPoints instead voxel or sphere (-p glPoints). You will obtain such type of a visualization:

See also
3DSDPViewer.cpp