Here we go again,
having trouble with above conversion. I found this solution on the forum.
Img<T> img = ImgView.wrap(rai, new ArrayImgFactory<>());
However, Eclipse is giving me strike outs reporting that this solution is deprecated. I am thankful for quick help.
Edits (Explanations / Corrections):
I am passing a View as RandomAccessibleInterval to a function. Now I want to make a copy of that View there, in order to do some processing, but no method is available to just create a copy of that View. I am fine with just a new empty image with same dimensions, but then again I cannot call
Img<T> img = rai.factory().create(rai);
because factory() is undefined for the Type RandomAccessibleInterval