NAME#
pict.pixel_levelset_nd - Compute a persistence diagram from an
N-dimensional picture by using a cubical sublevel/superlevel filtration
SYNOPSIS#
homcloud-pict-pixel-levelset-nd
[-h] [-V] [-m MODE] [-T TYPE] [-C] -o OUTPUT
[-p PERIODIC] [--algorithm ALGORITHM]
[-M SAVE_BOUNDARY_MAP] [--license]
[input ...]
This program can also be invoked as
python3 -m homcloud.cli.pict.pixel_levelset_nd.
ALIAS#
homcloud-pict-pixel-levelset-nd
DESCRIPTION#
This program computes a persistence diagram from a cubical
sublevel-set (or superlevel-set) filtration constructed from the
given N-dimensional picture data, and writes it as a .pdgm file.
-m sublevel (the default) filters cells in increasing order of
pixel value; -m superlevel filters in decreasing order.
-C/--cubical switches from the (fast, default) bitmap-based
cubical filtration to an explicit cubical complex filtration, which
is slower but is required by some downstream tools.
OPTIONS#
-h, --help show this help message and exit
-V, --version show program's version number and exit
-m MODE, --mode MODE filtraty type (sublevel(default),superlevel)
-T TYPE, --type TYPE input data format
(text2d,text_nd(default),picture2d,pictures3d,npy)
-C, --cubical Use explicit cubical filtration (slow)
-o OUTPUT, --output OUTPUT
output file
-p PERIODIC, --periodic PERIODIC
periodic (example: 0,1,1 for y and z are periodic)
--algorithm ALGORITHM
algorithm (dipha, phat-twist, phat-chunk-parallel)
-M SAVE_BOUNDARY_MAP, --save-boundary-map SAVE_BOUNDARY_MAP
save boundary map (yes/no, default:no)
--license show license and exit
-M/--save-boundary-map requires -C/--cubical; giving -M on
without -C is an error. Saving the boundary map is what makes the
output usable later with homcloud-optvol.
INPUT FILE FORMAT#
The program accepts the following types of file formats:
text2d, text_nd, picture2d, pictures3d and npy.
text2d#
2D pixel (floating point number) values represented by a text as follows:
x_11 x_12 ... x_1n
x_21 x_22 ... x_2n
: : :
x_m1 x_m2 ... x_mn
Each coefficient should be floating point numbers.
text_nd#
N-dimensional pixel (floating point number) values represented by a text as in the following format:
- First line represents the shape of data. For example, if the shape of your data
is 200x230x250, first line should be
200 230 250. - The following lines are floating point number values in x-fastest direction
- A line starting with
#is skipped as a comment - An empty line is also skipped.
An example is as follows:
# 4x3x2 3D voxel data
4 3 2
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
17 18 19 20
21 22 23 24
picture2d#
A gray scale PNG or TIFF file.
If the input file is 16bit grayscale file, the pixel value is normalized to the range of 0 .. 255.
pictures3d#
Gray scale PNG or TIFF files. All picture sizes must be same. If not, an error occurs. All pictures are stacked in the commandline order.
If the input file is 16bit grayscale file, the pixel value is normalized to the range of 0 .. 255.
npy#
Numpy’s npy file.
Please see https://docs.scipy.org/doc/numpy/neps/npy-format.html for details of this format.
OUTPUT FORMAT#
The program always writes a .pdgm file into OUTPUT. Old output
formats (.complex, .icomplex, .diagram, .idiagram) are no
longer supported; giving OUTPUT one of these extensions raises an
error.
NOTES#
The old -I/--combine-index-map and -D/--convert-to-diagram
options (used when the program produced dipha/idipha complex or
diagram files) have been removed: the program always computes and
writes a pdgm file directly now. The old -u/--upper-bound and
-l/--lower-bound options documented previously do not exist in
the current implementation.