AFQ.utils.streamlines#

Attributes#

Classes#

Functions#

split_streamline(streamlines, sl_to_split, split_idx)

Given a Streamlines object, split one of the underlying streamlines

move_streamlines(tg, to, mapping, img[, to_space, ...])

Move streamlines to or from template space.

Module Contents#

AFQ.utils.streamlines.has_trx = True[source]#
class AFQ.utils.streamlines.SegmentedSFT(bundles, sidecar_info=None)[source]#
bundle_names = [][source]#
bundle_idxs[source]#
sidecar_info = None[source]#
sft[source]#
get_bundle(b_name)[source]#
get_bundle_param_info(b_name)[source]#
classmethod fromfile(trk_or_trx_file, reference='same', sidecar_file=None)[source]#
AFQ.utils.streamlines.split_streamline(streamlines, sl_to_split, split_idx)[source]#

Given a Streamlines object, split one of the underlying streamlines

Parameters:
streamlinesa Streamlines class instance

The group of streamlines, one of which is being split.

sl_to_splitint

The index of the streamline that is being split

split_idxint

Where is the streamline being split

AFQ.utils.streamlines.move_streamlines(tg, to, mapping, img, to_space=None, save_intermediates=None)[source]#

Move streamlines to or from template space.

tostr

Either “template” or “subject”. This determines whether we will use the forward or backwards displacement field.

mappingDIPY or pyAFQ mapping

Mapping to use to move streamlines.

imgNifti1Image

Image defining reference for where the streamlines move to.

to_spaceSpace or None

If not None, space to move streamlines to after moving them to the template or subject space. If None, streamlines will be moved back to their original space. Default: None.

save_intermediatesstr or None

If not None, path to save intermediate tractogram after moving to template or subject space. Default: None.