AFQ.recognition.utils#

Module Contents#

Functions#

flip_sls(select_sl, idx_to_flip[, in_place])

Helper function to flip streamlines

cut_sls_by_dist(select_sl, roi_dists, roi_idxs[, in_place])

Helper function to cut streamlines according to which points

read_tg(tg[, nb_streamlines])

orient_by_streamline(sls, template_sl)

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

Move streamlines to or from template space.

resample_tg(tg, n_points)

Attributes#

AFQ.recognition.utils.logger[source]#
AFQ.recognition.utils.flip_sls(select_sl, idx_to_flip, in_place=False)[source]#

Helper function to flip streamlines

AFQ.recognition.utils.cut_sls_by_dist(select_sl, roi_dists, roi_idxs, in_place=False)[source]#

Helper function to cut streamlines according to which points are closest to certain rois.

Parameters
select_sl, streamlines to cut
roi_dists, distances from a given streamline to a given inclusion roi
roi_idxs, two indices into the list of inclusion rois to use for the cut
in_place, whether to modify select_sl
AFQ.recognition.utils.read_tg(tg, nb_streamlines=None)[source]#
AFQ.recognition.utils.orient_by_streamline(sls, template_sl)[source]#
AFQ.recognition.utils.move_streamlines(tg, to, mapping, img, save_intermediates=None)[source]#

Move streamlines to or from template space.

tostr

Either “template” or “subject”.

mappingConformedMapping

Mapping to use to move streamlines.

imgNifti1Image

Space to move streamlines to.

AFQ.recognition.utils.resample_tg(tg, n_points)[source]#
class AFQ.recognition.utils.SlsBeingRecognized(sls, logger, save_intermediates, b_name, ref, n_roi_dists)[source]#
initiate_selection(clean_name)[source]#
select(idx, clean_name, cut=False)[source]#
get_selected_sls(cut=False, flip=False)[source]#
reorient(idx)[source]#
__bool__()[source]#
__len__()[source]#