From 017e0078e3de0dc9022a7ba4b78c5906068e8c90 Mon Sep 17 00:00:00 2001 From: tpietzsch Date: Fri, 5 Apr 2024 17:42:28 +0200 Subject: [PATCH] Add missing getType() implementations --- .../filemap2/VirtualRandomAccessibleIntervalLOCI.java | 6 ++++++ .../FlatFieldCorrectedRandomAccessibleInterval.java | 8 +++++++- .../VirtuallyNormalizedRandomAccessibleInterval.java | 8 +++++++- .../NormalizingRandomAccessibleInterval.java | 6 ++++++ .../AbstractTransformedIntervalRandomAccessible.java | 6 ++++++ .../fusion/transformed/FusedRandomAccessibleInterval.java | 6 ++++++ .../TransformedInputGeneralRandomAccessible.java | 6 ++++++ .../fusion/transformed/nonrigid/grid/ModelGrid.java | 6 ++++++ .../fusion/transformed/nonrigid/grid/VirtualGrid.java | 6 ++++++ .../CombineWeightsRandomAccessibleInterval.java | 6 ++++++ .../transformed/weights/BlendingRealRandomAccessible.java | 6 ++++++ .../weights/ContentBasedFFTRealRandomAccessible.java | 5 +++++ .../weights/ContentBasedRealRandomAccessible.java | 6 ++++++ .../InterpolatingNonRigidRasteredRandomAccessible.java | 6 ++++++ .../weights/NonRigidRasteredRandomAccessible.java | 6 ++++++ .../weights/TransformedRasteredRandomAccessible.java | 6 ++++++ .../mvrecon/process/quality/FRCRealRandomAccessible.java | 6 ++++++ src/main/java/util/StackingRealRandomAccessible.java | 6 ++++++ 18 files changed, 109 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/preibisch/mvrecon/fiji/spimdata/imgloaders/filemap2/VirtualRandomAccessibleIntervalLOCI.java b/src/main/java/net/preibisch/mvrecon/fiji/spimdata/imgloaders/filemap2/VirtualRandomAccessibleIntervalLOCI.java index e035f7d26..b58463b4d 100644 --- a/src/main/java/net/preibisch/mvrecon/fiji/spimdata/imgloaders/filemap2/VirtualRandomAccessibleIntervalLOCI.java +++ b/src/main/java/net/preibisch/mvrecon/fiji/spimdata/imgloaders/filemap2/VirtualRandomAccessibleIntervalLOCI.java @@ -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 > { diff --git a/src/main/java/net/preibisch/mvrecon/fiji/spimdata/imgloaders/flatfield/FlatFieldCorrectedRandomAccessibleInterval.java b/src/main/java/net/preibisch/mvrecon/fiji/spimdata/imgloaders/flatfield/FlatFieldCorrectedRandomAccessibleInterval.java index 113de1396..a5875d553 100644 --- a/src/main/java/net/preibisch/mvrecon/fiji/spimdata/imgloaders/flatfield/FlatFieldCorrectedRandomAccessibleInterval.java +++ b/src/main/java/net/preibisch/mvrecon/fiji/spimdata/imgloaders/flatfield/FlatFieldCorrectedRandomAccessibleInterval.java @@ -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 > { /* diff --git a/src/main/java/net/preibisch/mvrecon/fiji/spimdata/imgloaders/flatfield/VirtuallyNormalizedRandomAccessibleInterval.java b/src/main/java/net/preibisch/mvrecon/fiji/spimdata/imgloaders/flatfield/VirtuallyNormalizedRandomAccessibleInterval.java index 6cdddc9b2..73b0aa497 100644 --- a/src/main/java/net/preibisch/mvrecon/fiji/spimdata/imgloaders/flatfield/VirtuallyNormalizedRandomAccessibleInterval.java +++ b/src/main/java/net/preibisch/mvrecon/fiji/spimdata/imgloaders/flatfield/VirtuallyNormalizedRandomAccessibleInterval.java @@ -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; diff --git a/src/main/java/net/preibisch/mvrecon/process/deconvolution/normalization/NormalizingRandomAccessibleInterval.java b/src/main/java/net/preibisch/mvrecon/process/deconvolution/normalization/NormalizingRandomAccessibleInterval.java index e3de57dc6..079e9616a 100644 --- a/src/main/java/net/preibisch/mvrecon/process/deconvolution/normalization/NormalizingRandomAccessibleInterval.java +++ b/src/main/java/net/preibisch/mvrecon/process/deconvolution/normalization/NormalizingRandomAccessibleInterval.java @@ -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 ); } diff --git a/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/AbstractTransformedIntervalRandomAccessible.java b/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/AbstractTransformedIntervalRandomAccessible.java index 33c157af3..9e4f11c55 100644 --- a/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/AbstractTransformedIntervalRandomAccessible.java +++ b/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/AbstractTransformedIntervalRandomAccessible.java @@ -79,4 +79,10 @@ public int numDimensions() { return n; } + + @Override + public FloatType getType() + { + return new FloatType(); + } } diff --git a/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/FusedRandomAccessibleInterval.java b/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/FusedRandomAccessibleInterval.java index 6cdda023c..3f5f8c4da 100644 --- a/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/FusedRandomAccessibleInterval.java +++ b/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/FusedRandomAccessibleInterval.java @@ -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 ); } diff --git a/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/TransformedInputGeneralRandomAccessible.java b/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/TransformedInputGeneralRandomAccessible.java index bd4ce62fe..061941a1b 100644 --- a/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/TransformedInputGeneralRandomAccessible.java +++ b/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/TransformedInputGeneralRandomAccessible.java @@ -67,6 +67,12 @@ public RandomAccess< FloatType > randomAccess( final Interval arg0 ) return randomAccess(); } + @Override + public FloatType getType() + { + return new FloatType(); + } + @Override public int numDimensions() { diff --git a/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/nonrigid/grid/ModelGrid.java b/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/nonrigid/grid/ModelGrid.java index 8c7365b52..f1668d6d0 100644 --- a/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/nonrigid/grid/ModelGrid.java +++ b/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/nonrigid/grid/ModelGrid.java @@ -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(); + } } diff --git a/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/nonrigid/grid/VirtualGrid.java b/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/nonrigid/grid/VirtualGrid.java index de86b13c0..e775be2b7 100644 --- a/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/nonrigid/grid/VirtualGrid.java +++ b/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/nonrigid/grid/VirtualGrid.java @@ -66,6 +66,12 @@ public RandomAccess< NumericAffineModel3D > randomAccess( return randomAccess(); } + @Override + public NumericAffineModel3D getType() + { + return new NumericAffineModel3D(); + } + @Override public int numDimensions() { diff --git a/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weightcombination/CombineWeightsRandomAccessibleInterval.java b/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weightcombination/CombineWeightsRandomAccessibleInterval.java index a38fe5659..fe5c22809 100644 --- a/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weightcombination/CombineWeightsRandomAccessibleInterval.java +++ b/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weightcombination/CombineWeightsRandomAccessibleInterval.java @@ -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 ); } diff --git a/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weights/BlendingRealRandomAccessible.java b/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weights/BlendingRealRandomAccessible.java index 84ad88ee8..4c4514842 100644 --- a/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weights/BlendingRealRandomAccessible.java +++ b/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weights/BlendingRealRandomAccessible.java @@ -84,4 +84,10 @@ public RealRandomAccess realRandomAccess( final RealInterval interval { return realRandomAccess(); } + + @Override + public FloatType getType() + { + return new FloatType(); + } } diff --git a/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weights/ContentBasedFFTRealRandomAccessible.java b/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weights/ContentBasedFFTRealRandomAccessible.java index 8b64041e9..63c486c86 100644 --- a/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weights/ContentBasedFFTRealRandomAccessible.java +++ b/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weights/ContentBasedFFTRealRandomAccessible.java @@ -197,4 +197,9 @@ public static void main( String[] args ) throws IncompatibleTypeException ImageJFunctions.show( cb.getContentBasedImg() ); } + @Override + public FloatType getType() + { + return new FloatType(); + } } diff --git a/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weights/ContentBasedRealRandomAccessible.java b/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weights/ContentBasedRealRandomAccessible.java index 3256a20b4..df12c4461 100644 --- a/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weights/ContentBasedRealRandomAccessible.java +++ b/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weights/ContentBasedRealRandomAccessible.java @@ -108,6 +108,12 @@ public RealRandomAccess realRandomAccess( final RealInterval interval return entropyRRA.realRandomAccess( interval ); } + @Override + public FloatType getType() + { + return new FloatType(); + } + @Override public int numDimensions() { return entropy.numDimensions(); } diff --git a/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weights/InterpolatingNonRigidRasteredRandomAccessible.java b/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weights/InterpolatingNonRigidRasteredRandomAccessible.java index 2b770ddf3..cb045518c 100644 --- a/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weights/InterpolatingNonRigidRasteredRandomAccessible.java +++ b/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weights/InterpolatingNonRigidRasteredRandomAccessible.java @@ -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(); + } } diff --git a/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weights/NonRigidRasteredRandomAccessible.java b/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weights/NonRigidRasteredRandomAccessible.java index 5a453ce3d..5db0758e4 100644 --- a/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weights/NonRigidRasteredRandomAccessible.java +++ b/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weights/NonRigidRasteredRandomAccessible.java @@ -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(); + } } diff --git a/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weights/TransformedRasteredRandomAccessible.java b/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weights/TransformedRasteredRandomAccessible.java index 277ec8754..4962207f3 100644 --- a/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weights/TransformedRasteredRandomAccessible.java +++ b/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weights/TransformedRasteredRandomAccessible.java @@ -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(); + } } diff --git a/src/main/java/net/preibisch/mvrecon/process/quality/FRCRealRandomAccessible.java b/src/main/java/net/preibisch/mvrecon/process/quality/FRCRealRandomAccessible.java index 2c02fa86e..869351561 100644 --- a/src/main/java/net/preibisch/mvrecon/process/quality/FRCRealRandomAccessible.java +++ b/src/main/java/net/preibisch/mvrecon/process/quality/FRCRealRandomAccessible.java @@ -161,6 +161,12 @@ public RealRandomAccess 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 ) ); diff --git a/src/main/java/util/StackingRealRandomAccessible.java b/src/main/java/util/StackingRealRandomAccessible.java index 6589a2f24..a669a2128 100644 --- a/src/main/java/util/StackingRealRandomAccessible.java +++ b/src/main/java/util/StackingRealRandomAccessible.java @@ -355,6 +355,12 @@ public StackingRealRandomAccess realRandomAccess( final RealInterval interval ) return realRandomAccess(); } + @Override + public T getType() + { + return source.getType(); + } + @Override public int numDimensions() {