Skip to content

Commit

Permalink
small adjustments, quicker testing of resaving
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanPreibisch committed Sep 13, 2024
1 parent 209d76f commit ee68ddf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import bdv.export.ProgressWriter;
import bdv.img.n5.N5ImageLoader;
import ij.IJ;
import ij.ImageJ;
import ij.plugin.PlugIn;
import mpicbg.spim.data.sequence.TimePoint;
import mpicbg.spim.data.sequence.ViewId;
Expand Down Expand Up @@ -140,10 +141,9 @@ 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( "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 @@ -162,6 +162,7 @@ public static SpimData2 resaveN5(
downsamplings ) ) ).collect(Collectors.toMap( e -> e.getA(), e -> e.getB() ));

IOFunctions.println( "Created BDV-metadata, took: " + (System.currentTimeMillis() - time ) + " ms." );
IOFunctions.println( "Number of compute blocks: " + grid.size() );

final AtomicInteger progress = new AtomicInteger( 0 );
IJ.showProgress( progress.get(), grid.size() );
Expand Down Expand Up @@ -272,7 +273,8 @@ public static void main(String[] args)
System.out.println( Arrays.toString( b[2]));
System.out.println();
});
//new ImageJ();
//new Resave_N5().run( null );

new ImageJ();
new Resave_N5().run( null );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ public void save( final SpimData2 spimData, String xmlPath ) throws SpimDataExce
}
catch ( Exception e )
{
e.printStackTrace();
throw new SpimDataException( "Could not save xml '" + lastURI() + "': " + e );
}

Expand Down

0 comments on commit ee68ddf

Please sign in to comment.