Skip to content

Commit cb34ce4

Browse files
committed
Fix nodeCollector export over network drive
1 parent dce88ad commit cb34ce4

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎src/main/java/sc/fiji/snt/util/ImgUtils.java‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,8 +1491,9 @@ public static <T extends RealType<T> & NativeType<T>> void save(
14911491
final String path = (filePath.endsWith(".tif") || filePath.endsWith(".tiff"))
14921492
? filePath : filePath + ".tif";
14931493
final Img<T> output = new ArrayImgFactory<>(outType).create(img);
1494-
LoopBuilder.setImages(img, output).multiThreaded()
1495-
.forEachPixel((in, out) -> out.setReal(in.getRealDouble()));
1494+
// Single-threaded: concurrent chunk reads from lazy/network-backed sources
1495+
// (HDF5, N5, Zarr on network mounts) saturate the I/O client and cause hangs
1496+
LoopBuilder.setImages(img, output).forEachPixel((in, out) -> out.setReal(in.getRealDouble()));
14961497
final Context ctx = SNTUtils.getContext();
14971498
final Dataset dataset = ctx.service(DatasetService.class).create(output);
14981499
ctx.service(DatasetIOService.class).save(dataset, path);

0 commit comments

Comments
 (0)