@@ -44,6 +44,8 @@ def __init__(
4444 sphere_edges : np .ndarray ,
4545 max_angle : float = radians (60 ),
4646 step_size : float = 0.5 ,
47+ min_pts = 0 ,
48+ max_pts = np .inf ,
4749 relative_peak_thresh : float = 0.25 ,
4850 min_separation_angle : float = radians (45 ),
4951 ngpus : int = 1 ,
@@ -74,8 +76,14 @@ def __init__(
7476 Maximum angle (in radians) between steps
7577 default: radians(60)
7678 step_size : float, optional
77- Step size for tracking
79+ Step size for tracking, in voxels
7880 default: 0.5
81+ min_pts : int, optional
82+ Minimum number of points in a streamline to be kept
83+ default: 0
84+ max_pts : int, optional
85+ Maximum number of points in a streamline to be kept
86+ default: np.inf
7987 relative_peak_thresh : float, optional
8088 Relative peak threshold for direction selection
8189 default: 0.25
@@ -136,7 +144,11 @@ def __init__(
136144 self .streams = []
137145 self .managed_data = []
138146
139- self .seed_propagator = SeedBatchPropagator (gpu_tracker = self )
147+ self .seed_propagator = SeedBatchPropagator (
148+ gpu_tracker = self ,
149+ minlen = min_pts ,
150+ maxlen = max_pts
151+ )
140152 self ._allocated = False
141153
142154 def __enter__ (self ):
@@ -260,7 +272,7 @@ def generate_trx(self, seeds, ref_img):
260272
261273 # Will resize by a factor of 2 if these are exceeded
262274 sl_len_guess = 100
263- sl_per_seed_guess = 4
275+ sl_per_seed_guess = 2
264276 n_sls_guess = sl_per_seed_guess * seeds .shape [0 ]
265277
266278 # trx files use memory mapping
0 commit comments