-
Notifications
You must be signed in to change notification settings - Fork 7
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
Create utility method for computing new bounding box after a transform #6
Comments
@lnyng We can discuss when you get back to LOCI. I would like to add shearing to the Ops |
As an inspiration, you could have a look at |
What should the behavior be for non-linear (e.g. ThinPlateSpline) transforms? It could:
|
For non-linear transforms, we should extend the interface (or provide an optional add-on interface—although with Java 8 default methods, this trick is no longer as necessary for backwards compatibility) so that the transform itself can offer its new bounding box. Of course, with arbitrary transforms the new bounding box could be infinite. I really want to solve the 99% common cases though, where users want to apply some transform in ImageJ and then have the new image window match the new bounds. Otherwise, even simple things like shearing are not really usable for end users. Note that @lnyng won't actually be working on this soon, since we have other priorities right now. I may try to tackle the very simple "corners" version of this utility method, but probably not for at least several weeks. And I would like to have @axtimwalde or @tpietzsch on board with the existence of such a utility method, before investing any time in it. |
I just ran across Intervals.smallestContainingInterval(RealInterval) which is a similar thing. |
I agree with @hanslovsky, this has to be a complementary interface that is implemented by RealTransforms that can calculate or know their bounding box. |
Thanks @axtimwalde, I agree as well. |
At least for affine transforms, it is reasonable to take the corners of the source interval, and feed them into the transform to discern the boundaries of the target interval. This is the default expected behavior when performing common image processing operations such as shearing. See this forum thread.
The text was updated successfully, but these errors were encountered: