diff --git a/pom.xml b/pom.xml index ecb0be2..6e11b07 100644 --- a/pom.xml +++ b/pom.xml @@ -95,6 +95,12 @@ Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, Jean-Yves Tinevez and Michael Zinsmaier. + + 6.3.1-SNAPSHOT + 4.0.3-SNAPSHOT + 1.0.0-beta-18-SNAPSHOT + 2.0.2-SNAPSHOT + true diff --git a/src/main/java/net/imglib2/cache/exampleclassifier/InstanceView.java b/src/main/java/net/imglib2/cache/exampleclassifier/InstanceView.java index d82e1a8..5d6eeb9 100644 --- a/src/main/java/net/imglib2/cache/exampleclassifier/InstanceView.java +++ b/src/main/java/net/imglib2/cache/exampleclassifier/InstanceView.java @@ -14,7 +14,6 @@ public class InstanceView< R extends RealType< R > > extends AbstractConvertedRandomAccessible< RealComposite< R >, Instance > { - final RandomAccessibleInterval< RealComposite< R > > source; private final Attribute[] attributes; @@ -38,14 +37,18 @@ public InstanceAccess< R > randomAccess( final Interval interval ) return randomAccess(); } - public static class InstanceAccess< R extends RealType< R > > extends AbstractConvertedRandomAccess< RealComposite< R >, Instance > + @Override + public Instance getType() { + return randomAccess().getType(); + } + public static class InstanceAccess< R extends RealType< R > > extends AbstractConvertedRandomAccess< RealComposite< R >, Instance > + { private final CompositeInstance< R > instance; private final Attribute[] attributes; - public InstanceAccess( final RandomAccess< RealComposite< R > > source, final Attribute[] attributes ) { super( source ); @@ -60,12 +63,17 @@ public Instance get() return instance; } + @Override + public Instance getType() + { + return instance; + } + @Override public InstanceAccess< R > copy() { return new InstanceAccess<>( source.copy(), attributes ); } - } // length of array is nFeatures + 1 ( for class attribute ) @@ -78,6 +86,4 @@ public static Attribute[] makeDefaultAttributes( final int nFeatures, final int attributes[ nFeatures ] = new Attribute( "class", IntStream.range( 0, nClasses ).mapToObj( i -> "" + i ).collect( Collectors.toList() ) ); return attributes; } - - }