Skip to content

tractogram_resample

Resample bundles’ centroids.

Keywords : Bundles, Centroids, Streamlines


Format : tuple val(meta), path(tractograms)

TypeDescriptionMandatoryPattern
metamapGroovy Map containing sample information e.g. [ id:'sample1', single_end:false ]True
tractogramsfileList of tractograms to resample. If the tractogram is a centroid file with a specific number of points, please use the nb_points parameter.True*.{trk}

Format : tuple val(meta), path(*_resampled.trk)

TypeDescriptionMandatoryPattern
metamapGroovy Map containing sample information e.g. [ id:'sample1', single_end:false ]True
*_resampled.trkfileResampled tractograms.True*_resampled.trk

Format : path(versions.yml)

TypeDescriptionMandatoryPattern
versions.ymlfileFile containing software versionsTrueversions.yml

TypeDescriptionDefaultChoices
nb_pointsintegerNumber of points per streamline in the output.1
nb_streamlinesintegerNumber of streamlines to resample the tractogram to.1000
never_upsamplebooleanMake sure to never upsample a tractogram. Useful when downsampling a batch of files at once.None
seedintegerUse a specific random seed for the resampling.None
point_wise_stdfloatNoise to add to existing streamlines points to generate new ones. Value is in mm.1.0
tube_radiusfloatMaximum distance to generate streamlines around the original ones. Value is in mm.1.0
gaussianfloatIf set, smooth the upsampled streamlines. Value is the gaussian sigma. Uses the coordinates of surrounding points on the streamline to blur the streamlines. A good sigma choice would be around 5.None
compressfloatCompress the resulting streamline. Value is the maximum compression distance in mm.0.1
keep_invalidbooleanKeep invalid newly generated streamlines that may go out of the bounding box.False
downsample_per_clusterbooleanIf set, downsampling will be done per cluster (computed with Quickbundles) to ensure that at least some streamlines are kept per bundle. Else, random downsampling is performedFalse
qbx_thresholdfloatIf you chose option ‘—downsample_per_cluster’, you may set the Quickbundles threshold value(s) here.[40, 30, 20]

DescriptionDOI
scilpyThe Sherbrooke Connectivity Imaging Lab (SCIL) Python dMRI processing toolbox.


Last updated : 2025-10-30