Skip to content

Commit e223911

Browse files
authored
Merge pull request #17 from petebankhead/real-simple
Trying to simplify
2 parents d556d8f + d630f0d commit e223911

File tree

5 files changed

+312
-159
lines changed

5 files changed

+312
-159
lines changed

src/main/java/qupath/ext/imglib2/AccessibleScaler.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import net.imglib2.realtransform.RealViews;
1010
import net.imglib2.realtransform.Scale2D;
1111
import net.imglib2.realtransform.Translation2D;
12-
import net.imglib2.type.NativeType;
1312
import net.imglib2.type.numeric.NumericType;
1413
import net.imglib2.view.Views;
1514

@@ -40,7 +39,7 @@ private AccessibleScaler() {
4039
* @throws IllegalArgumentException if the input interval has at least one minimum different from 0, if the provided scale is less
4140
* than or equal to 0, or if the input interval has less than two dimensions
4241
*/
43-
public static <T extends NativeType<T> & NumericType<T>> RandomAccessibleInterval<T> scaleWithLinearInterpolation(
42+
public static <T extends NumericType<T>> RandomAccessibleInterval<T> scaleWithLinearInterpolation(
4443
RandomAccessibleInterval<T> input,
4544
double scale
4645
) {
@@ -59,7 +58,7 @@ public static <T extends NativeType<T> & NumericType<T>> RandomAccessibleInterva
5958
* @throws IllegalArgumentException if the input interval has at least one minimum different from 0, if the provided scale is less
6059
* than or equal to 0, or if the input interval has less than two dimensions
6160
*/
62-
public static <T extends NativeType<T> & NumericType<T>> RandomAccessibleInterval<T> scaleWithNearestNeighborInterpolation(
61+
public static <T> RandomAccessibleInterval<T> scaleWithNearestNeighborInterpolation(
6362
RandomAccessibleInterval<T> input,
6463
double scale
6564
) {
@@ -79,7 +78,7 @@ public static <T extends NativeType<T> & NumericType<T>> RandomAccessibleInterva
7978
* @throws IllegalArgumentException if the input interval has at least one minimum different from 0, if the provided scale is less
8079
* than or equal to 0, or if the input interval has less than two dimensions
8180
*/
82-
public static <T extends NativeType<T> & NumericType<T>> RandomAccessibleInterval<T> scale(
81+
public static <T> RandomAccessibleInterval<T> scale(
8382
RandomAccessibleInterval<T> input,
8483
double scale,
8584
InterpolatorFactory<T, RandomAccessible<T>> interpolatorFactory
@@ -104,7 +103,7 @@ public static <T extends NativeType<T> & NumericType<T>> RandomAccessibleInterva
104103
}
105104
}
106105

107-
private static <T extends NativeType<T> & NumericType<T>> RandomAccessibleInterval<T> scaleWithoutChecks(
106+
private static <T> RandomAccessibleInterval<T> scaleWithoutChecks(
108107
RandomAccessibleInterval<T> input,
109108
double scale,
110109
Scale2D scale2D,

0 commit comments

Comments
 (0)