Currently, IterableRegion implements both RandomAccessibleInterval<BooleanType>andIterableInterval<Void>.
The idea is that if you have a RandomAccess, it will be true inside the region, and false outside. When you iterate you only want to visit the inside pixels (where the RA would be true). Therefore IterableInterval<Void>, not BooleanType.
It seemed at one point neat (albeit confusing) to implement this by inheriting Accessibles of different Type.
With https://github.com/imglib/imglib2/pull/312 this will no longer be possible.
IterableRegion.getType() cannot return both Void and BooleanType.
Therefore, the "inside IterableInterval" should become a separate thing. maybe by adding a method IterableInterval<Void> inside().
Currently,
IterableRegion
implements bothRandomAccessibleInterval<BooleanType>
andIterableInterval<Void>
.The idea is that if you have a RandomAccess, it will be
true
inside the region, andfalse
outside. When you iterate you only want to visit the inside pixels (where the RA would betrue
). ThereforeIterableInterval<Void>
, notBooleanType
.It seemed at one point neat (albeit confusing) to implement this by inheriting Accessibles of different Type. With https://github.com/imglib/imglib2/pull/312 this will no longer be possible.
IterableRegion.getType()
cannot return bothVoid
andBooleanType
.Therefore, the "inside IterableInterval" should become a separate thing. maybe by adding a method
IterableInterval<Void> inside()
.