Skip to content

Commit

Permalink
Clean up ResaveMultiSemHeightField
Browse files Browse the repository at this point in the history
  • Loading branch information
minnerbe committed May 7, 2024
1 parent 192f096 commit 182c895
Showing 1 changed file with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import net.imglib2.view.Views;
import org.janelia.saalfeldlab.hotknife.util.Util;
import org.janelia.saalfeldlab.n5.DatasetAttributes;
import org.janelia.saalfeldlab.n5.GzipCompression;
import org.janelia.saalfeldlab.n5.N5FSReader;
import org.janelia.saalfeldlab.n5.N5FSWriter;
import org.janelia.saalfeldlab.n5.N5Reader;
Expand Down Expand Up @@ -117,27 +116,16 @@ public final Void call() throws IOException, InterruptedException, ExecutionExce
System.out.println("SMOOTHING heightfield");
Gauss3.gauss(SIGMA, Views.extendBorder(heightField), heightField);

//final ExecutorService exec = Executors.newFixedThreadPool(4);

System.out.println("SAVING height field " + n5OutputPath + maxHeightFieldOut);
final double avg = sourceN5.getAttribute(maxHeightField, "avg", double.class);
attributes = sourceN5.getDatasetAttributes(maxHeightField);

//N5Utils.save(heightField, targetN5, maxHeightFieldOut, attributes.getBlockSize(), attributes.getCompression());

N5Utils
.save(
heightField,
targetN5,
maxHeightFieldOut,
attributes.getBlockSize(),
attributes.getCompression() );
N5Utils.save(heightField, targetN5, maxHeightFieldOut, attributes.getBlockSize(), attributes.getCompression());

System.out.println( "Setting attributes avg=" + avg + ", downsamplingFactors=" + Arrays.toString( downsamplingFactors ));
targetN5.setAttribute(maxHeightFieldOut, "avg", avg);
targetN5.setAttribute(maxHeightFieldOut, "downsamplingFactors", downsamplingFactors);

//exec.shutdown();
service.shutdown();
sourceN5.close();
targetN5.close();
Expand Down

0 comments on commit 182c895

Please sign in to comment.