DGtalTools  0.9.4
heightfield2vol

Converts a 2D heightfield image into a volumetric file.

Usage: heightfield2vol [input] [output]

Allowed options are:

-h [ --help ] display this message
-i [ --input ] arg heightfield file.
-o [ --output ] arg volumetric file
-s [ --scale ] arg (=1) set the scale factor on height values.
(default 1.0)
-z [ --volZ ] arg (=255) set the Z max value of domain.
-f [ --foregroundValue ] arg (=128) specify the foreground value of the
resulting voxel.
-b [ --backgroundValue ] arg (=0) specify the background value of the
resulting volumetric file.

Example:

$ heightfield2vol -i ${DGtal}/examples/samples/church.pgm -o volResu.vol -s 0.3 -z 50

You will obtain such image:

resHeightfield2vol.png
Resulting image.
See also
heightfield2vol.cpp