Skip to content

Commit 3111f62

Browse files
add hack to ome-zarr multi-resolution pyramid metadata is correct
1 parent 4d48dcc commit 3111f62

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/main/java/net/preibisch/bigstitcher/spark/CreateFusionContainer.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,8 @@ else if ( storageType == StorageFormat.N5 || storageType == StorageFormat.ZARR )
347347

348348
// extract the resolution of the s0 export
349349
// TODO: this is inaccurate, we should actually estimate it from the final transformn that is applied
350-
final VoxelDimensions vx = dataGlobal.getSequenceDescription().getViewSetupsOrdered().iterator().next().getVoxelSize();
350+
// TODO: this is a hack (returns 1,1,1) so the export downsampling pyramid is working
351+
final VoxelDimensions vx = new FinalVoxelDimensions( "micrometer", new double[] { 1, 1, 1 } );// dataGlobal.getSequenceDescription().getViewSetupsOrdered().iterator().next().getVoxelSize();
351352
final double[] resolutionS0 = OMEZarrAttibutes.getResolutionS0( vx, anisotropyFactor, Double.NaN );
352353

353354
System.out.println( "Resolution of level 0: " + Util.printCoordinates( resolutionS0 ) + " " + "m" ); //vx.unit() might not be OME-ZARR compatiblevx.unit() );
@@ -431,7 +432,8 @@ else if ( storageType == StorageFormat.ZARR ) // OME-Zarr export
431432

432433
// extract the resolution of the s0 export
433434
// TODO: this is inaccurate, we should actually estimate it from the final transformn that is applied
434-
final VoxelDimensions vx = dataGlobal.getSequenceDescription().getViewSetupsOrdered().iterator().next().getVoxelSize();
435+
// TODO: this is a hack (returns 1,1,1) so the export downsampling pyramid is working
436+
final VoxelDimensions vx = new FinalVoxelDimensions( "micrometer", new double[] { 1, 1, 1 } );// dataGlobal.getSequenceDescription().getViewSetupsOrdered().iterator().next().getVoxelSize();
435437
final double[] resolutionS0 = OMEZarrAttibutes.getResolutionS0( vx, anisotropyFactor, Double.NaN );
436438

437439
System.out.println( "Resolution of level 0: " + Util.printCoordinates( resolutionS0 ) + " " + "micrometer" ); //vx.unit() might not be OME-ZARR compatiblevx.unit() );

0 commit comments

Comments
 (0)