tractogram_math
This module performs mathematical operations on tractograms. It can be used to concatenate multiple tractograms into a single file, compute the union of multiple tractograms, or perform other operations. The available operations are:
- Concatenate: Combine multiple tractograms into a single file.
- Union: Compute the union of multiple tractograms.
- Intersection: Compute the intersection of multiple tractograms.
- Difference: Compute the difference between two tractograms.
- Lazy Concatenate: Concatenate multiple tractograms without loading them into memory.
Keywords : tractogram, math, concatenate
Inputs
Section titled “Inputs”Input 1
Section titled “Input 1”Format : tuple val(meta), path(trks), path(reference)
| Type | Description | Mandatory | Pattern | |
|---|---|---|---|---|
| meta | map | Groovy Map containing sample information e.g. [ id:'sample1', single_end:false ] | True | |
| trks | file | List of tractograms to perform the operation on. e.g. [ path(trk1), path(trk2), path(trk3), ...] | True | *.trk |
| reference | file | Reference tractogram to use for the operation. e.g. [ path(reference) ] | False | *.{nii,nii.gz} |
Outputs
Section titled “Outputs”Format : tuple val(meta), path(*.trk)
| Type | Description | Mandatory | Pattern | |
|---|---|---|---|---|
| meta | map | Groovy Map containing sample information e.g. [ id:'sample1', single_end:false ] | True | |
| *.trk | file | Resulting tractogram after the operation. e.g. [ path(trk) ] | True | *.trk |
versions
Section titled “versions”Format : path(versions.yml)
| Type | Description | Mandatory | Pattern | |
|---|---|---|---|---|
| versions.yml | file | File containing software versions | True | versions.yml |
Arguments (see process.ext)
Section titled “Arguments (see process.ext)”| Type | Description | Default | Choices | |
|---|---|---|---|---|
| operation | string | The mathematical operation to perform on the tractograms. e.g. concatenate, union, intersection, difference, lazy_concatenate | - concatenate - union - intersection - difference - lazy_concatenate | |
| suffix | string | Suffix to add to the output tractogram file name. | ||
| precision | number | Precision used to compare streamlines. | 4 | |
| robust | boolean | Use version robust to small rotations/translations. | False | |
| no_metadata | boolean | Strip the streamline metadata from the output. | False | |
| fake_metadata | boolean | Skip the metadata verification, create fake metadata if missing, can lead to unexpected behavior. | False | |
| save_indices | string | Save the streamline indices to the supplied json file. The string in this argument will be used as the prefix of the output .json file. | ||
| save_empty | boolean | If set, we will save all results, even if tractogram if empty. | False | |
| no_bbox_check | boolean | Activate to ignore validity of the bounding box during loading / saving of tractograms (ignores the presence of invalid streamlines). | False |
| Description | DOI | |
|---|---|---|
| scilpy | The Sherbrooke Connectivity Imaging Lab (SCIL) Python dMRI processing toolbox. |
Authors
Section titled “Authors”Last updated : 2025-10-30