Skip to content

Commit e7f2d67

Browse files
committed
minor docs fixes from copilot
1 parent 475d9ae commit e7f2d67

4 files changed

Lines changed: 12 additions & 16 deletions

File tree

AFQ/api/bundle_dict.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,8 +1351,8 @@ def transform_rois(
13511351
Name of the bundle to be transformed.
13521352
mapping : DiffeomorphicMap object
13531353
A mapping between DWI space and a template.
1354-
new_affine : array
1355-
Affine of space transformed into.
1354+
new_img : Nifti1Image
1355+
Image of space transformed into.
13561356
base_fname : str, optional
13571357
Base file path to construct file path from. Additional BIDS
13581358
descriptors will be added to this file path. If None,

AFQ/api/group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def __init__(
144144
api.GroupAFQ(my_path, csd_sh_order_max=4)
145145
api.GroupAFQ(
146146
my_path,
147-
_spec="mni_t2", reg_subject_spec="b0")
147+
reg_template_spec="mni_t2", reg_subject_spec="b0")
148148
"""
149149
if bids_layout_kwargs is None:
150150
bids_layout_kwargs = {}

AFQ/data/fetch.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,7 @@ def read_oton_templates(as_img=True, resample_to=False):
11161116

11171117

11181118
def read_massp_templates(as_img=True, resample_to=False):
1119-
"""Load AFQ MASSSP templates from file
1119+
"""Load AFQ MASSP templates from file
11201120
11211121
Parameters
11221122
----------
@@ -1135,15 +1135,15 @@ def read_massp_templates(as_img=True, resample_to=False):
11351135
"""
11361136
logger = logging.getLogger("AFQ")
11371137

1138-
logger.debug("loading oton templates")
1138+
logger.debug("loading MASSP templates")
11391139
tic = time.perf_counter()
11401140

11411141
template_dict = _fetcher_to_template(
11421142
fetch_massp_templates, as_img=as_img, resample_to=resample_to
11431143
)
11441144

11451145
toc = time.perf_counter()
1146-
logger.debug(f"MASSSP templates loaded in {toc - tic:0.4f} seconds")
1146+
logger.debug(f"MASSP templates loaded in {toc - tic:0.4f} seconds")
11471147

11481148
return template_dict
11491149

AFQ/definitions/image.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -414,26 +414,22 @@ def _image_getter_helper(
414414
rois.update(
415415
dict.fromkeys(bundle_entry.get("include", []), "waypoint")
416416
)
417+
418+
dist_to_waypoint, dist_to_atlas, _ = tolerance_mm_to_vox(
419+
data_imap["dwi"],
420+
segmentation_params["dist_to_waypoint"],
421+
segmentation_params["dist_to_atlas"],
422+
)
417423
for roi, roi_type in rois.items():
418424
warped_roi = roi.get_fdata()
419425
if image_data is None:
420426
image_data = np.zeros(warped_roi.shape)
421427
if self.dilate:
422-
dist_to_waypoint, dist_to_atlas, _ = tolerance_mm_to_vox(
423-
data_imap["dwi"],
424-
segmentation_params["dist_to_waypoint"],
425-
segmentation_params["dist_to_atlas"],
426-
)
427428
edt = distance_transform_edt(np.where(warped_roi == 0, 1, 0))
428429
if roi_type == "waypoint":
429430
warped_roi = edt <= dist_to_waypoint
430431
else:
431432
warped_roi = edt <= dist_to_atlas
432-
warped_roi = (
433-
edt <= dist_to_waypoint
434-
if roi_type == "waypoint"
435-
else edt <= dist_to_atlas
436-
)
437433

438434
image_data = np.logical_or(image_data, warped_roi.astype(bool))
439435
if self.tissue_property is not None:

0 commit comments

Comments
 (0)