Closed carlocastoldi closed 11 months ago
@LeonardoLupori I knew you were interested in this fix. Albeit not being merged, if you need it in the meantime you should be able to use this solution
@carlocastoldi Thanks for this. I've closed this PR, but included your commits in #21. If you could test that PR that would be very helpful!
Before submitting a pull request (PR), please read the contributing guide.
Description
What is this PR
Why is this PR needed? fixes a problem when intersecting some planes with the atlases. The following code crashes without this PR:
What does this PR do? Instead of using a mesh as a plane, this PR uses a proper infinite plane for slicing the atlas. This effectively bypasses an open issue of vtk regarding the intersection of two meshes. See: https://discourse.vtk.org/t/vtkintersectionpolydatafilter-crashing/9428 As a bonus it is conceptually a "better" way to represent the planes. In order to do so, I had to use a vtk function by backporting a binding from
vedo=2023.4.6
.References
11
How has this PR been tested?
I ran all examples from this repository + extensive usage in my work project. Additionally, I made sure every combination of
(frontal, horizontal, sagittal)
orientations and(allen_cord_20um_v1.0, allen_mouse_25um_v1.2, mpin_zfish_1um_v1.0)
altases had their plane's normal vector as well asu
andv
(x
andy
in 2D projections, respectively) in the correct direction by using the modifiedplanner
.Is this a breaking change?
No, it should keep all the previous APIs and functionalities.
Does this PR require an update to the documentation?
No
Checklist: