| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
This pull request has been mentioned on Image.sc Forum. There might be relevant details there: https://forum.image.sc/t/fiji-friends-weekly-dev-update-thread/103718/60 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This PR, based on a branch that was designed simply to streamline the conversion of RandomAccessibleIntervals via wrapping, has been taken over to add a new feature to Op conversion. Namely:
Can we convert Computers without that annoying copy at the end??
Background
Suppose you want to convert a Computer<I, O> into a Computer<A, B>. Currently, you need (at a minimum):
In many cases, however, those engine.convert Ops will be most performant when wrapping the object. If that wrapper is read/write (as is the case for ndarray -> RAI wrapping via imglyb, for example), when the Computer<I, O> backing your Computer<A, B> Op is called, the changes will be written through into the original B object, and the later engine.convert/engine.copy is unnecessary work.
A new Op name: engine.wrap
engine.wrap Ops are object conversions via a read/write wrapper. While not enforced, all engine.wrap Ops should be aliased engine.convert (and likely also convert.X).
When performing conversion, the Op conversion MatchingRoutine will watch for the usage of engine.wrap Ops. If used for a preallocated output, the matching routine will avoid matching the output engine.convert/engine.copy Ops.
TODO: