Skip to content

Commit

Permalink
Add missing getType() implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
tpietzsch committed Aug 16, 2024
1 parent 91eda1d commit 017e007
Show file tree
Hide file tree
Showing 18 changed files with 109 additions and 2 deletions.
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 017e007

Please sign in to comment.