Closed axtimwalde closed 4 years ago
Turns out this is fixed in https://github.com/imglib/imglib2-roi/commit/d6eb24cddd6517436f2115be6c748b59ff11be46
Permaturely closed, this was a related issue that tricked @tpietzsch and me to briefly believe that the issue was already addressed.
This code used to work as expected:
Now I get a
because you now have now two methods
which is very unfortunate because
RandomAccessibleInterval extends RandomAccessible
andRealMaskRealInterval extends RealMask
, which means the compiler can never find out what to do without super verbose casting, and in scripts with dynamic type inference you will be screwed.It can also lead to unexpected inefficiencies, because you may end up using
which loops over the entire target interval instead of
which loops only over the bounding box of the region. All of that without notice.
I suggest to remove the ambiguous new method
and replace it by
unfortunately, you will have to break this hard, because deprecation would keep this issue alive.
An alternative would be to deprecate both
sample
methods and replace them bybut I can see how calling them
sample
was attractive...