-
Notifications
You must be signed in to change notification settings - Fork 21
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
[WIP] Generating of TVB compatible datasets #38
Conversation
# A nicer solution would be to detect degenerate triangles and ignore their | ||
# contribution to the vertex normal | ||
vert_norms[k, :] = vertices[k] / np.sqrt(vertices[k].dot(vertices[k])) | ||
bad_normal_count += 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't, in principle, have to handle this case. Did you encounter it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, but I haven't even run it yet. The computations are mostly Tim's code that I've left as it was without changes
|
||
region_surface_area = np.zeros(regions.size, 1) | ||
avt = np.array(vertex_triangles) | ||
# NOTE: Slightly overestimates as it counts overlapping border triangles, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder how FS handles that? I guess their triangles are so small, they can exclude borders and be fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can quite easily scale the triangle contribution to the region area by the proportion of the vertices belonging to the region. Is it worth it? I don't know.
areas[regions_subcort] = areas_subcort | ||
areas[regions_cort] = areas_cort | ||
|
||
dataset = StructuralDataset(orientations, areas) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we be doing something with this dataset
object?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it is WIP for a reason. But there's StructuralDataset.save_to_txt_zip()
to be used eventually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 I'm brain dead today and will refrain from further comments
Looks like a good start; do you have more commits on the way, or would you like me to get this finished? |
Same as in #33 - works on its own, but it is not integrated. |
Outdated. Functionaly had been integrated already with similar code |
Issue #37.