scil_tractogram_convert_hdf5_to_trk.py

usage: __main__.py [-h] [--include_dps]
                   [--edge_keys LABEL1_LABEL2 [LABEL1_LABEL2 ...] |
                   --node_keys NODE [NODE ...]] [--save_empty labels_list]
                   [-v [{DEBUG,INFO,WARNING}]] [-f]
                   in_hdf5 out_dir

Save connections of a hdf5 created with
>> scil_tractogram_segment_bundles_for_connectivity.py.

Useful for quality control and visual inspections.

It can either save all connections (default), individual connections specified
with --edge_keys or connections from specific nodes specified with --node_keys.

With the option --save_empty, a label_lists, as a txt file, must be provided.
This option saves existing connections and empty connections.

The output is a directory containing the thousands of connections:
out_dir/
    |-- LABEL1_LABEL1.trk
    |-- LABEL1_LABEL2.trk
    |-- [...]
    |-- LABEL90_LABEL90.trk

Formerly: scil_save_connections_from_hdf5.py

positional arguments:
  in_hdf5               HDF5 filename (.h5) containing decomposed connections.
  out_dir               Path of the output directory.

options:
  -h, --help            show this help message and exit
  --include_dps         Include the data_per_streamline the metadata.
  --edge_keys LABEL1_LABEL2 [LABEL1_LABEL2 ...]
                        Keys to identify the edges (connections) of interest.
  --node_keys NODE [NODE ...]
                        Node keys to identify the sub-networks of interest.
                        Equivalent to adding any --edge_keys node_LABEL2 or LABEL2_node.
  --save_empty labels_list
                        Save empty connections. Then, the list of possible connections is
                        not found from the hdf5 but inferred from labels_list, a txt file
                        containing a list of nodes saved by the decomposition script.
                        *If used together with edge_keys or node_keys, the provided nodes must
                        exist in labels_list.
  -v [{DEBUG,INFO,WARNING}]
                        Produces verbose output depending on the provided level.
                        Default level is warning, default when using -v is info.
  -f                    Force overwriting of the output files.
                        CAREFUL. The whole output directory will be deleted if it exists.