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

dim attribute in References is incorrect for non-Freesurfer surfaces #882

Closed
tsalo opened this issue Jul 23, 2024 · 0 comments · Fixed by #888
Closed

dim attribute in References is incorrect for non-Freesurfer surfaces #882

tsalo opened this issue Jul 23, 2024 · 0 comments · Fixed by #888
Labels

Comments

@tsalo
Copy link
Contributor

tsalo commented Jul 23, 2024

What happened?

The reference space dimension check in niworkflows.utils.spaces.Reference only looks at the name of the space to determine if it's 2D (i.e., a surface):

if self.space.startswith("fs"):
object.__setattr__(self, "dim", 2)

However, there are a few new templates in templateflow that are surfaces, but don't start with fs.

What command did you use?

from niworkflows.utils.spaces import Reference

print(Reference('fsnative').dim)  # 2
print(Reference('fsaverage').dim)  # 2
print(Reference('fsLR').dim)  # 2
print(Reference('dhcpAsym', spec={"cohort": "42"}).dim)  # 3
print(Reference('dhcpSym', spec={"cohort": "42"}).dim)  # 3
print(Reference('onavg').dim)  # 3

What version of the software are you running?

master (as of 2024/07/23)

How are you running this software?

Local installation ("bare-metal")

Is your data BIDS valid?

Yes

Are you reusing any previously computed results?

No

Please copy and paste any relevant log output.

No response

Additional information / screenshots

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant