AFQ.recognition.utils#

Attributes#

Classes#

Functions#

manual_orient_sls(fgarray)

Helper function to manually orient streamlines by their endpoints,

tolerance_mm_to_vox(img, dist_to_waypoint, ...)

flip_sls(select_sl, idx_to_flip[, in_place])

Helper function to flip streamlines

cut_sls_by_closest(select_sl, roi_closest, roi_idxs[, ...])

Helper function to cut streamlines according to which points

orient_by_streamline(sls, template_sl)

resample_tg(tg, n_points)

Module Contents#

AFQ.recognition.utils.axes_dict[source]#
AFQ.recognition.utils.manual_orient_sls(fgarray)[source]#

Helper function to manually orient streamlines by their endpoints, according to LPI+ pyAFQ standard assuming streamlines are in RASMM

AFQ.recognition.utils.tolerance_mm_to_vox(img, dist_to_waypoint, input_dist_to_atlas)[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_closest(select_sl, roi_closest, 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_closest

indices into given streamline of points nearest to inclusion rois

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.orient_by_streamline(sls, template_sl)[source]#
AFQ.recognition.utils.resample_tg(tg, n_points)[source]#
class AFQ.recognition.utils.SlsBeingRecognized(sls, save_intermediates, b_name, ref, n_roi)[source]#
oriented_yet = False[source]#
selected_fiber_idxs[source]#
sls_flipped[source]#
start_time = -1[source]#
save_intermediates[source]#
b_name[source]#
ref_sls[source]#
ref[source]#
n_roi[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]#
copy(new_name, n_roi)[source]#
export_selected(chunk_offset)[source]#
classmethod from_selected(survivor_dicts, full_streamlines, save_intermediates, b_name, ref, n_roi)[source]#