DGtalTools  1.2.0
volReSample

Re samples a 3D volumetric image (.vol, .longvol, .pgm3d) with a given grid size.

Usage: v ./volumetric/volReSample [OPTIONS] 1 [2]

Allowed options are :

Positionals:
1 TEXT:FILE REQUIRED input volumetric file (.vol, .longvol, .pgm3d).
2 TEXT the new volumetric file (.vol, .longvol, .pgm3d).
Options:
-h,--help Print this help message and exit
-i,--input TEXT:FILE REQUIRED input volumetric file (.vol, .longvol, .pgm3d).
-o,--output TEXT the new volumetric file (.vol, .longvol, .pgm3d).
-g,--gridSize FLOAT x 3 size_x size_y size_z : the grid size of the re sampling

Example:

Here is an example of re sampling with different grid sizes 2, 4 and 8:

$ volReSample $DGtal/examples/samples/Al.100.vol AlRS2.vol -g 2 2 2
$ volReSample $DGtal/examples/samples/Al.100.vol AlRS4.vol -g 4 4 4
$ volReSample $DGtal/examples/samples/Al.100.vol AlRS8.vol -g 8 8 8

We can convert the resulting volumetric files into a sequence of discrete points with the tool vol2sdp :

$ vol2sdp $DGtal/examples/samples/Al.100.vol -m 1 -o AlRS1.sdp
$ vol2sdp AlRS2.vol -m 1 -o AlRS2.sdp
$ vol2sdp AlRS4.vol -m 1 -o AlRS4.sdp
$ vol2sdp AlRS8.vol -m 1 -o AlRS8.sdp
$ cat AlRS{1,2,4,8}.sdp >> AlRS1_2_4_8.sdp
# display the resulting file:
3dSDPViewer AlRS1_2_4_8.sdp

Note that if DGtal is compiled with the option WITH_ITK set to ON, you can export the image in format ITK format and integrating image spacing.

You should obtain such a result:

Resulting of re sampling with grid size = 2, 4 and 8.
See also
volReSample.cpp