Skip to content

Commit

Permalink
fix: odd compilation error
Browse files Browse the repository at this point in the history
* minor formatting change
  • Loading branch information
bogovicj committed Aug 1, 2023
1 parent 244f2c4 commit edcb6a5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main/java/org/janelia/saalfeldlab/n5/ij/N5Importer.java
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,9 @@ public static <T extends NumericType<T> & NativeType<T>, M extends N5DatasetMeta

// convert label multisets to ulong, then converts to ushort with LUT
if (N5LabelMultisets.isLabelMultisetType(n5, datasetMeta.getPath())) {
convImg = convertToUShortLUT(

// why is this cast necessary?
convImg = (RandomAccessibleInterval<T>)convertToUShortLUT(
Converters.convert2(
img,
new LabelMultisetLongConverter(),
Expand All @@ -500,8 +502,8 @@ public static <T extends NumericType<T> & NativeType<T>, M extends N5DatasetMeta
convImg = convertDouble(img);
} else if (isRGB && type == DataType.UINT32) {
convImg = convertToRGB(img);
} else if (type == DataType.INT32 || type == DataType.UINT32 ||
type == DataType.INT64 || type == DataType.UINT64) {
} else if ( type == DataType.INT32 || type == DataType.UINT32 ||
type == DataType.INT64 || type == DataType.UINT64) {
convImg = convertToUShortLUT(img);
} else {
// this covers int8 -> uint8 and int16 -> uint16
Expand Down

0 comments on commit edcb6a5

Please sign in to comment.