[BUG]: Extra dimension added to mask after warping via ANTs #340

Merged
synchon merged 2 commits from fix/mask-warp-incorrect-ndim into main 2024-05-07 08:30:47 +00:00
2 changed files with 2 additions and 1 deletions

View file

@ -0,0 +1 @@
Remove extra dimension from masks warped via ANTs by `Synchon Mandal`_

View file

@ -208,7 +208,7 @@ class ParcelAggregation(BaseMarker):
)
# Get "logical and" version of parcellation and mask
parcellation_bin = math_img(
"np.logical_and(img, mask)",
"np.logical_and(img, np.squeeze(mask))",
img=parcellation_bin,
mask=mask_img,
)