Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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.</license.copyrightOwners>

<imglib2.version>6.3.1-SNAPSHOT</imglib2.version>
<imglib2-realtransform.version>4.0.3-SNAPSHOT</imglib2-realtransform.version>
<imglib2-cache.version>1.0.0-beta-18-SNAPSHOT</imglib2-cache.version>
<imglib2-ij.version>2.0.2-SNAPSHOT</imglib2-ij.version>
<enforcer.skip>true</enforcer.skip>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 );
Expand All @@ -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 )
Expand All @@ -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;
}


}