BigDataViewer multiple files in one View/XML

Dear all (probably:@tpietzsch),
together with @Christian_Tischer, we use BDV to display registered multi-modal image data.
I want to include multiple data sources in one Viewer. So far there is no possibility to open multiple XML/H5 files.

Ideally, I would want to generate a single XML file that contains all information on view setups/channels etc. from different files as image sources. Having multiple “SequenceDescriptions” which is the only possible tag besides the root SPIMData only returns the first element being displayed.

1 Like

Have you looked at this? These are functions which can combine several xml/hdf5 datasets:

However one restriction, as far as I understand, is that you need your datasets to use the xml/hdf5 image loader.

Maybe that’s sufficient for you ?

Actually I may need something similar but with more flexibility on the image loader. And the direction I wanted to go is to make a xml dataset which would link other xml datasets, a sort of ‘metadataset’ (or ‘uberdataset’ to avoid the metadata confusion). This would require:

  • to write a XmlIoUberDatasetBasicImgLoader which would contains the xml datasets
  • to write an ImageLoader which would redirect appropriately the setups id to the correct initial setup id

If that’s something people would be interested in, I’d be pleased to hear from them.




That would be absolutely awesome!


Hi all,

I am adding @joshmoore to this thread because this seems to overlap with a discussion I had with him about how to organise multiple (5D) images into a dataset. I think OME wants/has such a logic as well. So, whatever we do, it would be great to align it with OME efforts along those lines.

And I just discussed with @schorb and for him a simple UI element “Add to image to viewer” would do the job. Java implementation-wise this would be as simple as:

String path = getXMLImagePathFromUser();
SpimData spimData = new XmlIoSpimData().load( path); spimData, BdvOptions.options.addTo( existingBdv );`

I will write some code for him to have this functionality so that he can, via an UI, display multiple xml/hdf5 files on top of each other in BDV.


Thanks for the heads up. In general, :+1: for being able to locate individual stacks/datasets in container formats like HDF5 and N5/Zarr. There’s the inevitable usability issue of having a user first select a file/folder and then needing to select the internal Dataset (in HDF5-ese), but not doing so will limit the benefit we can get out of these formats.


Dear all, I’ve made a repo for bigdataviewer ‘uberdatasets’ which seems to work reasonably well. You can even put uberdatasets into uberdatasets. There are simple examples in the resource folder of the repo.

If you want to test it (and improve it ;-)), please do! I’ve put some current limitations I identified in the issues.

Regarding this point, I do not think this repo changes anything to the current state. It’s keeping the already existing logic of bigdataviewer xml datasets. It just provides a ‘simple’ way to merge several of them, mostly transparent.




Awesome! cc @schorb
Nico, could you post such an uberxml here to see how it looks like?
Meanwhile I implemented a simple command to open several xml at once:

Probably both approaches can be useful.

@NicoKiaru A related question: Do you know whether it is possible to specify the LUT to be used in the xml? If one opens many images it can be tedious to manually change the colours for all of them…

Hi Christian,

Your link looks broken ? Did you use BdvFunctions ? That’s very cool, and this is more straightforward indeed. One drawback I had is that it’s less compatible with some of the ‘big tools’ (BigStitcher notably). That’s the reason why I spend time on this…

In the repository resources, there are two small ‘xml/hdf5’ datasets, and the ‘uber’ one containing both being merged:

You’ll need the repo to open the uber one, because it needs its loader.

Yes, @tpietzsch explained to me that you can have an associated dataset.settings.xml for a dataset.xml file. If you keep this naming convention, BigDataViewer will apply these settings. There’s one such file actually in the repo for the merged dataset. It can be created by using the save settings button in the bdv window, after you have tediously changed the colors…

I noticed BigStitcher is settings color automatically for datasets. This could be useful to re-use… but I don’t know where it’s located.


Fixed the link. Yes.

1 Like