Closed minnerbe closed 2 months ago
I made a variation with multiple ...View
interfaces and wrappers in https://github.com/imglib/imglib2/tree/draft/streamify-views.
Usable like this:
I added a rough draft for converting a RaiView
to an ArrayImg
. I probably made some errors while trying to wrestle the generic type of the view into a NativeType
, but it seems to work for a small test example.
What do you say, @tpietzsch?
There is an update version of this PR in #364
This pull request has been mentioned on Image.sc Forum. There might be relevant details there:
https://forum.image.sc/t/recent-and-upcoming-imglib2-improvements/96083/1
As discussed with @tpietzsch, this is an attempt to create an API for
View
that's similar to Java streams. The goal would be to allow this kind of syntax:This is still work in progress. One particular limitation I encountered so far is that most methods in
Views
mapRandomAccessibleInterval
intoRandomAccessible
, i.e., they leave their domain, which makes daisy-chaining impossible.