Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let WrappedImg extend Img #374

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<groupId>net.imglib2</groupId>
<artifactId>imglib2</artifactId>
<version>7.1.5-SNAPSHOT</version>
<version>7.2.0-SNAPSHOT</version>

<name>ImgLib2 Core Library</name>
<description>A multidimensional, type-agnostic image processing library.</description>
Expand Down
86 changes: 85 additions & 1 deletion src/main/java/net/imglib2/img/WrappedImg.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,96 @@

package net.imglib2.img;

import net.imglib2.Cursor;
import net.imglib2.Interval;
import net.imglib2.RandomAccess;
import net.imglib2.stream.LocalizableSpliterator;

/**
* An object that wraps an {@link Img} somehow.
*
* @author Christian Dietz
*/
public interface WrappedImg< T >
public interface WrappedImg< T > extends Img< T >
{
Img< T > getImg();

@Override
default T getType()
{
return getImg().getType();
}

@Override
default int numDimensions()
{
return getImg().numDimensions();
}

@Override
default long min( final int d )
{
return getImg().min( d );
}

@Override
default long max( final int d )
{
return getImg().max( d );
}

@Override
default long dimension( final int d )
{
return getImg().dimension( d );
}

@Override
default RandomAccess< T > randomAccess()
{
return getImg().randomAccess();
}

@Override
default RandomAccess< T > randomAccess( final Interval interval )
{
return getImg().randomAccess( interval );
}

@Override
default Cursor< T > cursor()
{
return getImg().cursor();
}

@Override
default Cursor< T > localizingCursor()
{
return getImg().localizingCursor();
}

@Override
default LocalizableSpliterator< T > spliterator()
{
return getImg().spliterator();
}

@Override
default LocalizableSpliterator< T > localizingSpliterator()
{
return getImg().localizingSpliterator();
}

@Override
default long size()
{
return getImg().size();
}

@Override
default Object iterationOrder()
{
return getImg().iterationOrder();
}

}
Loading