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

Add function to mirror the mesh of an actor #392

Merged
merged 6 commits into from
Oct 24, 2024
Merged

Conversation

IgorTatarnikov
Copy link
Member

@IgorTatarnikov IgorTatarnikov commented Oct 23, 2024

Before submitting a pull request (PR), please read the contributing guide.

Please fill out as much of this template as you can, but if you have any problems or questions, just leave a comment and we will help out :)

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
Currently, there's no easy way to mirror actors.

What does this PR do?
Added a mirror method to the Actor class, allowing actors' meshes to be mirrored around a specified axis. The method supports both standard and anatomical axes and can utilize an atlas for anatomical space.

Introduced a new example script that demonstrates the use of the mirror method. The script creates a scene, adds original and mirrored neurons, meshes, and probes, and renders the scene.

References

Closes #389

How has this PR been tested?

Tested locally by visual inspection, added an example script to demonstrate usage.

Is this a breaking change?

No

Does this PR require an update to the documentation?

No.

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality (unit & integration)
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

Copy link

codecov bot commented Oct 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.94%. Comparing base (02ea8d7) to head (845a8d9).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #392      +/-   ##
==========================================
+ Coverage   86.71%   86.94%   +0.23%     
==========================================
  Files          27       27              
  Lines        1219     1241      +22     
==========================================
+ Hits         1057     1079      +22     
  Misses        162      162              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@adamltyson adamltyson changed the title Add function to mirror the meseh of an actor Add function to mirror the mesh of an actor Oct 23, 2024
@IgorTatarnikov IgorTatarnikov marked this pull request as ready for review October 23, 2024 17:00
@IgorTatarnikov IgorTatarnikov requested a review from a team October 23, 2024 17:00
Copy link
Member

@adamltyson adamltyson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice. One tiny suggestion.

examples/mirror_actors.py Outdated Show resolved Hide resolved
@IgorTatarnikov IgorTatarnikov merged commit 32b987c into main Oct 24, 2024
13 checks passed
@IgorTatarnikov IgorTatarnikov deleted the flip-actor-in-atlas branch October 24, 2024 12:21
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.

[Feature] Flipping single neurons
2 participants