-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fix slicer pre-transforming the planes' center #71
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #71 +/- ##
=====================================
Coverage 0.00% 0.00%
=====================================
Files 5 5
Lines 284 283 -1
=====================================
+ Misses 284 283 -1 ☔ View full report in Codecov by Sentry. |
* this created problems when adding a plane mesh into a scene * additionally it adds the parameter 'both' to plan.show()
e5a2a22
to
756680f
Compare
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.
@@ -51,7 +51,6 @@ def __init__( | |||
) | |||
|
|||
position = np.array(position) | |||
position[2] = -position[2] |
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.
This line is required for sagittal slicing to work correctly. There are some underlying oddities in how brainrender
handles the last spatial dimension (x
in zyx
representation). Without this line sagittal
slices in 2D look like:
This was generated by running the heatmap_2d.py
example specifying the sagittal orientation. It should look something like:
I believe this is tied together with #72 and #55. I think getting rid of this line will require changes in brainrender
.
The
Slicer
automatically set the centre x positioning to its negative value.This, however, is not something whose responsibility is of the constructor, but rather of the renderer.
As a consequence, it required some weird problems when messing with slicers' planes.
Additionally, it adds the parameter
both
toplan.show()
.Description
What is this PR
How has this PR been tested?
Is this a breaking change?
no
Does this PR require an update to the documentation?
no
Checklist: