Skip to content

Commit

Permalink
correct compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Oct 1, 2024
1 parent fc3fc86 commit a4eeaf9
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import net.imglib2.type.numeric.integer.UnsignedByteType;
import net.imglib2.type.numeric.real.DoubleType;
import net.imglib2.type.numeric.real.FloatType;
import net.imglib2.util.Cast;
import net.imglib2.util.Util;
import net.imglib2.view.Views;

Expand Down Expand Up @@ -104,19 +105,19 @@ public static < T extends RealType< T > & NativeType< T > > TType build(
{
// Create an Icy sequence of the same type of the tensor
if (Util.getTypeFromInterval(array) instanceof UnsignedByteType) {
return buildUByte((RandomAccessibleInterval<UnsignedByteType>) array);
return buildUByte(Cast.unchecked(array));
}
else if (Util.getTypeFromInterval(array) instanceof IntType) {
return buildInt((RandomAccessibleInterval<IntType>) array);
return buildInt(Cast.unchecked(array));
}
else if (Util.getTypeFromInterval(array) instanceof FloatType) {
return buildFloat((RandomAccessibleInterval<FloatType>) array);
return buildFloat(Cast.unchecked(array));
}
else if (Util.getTypeFromInterval(array) instanceof DoubleType) {
return buildDouble((RandomAccessibleInterval<DoubleType>) array);
return buildDouble(Cast.unchecked(array));
}
else if (Util.getTypeFromInterval(array) instanceof LongType) {
return buildLong((RandomAccessibleInterval<LongType>) array);
return buildLong(Cast.unchecked(array));
}
else {
throw new IllegalArgumentException("Unsupported tensor type: " + Util
Expand Down

0 comments on commit a4eeaf9

Please sign in to comment.