Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RecoBundles and SLR workflows #1556

Merged
merged 106 commits into from
Oct 11, 2018
Merged
Show file tree
Hide file tree
Changes from 100 commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
e783ccb
NF: Started new workflow for SLR
Garyfallidis May 8, 2018
357fc7d
Mapmri not read/write
Garyfallidis May 8, 2018
02d3f54
NF: add horizon minimalistic visualization tool
Garyfallidis May 9, 2018
06f6801
NF: adding RecoBundles workflow
BramshQamar May 9, 2018
21d17c4
Merge pull request #54 from BramshQamar/rb_workflows
Garyfallidis May 9, 2018
92a4570
Refactoring horizon still in progress
Garyfallidis May 10, 2018
3c929a0
Added some width to the streamlines
Garyfallidis May 10, 2018
e0f641a
RF: recobunldes flow needed some tweaking, now better, still some pol…
Garyfallidis May 11, 2018
6deb2ca
NF: allow tractograms with random colors
Garyfallidis May 11, 2018
8c390dd
Local SLR was not invoked not sure why
Garyfallidis May 11, 2018
785cb93
added new workflow apply_labels
BramshQamar May 14, 2018
cccc0a9
More work is needed for picking
Garyfallidis May 14, 2018
3a7ef2d
added new workflow slr for bundles
BramshQamar May 15, 2018
8981e12
added changes
BramshQamar May 15, 2018
6fdbff9
added changes
BramshQamar May 15, 2018
1d41f92
updated slr workflow
BramshQamar May 16, 2018
5cf7b73
updated recognize workflow
BramshQamar May 16, 2018
36cb544
NF: slr_with_qb changed to slr_with_qbx
Garyfallidis May 16, 2018
5e50e50
NF: SLR workflow now uses QBX
Garyfallidis May 16, 2018
05d9bf4
updated
BramshQamar May 16, 2018
a146223
changes in slr workflow
BramshQamar May 16, 2018
92726d2
Picking objects - so much simpler than ever
Garyfallidis May 16, 2018
df4e0fc
Basic horizon seems working needs more refactoring
Garyfallidis May 17, 2018
0344c6f
fixed slr workflow
BramshQamar May 17, 2018
600306a
Merge pull request #55 from BramshQamar/rb_workflows
Garyfallidis May 18, 2018
d2d60f8
NF: qbx default for SLR workflow
Garyfallidis May 18, 2018
611d5ae
Updates in RecoBundles Flow
Garyfallidis May 18, 2018
201f3e3
Increased logging output
Garyfallidis May 18, 2018
4d33ad7
RF: rename dipy_recognize to dipy_recobundles
Garyfallidis May 18, 2018
c5a2c05
WIP with labels
Garyfallidis May 18, 2018
ce7b47e
BF: labelsbundles script runs
Garyfallidis May 18, 2018
08d2375
Updated labelsbunles
Garyfallidis May 18, 2018
d825dcc
changes in slr
BramshQamar May 18, 2018
0084e95
Merge branch 'rb_workflows' into rb_workflows
BramshQamar May 18, 2018
e30a907
Merge pull request #57 from BramshQamar/rb_workflows
Garyfallidis May 18, 2018
0e2cde0
Correct output for labelsbundles
Garyfallidis May 19, 2018
1a7803c
New horizon works again with one volume and tractograms together
Garyfallidis May 21, 2018
3fba917
RF: removed old horizon
Garyfallidis May 21, 2018
efce412
RF: transform_streamlines uses the Streamlines API
Garyfallidis May 21, 2018
314910f
Pressing a for selecting all seems working
Garyfallidis May 21, 2018
d4444f2
Needs more cleanup but getting there
Garyfallidis May 21, 2018
a2613e6
Changed picking memory to dictionary
Garyfallidis May 22, 2018
fd58d5c
Working on saving bundles...
Garyfallidis May 22, 2018
8599ea0
NF: first successful effort of saving bundles directly from horizon
Garyfallidis May 22, 2018
9709895
Changed key from h to c for showing hiding the centroids
Garyfallidis May 22, 2018
7f92246
added metric in recobundles
BramshQamar May 25, 2018
dbc54c8
updates in recobundles
BramshQamar Jun 4, 2018
ca8e5f1
changes
BramshQamar Jun 7, 2018
ff9bfa8
changes
BramshQamar Jun 7, 2018
7a5ab24
changes
BramshQamar Jun 7, 2018
4515735
changes
BramshQamar Jun 8, 2018
5956129
changes
BramshQamar Jun 8, 2018
4a43af0
changes
BramshQamar Jun 8, 2018
e67d897
changes
BramshQamar Jun 8, 2018
6b41858
changes
BramshQamar Jun 8, 2018
9535aa3
Delete viz parts
BramshQamar Jun 8, 2018
b9ff2ed
cleaned some code comments
BramshQamar Jun 11, 2018
de13111
fixed the issue with bounds for second local slr in recobundle refine…
BramshQamar Aug 2, 2018
5500804
Merge branch 'master' into rb_slr_workflows
Garyfallidis Aug 2, 2018
d2cfe28
Added documentation in refine, and valuate_results methods in bundle.…
BramshQamar Aug 5, 2018
859076f
fixed test_rb.py file
BramshQamar Aug 9, 2018
3bbe451
fixed test_whole_brain_slr.py file
BramshQamar Aug 10, 2018
09e2700
added fetcher for atlas and bundles of hcp842 data
BramshQamar Aug 10, 2018
6ad254c
TEST:Fixed minimum threshold issue
Garyfallidis Aug 17, 2018
0f0dcd9
BF: return empty arrays when there are no neighbors
Garyfallidis Aug 17, 2018
af05527
Merge pull request #1 from Garyfallidis/rb_slr_workflows
BramshQamar Aug 17, 2018
d9efb2a
sm
BramshQamar Aug 20, 2018
464a6d9
fixed return value in recobundle
BramshQamar Aug 20, 2018
c5167e1
fixed test_whole_brain_slr errors
BramshQamar Aug 20, 2018
d825597
added test for refine recobundles function
BramshQamar Aug 20, 2018
92753a1
fixed errors in test whole brain slr
BramshQamar Aug 23, 2018
7e85aee
fixed tests
BramshQamar Aug 23, 2018
5faabdf
BF: transform_streamlines was working only inplace
Garyfallidis Aug 23, 2018
5adb9d1
Updated test_whole_brain_slr needs work
Garyfallidis Aug 23, 2018
083f417
Merge pull request #2 from Garyfallidis/rb_slr_workflows
BramshQamar Aug 23, 2018
f116b55
fixed tests
BramshQamar Aug 23, 2018
ef077f2
new changes in transform bundle
BramshQamar Aug 23, 2018
4298311
fixed errors in test_refine_rb.py
BramshQamar Aug 23, 2018
1886828
ENH: Select_random_set_of_streamlines works now with Streamlines objects
Garyfallidis Aug 23, 2018
1be009d
Updated SLR test
Garyfallidis Aug 23, 2018
8e9412a
fixed test_whole_brain_slr
BramshQamar Aug 23, 2018
163888e
fixed precision error in test_whole_brain_slr
BramshQamar Aug 24, 2018
d51bd90
fixed precision error in test_whole_brain_slr
BramshQamar Aug 24, 2018
0379b5a
fixed precision error in test_whole_brain_slr and errors in test_rb.py
BramshQamar Aug 24, 2018
52ade24
Adding RandomStates everywhere
Garyfallidis Aug 24, 2018
8b54e12
Merge pull request #3 from Garyfallidis/rb_slr_workflows
BramshQamar Aug 24, 2018
a4e4f2a
fixed valid_examples.txt file
BramshQamar Aug 27, 2018
1a00caf
merged test_rb.py and test_refine_rb.py into one test, and added fetc…
BramshQamar Aug 27, 2018
193d31c
added tutorial for bundle extraction using RecoBundles
BramshQamar Aug 28, 2018
c5eb946
added tutorial for bundle extraction using RecoBundles
BramshQamar Aug 28, 2018
87a969e
fixed issue with use of pjoin in fetcher.py
BramshQamar Sep 5, 2018
6ab92f3
fixed precision errors in test_dki.py
BramshQamar Sep 6, 2018
1a72259
fixed test_rb_refine.py
BramshQamar Sep 7, 2018
bc53a42
Merge branch 'master' into rb_slr_workflows
BramshQamar Sep 7, 2018
28464a0
added tests for recobundle workflow, label bundle workflow and slr wo…
BramshQamar Sep 21, 2018
76825d7
added tests for workflows
BramshQamar Sep 21, 2018
25afa7d
fixed test_align
BramshQamar Sep 24, 2018
66dc1ad
fixed test_align
BramshQamar Sep 24, 2018
068e71b
deleted the commented parts from PR
BramshQamar Sep 28, 2018
d650429
deleted the commented parts from PR
BramshQamar Sep 28, 2018
ced0dcb
fixed issues serge pointed in his review
BramshQamar Oct 8, 2018
f9c3850
fixed issues a pathlib library error
BramshQamar Oct 8, 2018
a933f33
fixed issues with no neigbhor streamlines in refine function
BramshQamar Oct 9, 2018
b741e58
fixed issues with no neigbhor streamlines in refine function
BramshQamar Oct 9, 2018
a89a93d
renamed read function to get in fetcher.py
BramshQamar Oct 11, 2018
3c8f76b
renamed read function to get in fetcher.py
BramshQamar Oct 11, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified bin/dipy_fit_mapmri
100644 → 100755
Empty file.
9 changes: 9 additions & 0 deletions bin/dipy_labelsbundles
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!python

from __future__ import division, print_function

from dipy.workflows.flow_runner import run_flow
from dipy.workflows.segment import LabelsBundlesFlow

if __name__ == "__main__":
run_flow(LabelsBundlesFlow())
9 changes: 9 additions & 0 deletions bin/dipy_recobundles
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!python

from __future__ import division, print_function

from dipy.workflows.flow_runner import run_flow
from dipy.workflows.segment import RecoBundlesFlow

if __name__ == "__main__":
run_flow(RecoBundlesFlow())
9 changes: 9 additions & 0 deletions bin/dipy_slr
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!python

from __future__ import division, print_function

from dipy.workflows.flow_runner import run_flow
from dipy.workflows.align import SlrWithQbxFlow

if __name__ == "__main__":
run_flow(SlrWithQbxFlow())
80 changes: 52 additions & 28 deletions dipy/align/streamlinear.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@
center_streamlines,
set_number_of_points,
select_random_set_of_streamlines,
length)
from dipy.segment.clustering import QuickBundles
length,
Streamlines)
from dipy.segment.clustering import QuickBundles, qbx_and_merge
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QuickBundles is unused, can you remove it from this import?

from dipy.core.geometry import (compose_transformations,
compose_matrix,
decompose_matrix)
from dipy.utils.six import string_types
from time import time
from dipy.tracking.streamline import Streamlines

MAX_DIST = 1e10
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why MAX_DISTis global, you use it only once

LOG_MAX_DIST = np.log(MAX_DIST)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOG_MAX_DIST is not used. Can you remove it?

Expand Down Expand Up @@ -693,8 +695,15 @@ def bundle_min_distance_asymmetric_fast(t, static, moving, block_size):


def remove_clusters_by_size(clusters, min_size=0):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add documentation for this function?


by_size = lambda c: len(c) >= min_size
return filter(by_size, clusters)
ob = filter(by_size, clusters)

centroids = Streamlines()
for cluster in ob:
centroids.append(cluster.centroid)

return centroids


def progressive_slr(static, moving, metric, x0, bounds,
Expand Down Expand Up @@ -828,18 +837,17 @@ def progressive_slr(static, moving, metric, x0, bounds,

return slm


def slr_with_qb(static, moving,
x0='affine',
rm_small_clusters=50,
maxiter=100,
select_random=None,
verbose=False,
greater_than=50,
less_than=250,
qb_thr=15,
nb_pts=20,
progressive=True, num_threads=None):
def slr_with_qbx(static, moving,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pep8: expected 2 blanks lines

x0='affine',
rm_small_clusters=50,
maxiter=100,
select_random=None,
verbose=False,
greater_than=50,
less_than=250,
qbx_thr=[40, 30, 20, 15],
nb_pts=20,
progressive=True, rng=None, num_threads=None):
""" Utility function for registering large tractograms.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add maxiter, progressive, nb_pts, qbx_thr, less_than, greater_than in the docstring ?


For efficiency we apply the registration on cluster centroids and remove
Expand All @@ -865,6 +873,9 @@ def slr_with_qb(static, moving,
options : None or dict,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove optionsfrom the docstring. I do not see it as a parameter

Extra options to be used with the selected method.

rng : RandomState
If None creates RandomState in function.

num_threads : int
Number of threads. If None (default) then all available threads
will be used. Only metrics using OpenMP will use this variable.
Expand All @@ -886,6 +897,9 @@ def slr_with_qb(static, moving,
bundles using local and global streamline-based registration and
clustering, Neuroimage, 2017.
"""
if rng is None:
rng = np.random.RandomState()

if verbose:
print('Static streamlines size {}'.format(len(static)))
print('Moving streamlines size {}'.format(len(moving)))
Expand All @@ -898,8 +912,8 @@ def check_range(streamline, gt=greater_than, lt=less_than):
return False

# TODO change this to the new Streamlines API
streamlines1 = [s for s in static if check_range(s)]
streamlines2 = [s for s in moving if check_range(s)]
streamlines1 = Streamlines(static[np.array([check_range(s) for s in static])])
streamlines2 = Streamlines(moving[np.array([check_range(s) for s in moving])])

if verbose:

Expand All @@ -910,29 +924,39 @@ def check_range(streamline, gt=greater_than, lt=less_than):

if select_random is not None:
rstreamlines1 = select_random_set_of_streamlines(streamlines1,
select_random)
select_random,
rng=rng)
else:
rstreamlines1 = streamlines1

rstreamlines1 = set_number_of_points(rstreamlines1, nb_pts)
qb1 = QuickBundles(threshold=qb_thr)
rstreamlines1 = [s.astype('f4') for s in rstreamlines1]
cluster_map1 = qb1.cluster(rstreamlines1)

# qb1 = QuickBundles(threshold=qb_thr)
rstreamlines1._data.astype('f4')
'''#rstreamlines1 = [s.astype('f4') for s in rstreamlines1]
# cluster_map1 = qb1.cluster(rstreamlines1)'''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you remove this 2comment lines?


cluster_map1 = qbx_and_merge(rstreamlines1, thresholds=qbx_thr, rng=rng)
clusters1 = remove_clusters_by_size(cluster_map1, rm_small_clusters)
qb_centroids1 = [cluster.centroid for cluster in clusters1]

qb_centroids1 = clusters1

if select_random is not None:
rstreamlines2 = select_random_set_of_streamlines(streamlines2,
select_random)
select_random,
rng=rng)
else:
rstreamlines2 = streamlines2

rstreamlines2 = set_number_of_points(rstreamlines2, nb_pts)
qb2 = QuickBundles(threshold=qb_thr)
rstreamlines2 = [s.astype('f4') for s in rstreamlines2]
cluster_map2 = qb2.cluster(rstreamlines2)
rstreamlines2._data.astype('f4')
'''# qb2 = QuickBundles(threshold=qb_thr)
#rstreamlines2 = [s.astype('f4') for s in rstreamlines2]
# cluster_map2 = qb2.cluster(rstreamlines2)'''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove this 3 comments lines

cluster_map2 = qbx_and_merge(rstreamlines2, thresholds=qbx_thr, rng=rng)

clusters2 = remove_clusters_by_size(cluster_map2, rm_small_clusters)
qb_centroids2 = [cluster.centroid for cluster in clusters2]
qb_centroids2 = clusters2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why you do not do directly qb_centroids2 = remove_clusters_by_size(cluster_map2, rm_small_clusters)?

clusters2 variable seems useless


if verbose:
t = time()
Expand Down Expand Up @@ -967,7 +991,7 @@ def check_range(streamline, gt=greater_than, lt=less_than):
# Garyfallidis et al. Recognition of white matter
# bundles using local and global streamline-based registration and
# clustering, Neuroimage, 2017.
whole_brain_slr = slr_with_qb
whole_brain_slr = slr_with_qbx


def _threshold(x, th):
Expand Down
29 changes: 18 additions & 11 deletions dipy/align/tests/test_whole_brain_slr.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
assert_array_almost_equal)
from dipy.data import get_data
from dipy.tracking.streamline import Streamlines
from dipy.align.streamlinear import whole_brain_slr, slr_with_qb
from dipy.align.streamlinear import whole_brain_slr, slr_with_qbx
from dipy.tracking.distances import bundles_distances_mam
from dipy.align.streamlinear import transform_streamlines
from dipy.align.streamlinear import compose_matrix44, decompose_matrix44
Expand All @@ -22,8 +22,9 @@ def test_whole_brain_slr():
f2._data += np.array([50, 0, 0])

moved, transform, qb_centroids1, qb_centroids2 = whole_brain_slr(
f1, f2, verbose=True, rm_small_clusters=2, greater_than=0,
less_than=np.inf, qb_thr=5, progressive=False)
f1, f2, x0='affine', verbose=True, rm_small_clusters=2,
greater_than=0, less_than=np.inf,
qbx_thr=[5, 2, 1], progressive=False)

# we can check the quality of registration by comparing the matrices
# MAM streamline distances before and after SLR
Expand All @@ -33,31 +34,37 @@ def test_whole_brain_slr():
d12_minsum = np.sum(np.min(D12, axis=0))
d1m_minsum = np.sum(np.min(D1M, axis=0))

print("distances= ", d12_minsum, " ", d1m_minsum)

assert_equal(d1m_minsum < d12_minsum, True)

assert_array_almost_equal(transform[:3, 3], [-50, -0, -0], 3)
assert_array_almost_equal(transform[:3, 3], [-50, -0, -0], 2)

# check rotation

mat = compose_matrix44([0, 0, 0, 15, 0, 0])

f3 = f.copy()
f3 = transform_streamlines(f3, mat)

moved, transform, qb_centroids1, qb_centroids2 = slr_with_qb(
moved, transform, qb_centroids1, qb_centroids2 = slr_with_qbx(
f1, f3, verbose=False, rm_small_clusters=1, greater_than=20,
less_than=np.inf, qb_thr=2, progressive=True)
less_than=np.inf, qbx_thr=[2],
progressive=True)

# we can also check the quality by looking at the decomposed transform

assert_array_almost_equal(decompose_matrix44(transform)[3], -15, 2)

moved, transform, qb_centroids1, qb_centroids2 = slr_with_qb(
moved, transform, qb_centroids1, qb_centroids2 = slr_with_qbx(
f1, f3, verbose=False, rm_small_clusters=1, select_random=400,
greater_than=20,
less_than=np.inf, qb_thr=2, progressive=True)
greater_than=20, less_than=np.inf, qbx_thr=[2],
progressive=True)

# we can also check the quality by looking at the decomposed transform
assert_array_almost_equal(decompose_matrix44(transform)[3], -15, 2)

assert_array_almost_equal(decompose_matrix44(transform)[3], -15, 2)

if __name__ == '__main__':
run_module_suite()
# run_module_suite()
test_whole_brain_slr()
6 changes: 5 additions & 1 deletion dipy/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@
read_tissue_data,
fetch_cfin_multib,
read_cfin_dwi,
read_cfin_t1)
read_cfin_t1,
fetch_target_tractogram_hcp,
fetch_bundle_atlas_hcp842,
read_bundle_atlas_hcp842,
read_target_tractogram_hcp)

from ..utils.arrfuncs import as_native_array
from dipy.tracking.streamline import relist_streamlines
Expand Down
83 changes: 81 additions & 2 deletions dipy/data/fetcher.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from __future__ import division, print_function, absolute_import

import os
import sys
import contextlib
Expand Down Expand Up @@ -32,6 +31,7 @@
UW_RW_URL = \
"https://digital.lib.washington.edu/researchworks/bitstream/handle/"


class FetcherError(Exception):
pass

Expand Down Expand Up @@ -430,6 +430,28 @@ def fetcher():
" More details about the data are available in their paper: " +
" https://www.nature.com/articles/sdata201672"))

fetch_bundle_atlas_hcp842 = _make_fetcher(
"fetch_bundle_atlas_hcp842",
pjoin(dipy_home, 'bundle_atlas_hcp842'),
'https://ndownloader.figshare.com/files/',
['11921522'],
['Atlas_in_MNI_Space_16_bundles.zip'],
['b071f3e851f21ba1749c02fc6beb3118'],
doc="Download atlas tractogram from the hcp842 dataset with its bundles",
data_size="200MB",
unzip=True)

fetch_target_tractogram_hcp = _make_fetcher(
"fetch_target_tractogram_hcp",
pjoin(dipy_home, 'target_tractogram_hcp'),
'https://ndownloader.figshare.com/files/',
['12871127'],
['hcp_tractogram.zip'],
['fa25ef19c9d3748929b6423397963b6a'],
doc="Download tractogram of one of the hcp dataset subjects",
data_size="541MB",
unzip=True)


def read_scil_b0():
""" Load GE 3T b0 image form the scil b0 dataset.
Expand Down Expand Up @@ -1031,4 +1053,61 @@ def read_cfin_t1():
"""
files, folder = fetch_cfin_multib()
img = nib.load(pjoin(folder, 'T1.nii'))
return img, gtab
return img # , gtab


def read_bundle_atlas_hcp842():
"""
Returns
-------
file1 : string
file2 : string
"""
file1 = pjoin(dipy_home,
'bundle_atlas_hcp842',
'Atlas_in_MNI_Space_16_bundles',
'whole_brain',
'whole_brain_MNI.trk')

file2 = pjoin(dipy_home,
'bundle_atlas_hcp842',
'Atlas_in_MNI_Space_16_bundles',
'bundles',
'*.trk')

return file1, file2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expect the read function to return a Streamlines object and not filename. Indeed, the fetcher already returns file names... I think you should redesign this function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Serge,

Thanks for the review. We decided to return just file location from read function because otherwise we would have to load all data files and return them, whereas user might just want to load few files. Like for the file2 it returns location to 16 bundles, and user might just want to load 2 or 3 of them, not all 16.



def read_two_hcp842_bundle():
"""
Returns
-------
file1 : string
file2 : string
"""
file1 = pjoin(dipy_home,
'bundle_atlas_hcp842',
'Atlas_in_MNI_Space_16_bundles',
'bundles',
'AF_L.trk')

file2 = pjoin(dipy_home,
'bundle_atlas_hcp842',
'Atlas_in_MNI_Space_16_bundles',
'bundles',
'CST_L.trk')

return file1, file2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as above



def read_target_tractogram_hcp():
"""
Returns
-------
file1 : string
"""
file1 = pjoin(dipy_home, 'target_tractogram_hcp',
'hcp_tractogram',
'streamlines.trk')

return file1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as above

6 changes: 3 additions & 3 deletions dipy/reconst/csdeconv.py
Original file line number Diff line number Diff line change
Expand Up @@ -811,9 +811,9 @@ def auto_response(gtab, data, roi_center=None, roi_radius=10, fa_thr=0.7,
fa_thr : float
FA threshold
fa_callable : callable
A callable that defines an operation that compares FA with the fa_thr. The operator
should have two positional arguments (e.g., `fa_operator(FA, fa_thr)`) and it should
return a bool array.
A callable that defines an operation that compares FA with the fa_thr.
The operator should have two positional arguments
(e.g., `fa_operator(FA, fa_thr)`) and it should return a bool array.
return_number_of_voxels : bool
If True, returns the number of voxels used for estimating the response
function.
Expand Down
Loading