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

[WIP] Generating of TVB compatible datasets #38

Closed
wants to merge 11 commits into from

Conversation

sipv
Copy link
Collaborator

@sipv sipv commented Mar 8, 2017

Issue #37.

# 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
Copy link
Member

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?

Copy link
Collaborator Author

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,
Copy link
Member

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.

Copy link
Collaborator Author

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)
Copy link
Member

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?

Copy link
Collaborator Author

@sipv sipv Mar 13, 2017

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.

Copy link
Member

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

@maedoc
Copy link
Member

maedoc commented Mar 24, 2017

Looks like a good start; do you have more commits on the way, or would you like me to get this finished?

@sipv
Copy link
Collaborator Author

sipv commented Mar 24, 2017

Same as in #33 - works on its own, but it is not integrated.

@liadomide
Copy link
Member

Outdated. Functionaly had been integrated already with similar code

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

Successfully merging this pull request may close these issues.

3 participants