Skip to content

Commit 66aae89

Browse files
committed
fix: AxisUtils defaultN5ViewerAxes up to 5d
* handles some unusual cases
1 parent 05d9672 commit 66aae89

File tree

1 file changed

+5
-4
lines changed
  • src/main/java/org/janelia/saalfeldlab/n5/universe/metadata/axes

1 file changed

+5
-4
lines changed

src/main/java/org/janelia/saalfeldlab/n5/universe/metadata/axes/AxisUtils.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,6 @@ public static <T, M extends AxisMetadata & N5Metadata> RandomAccessibleInterval<
254254
fillPermutation( p );
255255

256256
// TODO under what conditions can I return the image directly?
257-
258257
RandomAccessibleInterval<T> imgTmp = img;
259258
while( imgTmp.numDimensions() < 5 )
260259
imgTmp = Views.addDimension(imgTmp, 0, 0 );
@@ -436,12 +435,14 @@ public static DefaultAxisMetadata defaultN5ViewerAxes(final N5SpatialDatasetMeta
436435
final int nd = meta.getAttributes().getNumDimensions();
437436

438437
final String[] labels;
439-
if (nd == 2)
438+
if (nd == 2)
440439
labels = new String[]{"x", "y"};
441-
else if (nd == 3)
440+
else if (nd == 3)
442441
labels = new String[]{"x", "y", "z"};
443-
else if( nd == 4)
442+
else if (nd == 4)
444443
labels = new String[]{"x", "y", "z", "t"};
444+
else if (nd == 5)
445+
labels = new String[]{"x", "y", "z", "c", "t"};
445446
else
446447
return null;
447448

0 commit comments

Comments
 (0)