scil_tractogram_dpp_math.py

usage: __main__.py [-h] --mode {dpp,dps} --in_dpp_name key [key ...]
                   --out_keys key [key ...] [--endpoints_only]
                   [--keep_all_dpp_dps] [--overwrite_dpp_dps]
                   [--reference REFERENCE] [-v [{DEBUG,INFO,WARNING}]] [-f]
                   [--no_bbox_check]
                   OPERATION INPUT_FILE OUTPUT_FILE

Performs an operation on data per point (dpp) from input streamlines.

Although the input data always comes from the dpp, the output can be either
a dpp or a data_per_streamline (dps), depending on the chosen options.
Two modes of operation are supported: dpp and dps.
   - In dps mode, the operation is performed on dpp across the dimension of
   the streamlines resulting in a single value (or array in the 4D case)
   per streamline, stored as dps.
   - In dpp mode, the operation is performed on each point separately,
   resulting in a new dpp.

If endpoints_only and dpp mode is set the operation will only be calculated at
the streamline endpoints the rest of the values along the streamline will be
NaN.

If endpoints_only and dps mode is set operation will be calculated across the
data at the endpoints and stored as a single value (or array in the 4D case)
per streamline.

Endpoint only operation:
correlation: correlation calculated between arrays extracted from streamline
endpoints (data must be multivalued per point) and dps mode must be set.

positional arguments:
  OPERATION             The type of operation to be performed on the
                        streamlines. Must be one of the following:
                        [mean, sum, min, max, correlation.]
  INPUT_FILE            Input tractogram containing streamlines and metadata.
  OUTPUT_FILE           The file where the remaining streamlines
                        are saved.

options:
  -h, --help            show this help message and exit
  --mode {dpp,dps}      Set to dps if the operation is to be performed
                        across all dimensions resulting in a single value per
                        streamline. Set to dpp if the operation is to be
                        performed on each point separately resulting in a
                        single value per point.
  --in_dpp_name key [key ...]
                        Name or list of names of the data_per_point for
                        operation to be performed on. If more than one dpp
                        is selected, the same operation will be applied
                        separately to each one.
  --out_keys key [key ...]
                        Name of the resulting data_per_point or
                        data_per_streamline to be saved in the output
                        tractogram. If more than one --in_dpp_name was used,
                        enter the same number of --out_keys values.
  --endpoints_only      If set, will only perform operation on endpoints
                        If not set, will perform operation on all streamline
                        points.
  --keep_all_dpp_dps    If set, previous data_per_point will be preserved
                        in the output tractogram. Else, only --out_dpp_name
                        keys will be saved.
  --overwrite_dpp_dps   If set, if --keep_all_dpp_dps is set and some
                        --out_keys keys already existed in your
                        data_per_point or data_per_streamline, allow
                        overwriting old data_per_point.
  --reference REFERENCE
                        Reference anatomy for tck/vtk/fib/dpy file
                        support (.nii or .nii.gz).
  -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.
  --no_bbox_check       Activate to ignore validity of the bounding box during loading / saving of
                        tractograms (ignores the presence of invalid streamlines).