Skip to content

Commit

Permalink
Merge pull request #54 from PreibischLab/feature-rai-getType
Browse files Browse the repository at this point in the history
Addition of getType() API
  • Loading branch information
StephanPreibisch authored Aug 20, 2024
2 parents 9a52836 + 017e007 commit d9644f2
Show file tree
Hide file tree
Showing 19 changed files with 117 additions and 12 deletions.
18 changes: 8 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,13 @@ like Selective Plane Illumination Microscopy (SPIM) Data.</description>
<!-- NB: Deploy releases to the SciJava Maven repository. -->
<releaseProfiles>sign,deploy-to-scijava</releaseProfiles>

<bigdataviewer-core.version>10.4.12</bigdataviewer-core.version>
<bigdataviewer-vistools.version>1.0.0-beta-33</bigdataviewer-vistools.version>
<imglib2.version>7.1.0</imglib2.version>
<imglib2-realtransform.version>4.0.3</imglib2-realtransform.version>
<imglib2-cache.version>1.0.0-beta-18</imglib2-cache.version>
<imglib2-algorithm.version>0.15.3</imglib2-algorithm.version>
<imglib2-roi.version>0.15.0</imglib2-roi.version>
<bigdataviewer-core.version>10.6.0</bigdataviewer-core.version>
<bigdataviewer-vistools.version>1.0.0-beta-36</bigdataviewer-vistools.version>
</properties>

<repositories>
Expand Down Expand Up @@ -143,13 +148,6 @@ like Selective Plane Illumination Microscopy (SPIM) Data.</description>
<artifactId>ij</artifactId>
</dependency>

<!-- vistools temporary -->
<dependency>
<!-- NB: dependency:analyze erroneously flags this, but it's required -->
<groupId>sc.fiji</groupId>
<artifactId>bigdataviewer-vistools</artifactId>
</dependency>

<!-- ImgLib2 dependencies -->
<dependency>
<groupId>net.imglib2</groupId>
Expand Down Expand Up @@ -269,7 +267,7 @@ like Selective Plane Illumination Microscopy (SPIM) Data.</description>
<artifactId>picocli</artifactId>
</dependency>
</dependencies>

<profiles>
<profile>
<id>fatjar</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ public RandomAccess< T > randomAccess(Interval interval)
return randomAccess();
}

@Override
public T getType()
{
return type;
}

private class VirtualRandomAccessLOCI extends Point implements RandomAccess< T >
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,13 @@ public RandomAccess< O > randomAccess(Interval interval)
{
return randomAccess();
}


@Override
public O getType()
{
return type;
}

private class FlatFieldCorrectedRandomAccess extends Point implements RandomAccess< O >
{
/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,13 @@ public RandomAccess< T > randomAccess(Interval interval)
{
return randomAccess();
}


@Override
public T getType()
{
return input.getType();
}

private class VirtuallyNormalizedRandomAccess extends Point implements RandomAccess< T >
{
private final T value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ public RandomAccess< T > randomAccess()
@Override
public RandomAccess< T > randomAccess( final Interval interval ) { return randomAccess(); }

@Override
public T getType()
{
return interval.getType();
}

@Override
public long min( final int d ){ return interval.min( 0 ); }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,10 @@ public int numDimensions()
{
return n;
}

@Override
public FloatType getType()
{
return new FloatType();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ public RandomAccess< FloatType > randomAccess( Interval interval )
return randomAccess();
}

@Override
public FloatType getType()
{
return new FloatType();
}

@Override
public long min( final int d ) { return interval.min( d ); }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ public RandomAccess< FloatType > randomAccess( final Interval arg0 )
return randomAccess();
}

@Override
public FloatType getType()
{
return new FloatType();
}

@Override
public int numDimensions()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,10 @@ public RealRandomAccess< NumericAffineModel3D > realRandomAccess()

@Override
public RealRandomAccess< NumericAffineModel3D > realRandomAccess( final RealInterval interval ) { return realRandomAccess(); }

@Override
public NumericAffineModel3D getType()
{
return new NumericAffineModel3D();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ public RandomAccess< NumericAffineModel3D > randomAccess(
return randomAccess();
}

@Override
public NumericAffineModel3D getType()
{
return new NumericAffineModel3D();
}

@Override
public int numDimensions()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ public RandomAccess< FloatType > randomAccess( Interval interval )
return randomAccess();
}

@Override
public FloatType getType()
{
return new FloatType();
}

@Override
public long min( final int d ) { return interval.min( d ); }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,10 @@ public RealRandomAccess<FloatType> realRandomAccess( final RealInterval interval
{
return realRandomAccess();
}

@Override
public FloatType getType()
{
return new FloatType();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,9 @@ public static void main( String[] args ) throws IncompatibleTypeException
ImageJFunctions.show( cb.getContentBasedImg() );
}

@Override
public FloatType getType()
{
return new FloatType();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ public RealRandomAccess<FloatType> realRandomAccess( final RealInterval interval
return entropyRRA.realRandomAccess( interval );
}

@Override
public FloatType getType()
{
return new FloatType();
}

@Override
public int numDimensions() { return entropy.numDimensions(); }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,10 @@ public RandomAccess< T > randomAccess()

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

@Override
public T getType()
{
return realRandomAccessible.getType();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,10 @@ public RandomAccess< T > randomAccess()

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

@Override
public T getType()
{
return realRandomAccessible.getType();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,10 @@ public RandomAccess< T > randomAccess()

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

@Override
public T getType()
{
return realRandomAccessible.getType();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ public RealRandomAccess<FloatType> realRandomAccess( final RealInterval interval
return realRandomAccess();
}

@Override
public FloatType getType()
{
return new FloatType();
}

public RealRandomAccessible< FloatType > getRealRandomAccessible()
{
final NearestNeighborSearch< FloatType > search = new NearestNeighborSearchOnKDTree<>( new KDTree<>( qualityList ) );
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/util/StackingRealRandomAccessible.java
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,12 @@ public StackingRealRandomAccess realRandomAccess( final RealInterval interval )
return realRandomAccess();
}

@Override
public T getType()
{
return source.getType();
}

@Override
public int numDimensions()
{
Expand Down

0 comments on commit d9644f2

Please sign in to comment.