BigStitcher fuse and save as hdf5/xml fails in newer version of BigStitcher

Hi @StephanPreibisch @hoerldavid

I ran into an issue with the fuse and save as new hfd5/xml function in Bigstitcher, which I think is different fromthe one previously reported.

Save as Tiff works fine, though. I have gotten this error with Bigstitcher version 0.3.5 and 0.3.3, but not with version 0.2.10. I have not tested the versions in between since I only had those three versions around on my computer.

I would, however, like to work with a newer version as my dataset requires to flip the X and Y axes. I belive this functinality was introduced at a point after 0.2.10.

You should be able to reproduce the issue with the minimal dataset that I uploaded and the macro code below:

source = "V:/imcf_olympus/20x_2regions/imcf-group-split_2D/left" ;
filename = source + "/dataset.xml" ;
outfile = source + "/dataset_fused.xml" ;

// define dataset
run("Define dataset ...", "define_dataset=[Manual Loader (Bioformats based)] project_filename=dataset.xml multiple_timepoints=[NO (one time-point)] multiple_channels=[YES (all channels in one file)] _____multiple_illumination_directions=[NO (one illumination direction)] multiple_angles=[NO (one angle)] multiple_tiles=[YES (one file per tile)] image_file_directory=["+source+"] image_file_pattern=imcf-group-split_{xx}.vsi channels_=0,1,2,3 tiles_=01-03 calibration_type=[Same voxel-size for all views] calibration_definition=[Load voxel-size(s) from file(s)] imglib2_data_container=[ArrayImg (faster)]");

// fuse and save as tiff
run("Fuse dataset ...", "select=["+filename+"] process_angle=[All angles] process_channel=[All channels] process_illumination=[All illuminations] process_tile=[All tiles] process_timepoint=[All Timepoints] bounding_box=[All Views] downsampling=1 pixel_type=[16-bit unsigned integer] interpolation=[Linear Interpolation] image=[Precompute Image] interest_points_for_non_rigid=[-= Disable Non-Rigid =-] blend produce=[Each timepoint & channel] fused_image=[Save as (compressed) TIFF stacks] output_file_directory=["+source+"]. filename_addition=stitched");

// fuse and save as hdf5
run("Fuse dataset ...", "select=["+filename+"] process_angle=[All angles] process_channel=[All channels] process_illumination=[All illuminations] process_tile=[All tiles] process_timepoint=[All Timepoints] bounding_box=[All Views] downsampling=1 pixel_type=[16-bit unsigned integer] interpolation=[Linear Interpolation] image=[Precompute Image] interest_points_for_non_rigid=[-= Disable Non-Rigid =-] blend produce=[Each timepoint & channel] fused_image=[Save as new XML Project (HDF5)] timepoints_per_partition=1 setups_per_partition=0 use_deflate_compression export_path=["+outfile+"]");

saving as tiff works fine without issue, but saving as hdf5/xml fails with below error:

Exception in thread "CellCreatorThread 3" Exception in thread "CellCreatorThread 1" Exception in thread "CellCreatorThread 7" Exception in thread "CellCreatorThread 0" Exception in thread "CellCreatorThread 2" Exception in thread "CellCreatorThread 6" Exception in thread "CellCreatorThread 5" java.lang.ArrayIndexOutOfBoundsException: 2
	at net.imglib2.img.planar.PlanarRandomAccess.fwd(PlanarRandomAccess.java:116)
	at bdv.export.WriteSequenceToHdf5.downsampleBlock(WriteSequenceToHdf5.java:988)
	at bdv.export.WriteSequenceToHdf5.access$100(WriteSequenceToHdf5.java:101)
	at bdv.export.WriteSequenceToHdf5$1.run(WriteSequenceToHdf5.java:794)
	at bdv.export.WriteSequenceToHdf5$CellCreatorThread.run(WriteSequenceToHdf5.java:917)
Exception in thread "CellCreatorThread 4" java.lang.ArrayIndexOutOfBoundsException: 2
	at net.imglib2.img.planar.PlanarRandomAccess.fwd(PlanarRandomAccess.java:116)
	at bdv.export.WriteSequenceToHdf5.downsampleBlock(WriteSequenceToHdf5.java:988)
	at bdv.export.WriteSequenceToHdf5.access$100(WriteSequenceToHdf5.java:101)
	at bdv.export.WriteSequenceToHdf5$1.run(WriteSequenceToHdf5.java:794)
	at bdv.export.WriteSequenceToHdf5$CellCreatorThread.run(WriteSequenceToHdf5.java:917)
java.lang.ArrayIndexOutOfBoundsException: 2
	at net.imglib2.img.planar.PlanarRandomAccess.fwd(PlanarRandomAccess.java:116)
	at bdv.export.WriteSequenceToHdf5.downsampleBlock(WriteSequenceToHdf5.java:988)
	at bdv.export.WriteSequenceToHdf5.access$100(WriteSequenceToHdf5.java:101)
	at bdv.export.WriteSequenceToHdf5$1.run(WriteSequenceToHdf5.java:794)
	at bdv.export.WriteSequenceToHdf5$CellCreatorThread.run(WriteSequenceToHdf5.java:917)
java.lang.ArrayIndexOutOfBoundsException: 2
	at net.imglib2.img.planar.PlanarRandomAccess.fwd(PlanarRandomAccess.java:116)
	at bdv.export.WriteSequenceToHdf5.downsampleBlock(WriteSequenceToHdf5.java:988)
	at bdv.export.WriteSequenceToHdf5.access$100(WriteSequenceToHdf5.java:101)
	at bdv.export.WriteSequenceToHdf5$1.run(WriteSequenceToHdf5.java:794)
	at bdv.export.WriteSequenceToHdf5$CellCreatorThread.run(WriteSequenceToHdf5.java:917)
java.lang.ArrayIndexOutOfBoundsException: 2
	at net.imglib2.img.planar.PlanarRandomAccess.fwd(PlanarRandomAccess.java:116)
	at bdv.export.WriteSequenceToHdf5.downsampleBlock(WriteSequenceToHdf5.java:988)
	at bdv.export.WriteSequenceToHdf5.access$100(WriteSequenceToHdf5.java:101)
	at bdv.export.WriteSequenceToHdf5$1.run(WriteSequenceToHdf5.java:794)
	at bdv.export.WriteSequenceToHdf5$CellCreatorThread.run(WriteSequenceToHdf5.java:917)
java.lang.ArrayIndexOutOfBoundsException: 2
	at net.imglib2.img.planar.PlanarRandomAccess.fwd(PlanarRandomAccess.java:116)
	at bdv.export.WriteSequenceToHdf5.downsampleBlock(WriteSequenceToHdf5.java:988)
	at bdv.export.WriteSequenceToHdf5.access$100(WriteSequenceToHdf5.java:101)
	at bdv.export.WriteSequenceToHdf5$1.run(WriteSequenceToHdf5.java:794)
	at bdv.export.WriteSequenceToHdf5$CellCreatorThread.run(WriteSequenceToHdf5.java:917)
java.lang.ArrayIndexOutOfBoundsException: 2
	at net.imglib2.img.planar.PlanarRandomAccess.fwd(PlanarRandomAccess.java:116)
	at bdv.export.WriteSequenceToHdf5.downsampleBlock(WriteSequenceToHdf5.java:988)
	at bdv.export.WriteSequenceToHdf5.access$100(WriteSequenceToHdf5.java:101)
	at bdv.export.WriteSequenceToHdf5$1.run(WriteSequenceToHdf5.java:794)
	at bdv.export.WriteSequenceToHdf5$CellCreatorThread.run(WriteSequenceToHdf5.java:917)
java.lang.ArrayIndexOutOfBoundsException: 2
	at net.imglib2.img.planar.PlanarRandomAccess.fwd(PlanarRandomAccess.java:116)
	at bdv.export.WriteSequenceToHdf5.downsampleBlock(WriteSequenceToHdf5.java:988)
	at bdv.export.WriteSequenceToHdf5.access$100(WriteSequenceToHdf5.java:101)
	at bdv.export.WriteSequenceToHdf5$1.run(WriteSequenceToHdf5.java:794)
	at bdv.export.WriteSequenceToHdf5$CellCreatorThread.run(WriteSequenceToHdf5.java:917)

Thanks for your help and this awesome tool!

1 Like

Hello,

Doesn’t work for me when deconvoltion ends. Neither does showing the image in ImageJ…
I filed an issue here

While this gets worked out, I will see about going back to version 0.2.1. Thanks @CellKai for the thourough testing!

Oli

As an update to this, I now figured out that in my case fuse and save as hdf5/xml does work with the latest release of BigStitcher when using image=Cached instead of image=[Precompute Image].

Maybe this helps for troubleshooting. I will save my images with Cached for now :slight_smile:

Hi @hoerldavid

I just saw your recent activities on the forum concerning BigStitcher and was wondering if you might have an update for this issue as well.

BigStitcher fails to fuse and export a dataset as new hdf5/xml when image=[Precompute Image] is chosen as an option. I tried with small datasets on computers with plenty of RAM, so I think the issue must be somewhere else.

It works fine using image=Cached, but the fusion step takes a really long time this way and I was hoping that Precompute image would speed up the process.

Thank you for your help and the work on BigStitcher, its really an awesome tool!