Skip to content

Commit

Permalink
small re-ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanPreibisch committed Sep 13, 2024
1 parent 92db059 commit c7a44bc
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,15 @@
import mpicbg.spim.data.sequence.TimePoint;
import mpicbg.spim.data.sequence.ViewId;
import mpicbg.spim.data.sequence.ViewSetup;
import net.imglib2.util.Util;
import net.imglib2.util.ValuePair;
import net.preibisch.legacy.io.IOFunctions;
import net.preibisch.mvrecon.fiji.plugin.queryXML.LoadParseQueryXML;
import net.preibisch.mvrecon.fiji.spimdata.SpimData2;
import net.preibisch.mvrecon.fiji.spimdata.XmlIoSpimData2;
import net.preibisch.mvrecon.process.export.ExportN5API.StorageType;
import net.preibisch.mvrecon.process.n5api.N5ApiTools;
import net.preibisch.mvrecon.process.n5api.SpimData2Tools;
import net.preibisch.mvrecon.process.n5api.N5ApiTools.MultiResolutionLevelInfo;
import net.preibisch.mvrecon.process.n5api.SpimData2Tools;
import util.Grid;
import util.URITools;

Expand Down Expand Up @@ -141,6 +140,11 @@ public static SpimData2 resaveN5(
final Map<Integer, DataType> dataTypes =
N5ApiTools.assembleDataTypes( data, dimensions.keySet() );

IOFunctions.println( "Dimensions of raw images: " );
dimensions.forEach( ( id,dim ) -> IOFunctions.println( "ViewSetup " + id + ": " + Arrays.toString( dim )) );
IOFunctions.println( "Downsamplings: " + Arrays.deepToString( downsamplings ) );
IOFunctions.println( "Number of compute blocks: " + grid.size() );

// create all datasets and write BDV metadata for all ViewIds (including downsampling) in parallel
long time = System.currentTimeMillis();

Expand All @@ -149,18 +153,15 @@ public static SpimData2 resaveN5(
viewId -> new ValuePair<>(
viewId,
N5ApiTools.setupBdvDatasetsN5(
n5Writer, viewId,
n5Writer,
viewId,
dataTypes.get( viewId.getViewSetupId() ),
dimensions.get( viewId.getViewSetupId() ),
compression,
blockSize,
downsamplings ) ) ).collect(Collectors.toMap( e -> e.getA(), e -> e.getB() ));

IOFunctions.println( "Created BDV-metadata, took: " + (System.currentTimeMillis() - time ) + " ms." );
IOFunctions.println( "Dimensions of raw images: " );
dimensions.forEach( ( id,dim ) -> IOFunctions.println( "ViewSetup " + id + ": " + Arrays.toString( dim )) );
IOFunctions.println( "Downsamplings: " + Arrays.deepToString( downsamplings ) );
IOFunctions.println( "Number of compute blocks: " + grid.size() );

final AtomicInteger progress = new AtomicInteger( 0 );
IJ.showProgress( progress.get(), grid.size() );
Expand Down

0 comments on commit c7a44bc

Please sign in to comment.