|
42 | 42 | import org.janelia.saalfeldlab.n5.Compression; |
43 | 43 | import org.janelia.saalfeldlab.n5.DataType; |
44 | 44 | import org.janelia.saalfeldlab.n5.DatasetAttributes; |
| 45 | +import org.janelia.saalfeldlab.n5.GzipCompression; |
45 | 46 | import org.janelia.saalfeldlab.n5.N5Writer; |
46 | 47 | import org.janelia.saalfeldlab.n5.RawCompression; |
47 | 48 | import org.janelia.saalfeldlab.n5.imglib2.N5Utils; |
@@ -352,23 +353,23 @@ public static MultiResolutionLevelInfo[] setupBdvDatasetsHDF5( |
352 | 353 | subdivisions = ArrayImgs.ints( blocksizes, new long[] { 3, downsamplings.length } ); // blocksize |
353 | 354 | resolutions = ArrayImgs.doubles( downsamples, new long[] { 3, downsamplings.length } ); // downsampling |
354 | 355 | } |
355 | | - |
| 356 | + |
356 | 357 | driverVolumeWriter.createDataset( |
357 | 358 | subdivisionsDatasets, |
358 | 359 | subdivisions.dimensionsAsLongArray(),// new long[] { 3, 1 }, |
359 | | - new int[] { (int)subdivisions.dimension( 0 ), (int)subdivisions.dimension( 1 ) }, //new int[] { 3, 1 }, |
| 360 | + Arrays.stream( subdivisions.dimensionsAsLongArray() ).mapToInt(i -> (int) i).toArray(),//new int[] { (int)subdivisions.dimension( 0 ), (int)subdivisions.dimension( 1 ) }, //new int[] { 3, 1 }, |
360 | 361 | DataType.INT32, |
361 | 362 | new RawCompression() ); |
362 | 363 |
|
363 | 364 | driverVolumeWriter.createDataset( |
364 | 365 | resolutionsDatasets, |
365 | 366 | resolutions.dimensionsAsLongArray(),// new long[] { 3, 1 }, |
366 | | - new int[] { (int)resolutions.dimension( 0 ), (int)resolutions.dimension( 1 ) },//new int[] { 3, 1 }, |
| 367 | + Arrays.stream( resolutions.dimensionsAsLongArray() ).mapToInt(i -> (int) i).toArray(),//new int[] { (int)resolutions.dimension( 0 ), (int)resolutions.dimension( 1 ) },//new int[] { 3, 1 }, |
367 | 368 | DataType.FLOAT64, |
368 | 369 | new RawCompression() ); |
369 | | - |
370 | | - N5Utils.saveBlock(subdivisions, driverVolumeWriter, "s" + String.format("%02d", viewId.getViewSetupId()) + "/subdivisions", new long[] {0,0,0} ); |
371 | | - N5Utils.saveBlock(resolutions, driverVolumeWriter, "s" + String.format("%02d", viewId.getViewSetupId()) + "/resolutions", new long[] {0,0,0} ); |
| 370 | + |
| 371 | + N5Utils.saveBlock(subdivisions, driverVolumeWriter, "s" + String.format("%02d", viewId.getViewSetupId()) + "/subdivisions", new long[] {0,0} ); |
| 372 | + N5Utils.saveBlock(resolutions, driverVolumeWriter, "s" + String.format("%02d", viewId.getViewSetupId()) + "/resolutions", new long[] {0,0} ); |
372 | 373 | } |
373 | 374 |
|
374 | 375 | return mrInfo; |
|
0 commit comments