DGtalTools  1.2.0
volSubSample

Brutally sub samples a vol file (division by 2 in each direction).

Usage: ./volumetric/volSubSample [OPTIONS] 1 [2]

Allowed options are :

Positionals:
1 TEXT:FILE REQUIRED Input vol file.
2 TEXT=result.vol Output filename.
Options:
-h,--help Print this help message and exit
-i,--input TEXT:FILE REQUIRED Input vol file.
-o,--output TEXT=result.vol Output filename.
-f,--function TEXT:{mean,none,max,min,mean}=mean
Function used to the down-sampling: {none,max, min, mean}
Positionals:
1 TEXT:FILE REQUIRED Input vol file.
2 TEXT=result.vol Output filename.
Options:
-h,--help Print this help message and exit
-i,--input TEXT:FILE REQUIRED Input vol file.
-o,--output TEXT=result.vol Output filename.
-f,--function TEXT:{mean,none,max,min,mean}=mean
Function used to the down-sampling: {none,max, min, mean}

Example: You can apply several sub sampling:

$ volSubSample $DGtal/examples/samples/lobster.vol lobster2.vol -f mean
$ volSubSample lobster2.vol lobster4.vol -f mean
$ volSubSample lobster4.vol lobster8.vol -f mean

You can display the result by extracting the surface using 3dVolMarchingCubes:

$ 3dVolMarchingCubes $DGtal/examples/samples/lobster.vol lobster.off -t 30
$ 3dVolMarchingCubes lobster2.vol -t 30 lobster2.off
$ 3dVolMarchingCubes lobster4.vol -t 30 lobster4.off
$ 3dVolMarchingCubes lobster8.vol -t 30 lobster8.off
$ meshViewer lobster.off lobster2.off lobster4.off lobster8.off -n

You should obtain such a result:

Resulting visualization.
See also
volSubSample.cpp