-
Notifications
You must be signed in to change notification settings - Fork 49
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 problems regarding the Slicer's Box #2972
Conversation
@clyne and @StasJ - here's some context to my strategy for these bugs. I've added a summary of this in SliceGridAlongPlane.h. The SliceRenderer was crashing when the Box and plane did not intersect. This was happening because the returned 2D grid was only being sampled within the bounds of the current Box. When the plane and Box did not intersect the returned grid would be invalid, causing a crash. One option was to add logic in the SliceRenderer to handle this special case, however this option would require every renderer using SliceGridAlongPlane() to handle it as well. The alternative I chose was to have SliceGridAlongPlane() return a valid grid in this case. The returned grid would be sampled along a given plane, and would have missingValues at points that do not lie within the Box. The Slice and Contour logic would be simplified by letting them operate on the returned grid in the same way, whether there are valid values or not. Note that I am using the domain extents gathered from the DataMgr, and the Box extents from RenderParams. I'm not using the extents gathered from the 3D grid because those can be in disagreement with the DataMgr and RenderParams. This occurs due to roundoff whenever the Grid's extents are reduced, which incrementally reduces the Grid's dimension lengths. Hope that makes sense. |
Fixes #2971 and #2968.
#2969 is still a work in progress, but my work on it will be based on top of these two fixes.