[BUG]: Extra dimension added to parcellation after warping to another template space via ANTs #324

Merged
synchon merged 2 commits from fix/parcellation-warp-incorrect-ndim into main 2024-04-10 16:33:31 +00:00
2 changed files with 4 additions and 1 deletions

View file

@ -0,0 +1 @@
Remove extra dimension from parcellations warped via ANTs to other template spaces by `Synchon Mandal`_

View file

@ -195,7 +195,9 @@ class ParcelAggregation(BaseMarker):
)
# Get binarized parcellation image for masking
parcellation_bin = math_img("img != 0", img=parcellation_img)
parcellation_bin = math_img(
"np.squeeze(img) != 0", img=parcellation_img
)
# Load mask
if self.masks is not None: