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

Assignment of vertex points on surfaces #461

Open
AhmetNSimsek opened this issue Sep 4, 2023 · 1 comment
Open

Assignment of vertex points on surfaces #461

AhmetNSimsek opened this issue Sep 4, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@AhmetNSimsek
Copy link
Collaborator

Currently, it is not possible to assign points/vertex/face to regions.

(Decided to add on 04.09.2023 dev meeting)

@AhmetNSimsek AhmetNSimsek added the enhancement New feature or request label Sep 4, 2023
@AhmetNSimsek
Copy link
Collaborator Author

AhmetNSimsek commented Oct 25, 2023

As siibra already requires scipy, we can employ the following:

import siibra
from scipy.spatial import cKDTree
import numpy as np

mesh = siibra.get_template('bigbrain').fetch(format='mesh')
kdtree = cKDTree(mesh['verts'])

pts = np.array([0.07, 41.18, 43.23])
dist, idx = kdtree.query(pts)  # query closest verticies and their distance

Distance can be used to determine the assignment degree and one can read which label is stored from giilabelled maps.

What do you think @dickscheid and @xgui3783 ?

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

No branches or pull requests

1 participant