-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Added CubicSymmetry #2202
Added CubicSymmetry #2202
Conversation
Reviewer's Guide by SourceryThis PR implements a new 3D transformation called CubicSymmetry, which extends the concept of D4 symmetry to three dimensions. The implementation includes a new transform class that applies one of 48 possible symmetry operations to 3D volumes, along with the corresponding functional implementation and tests. Class diagram for the new CubicSymmetry transformclassDiagram
class CubicSymmetry {
+float p
+bool|None always_apply
+CubicSymmetry(float p=1.0, bool|None always_apply=None)
+dict get_params_dependent_on_data(dict params, dict data)
+np.ndarray apply_to_volume(np.ndarray volume, int index, **params)
+np.ndarray apply_to_mask(np.ndarray mask, int index, **params)
+tuple get_transform_init_args_names()
}
class Transform3D {
<<abstract>>
}
CubicSymmetry --|> Transform3D
note for CubicSymmetry "Applies a random cubic symmetry transformation to a 3D volume."
Class diagram for the transform_cube functionclassDiagram
class transform_cube {
+np.ndarray transform_cube(np.ndarray cube, int index)
}
note for transform_cube "Transform cube by index (0-47)"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @ternaus - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟡 Testing: 2 issues found
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2202 +/- ##
=========================================
+ Coverage 0 89.23% +89.23%
=========================================
Files 0 50 +50
Lines 0 8905 +8905
=========================================
+ Hits 0 7946 +7946
- Misses 0 959 +959 ☔ View full report in Codecov by Sentry. |
Addresses: #2191
Summary by Sourcery
Add the CubicSymmetry transform to apply random cubic symmetry transformations to 3D volumes, update documentation, and include tests to verify transformation uniqueness and shape preservation.
New Features:
Enhancements:
Documentation:
Tests:
Chores: