bigdataviewer/bigdataviewer-playground

Save source Metadata

Closed this issue · 6 comments

Hi,

I can save a source as BDV H5-XML once modified in BDV-PG (transformation etc.)
When the original source is already in h5, I found no option of only saving the modified XML.

Also, it would be amazing if the generated XML would also contain the Displaysettings of that source of the current BDV window.

Run "Save BDV Dataset" then select the node of the xml dataset, choose a xml file (new or override the old one). This should work, also with the display settings. Clearly that's not intuitive. Let me know!

Ok, that's it, Thanks.

I noticed that in the ImageLoader, the relative file gets an extra ..\ added when saving the XML like this. For me, this did not create a problem, but I guess when not working with Windows the backslash might screw up things.

Hmm , ah, can you post here an example xml file ? I'll check whether I get the same pattern

Hi,

here's the files. One simple BDV export and the same XML but saved in playground.

export.zip

Aah,

when I manually remove the ..\ it crashes, because it wants to open the data from within the h5...

[ERROR] Module threw exception
ncsa.hdf.hdf5lib.exceptions.HDF5FileNotFoundException: Path does not exit. (B:\common\MandyViola_Ketting-Schreier\publication\final\grid4\forBDV\tomo_2.xml\tomo_2.h5)
	at ch.systemsx.cisd.hdf5.HDF5BaseReader.openFile(HDF5BaseReader.java:194)
	at ch.systemsx.cisd.hdf5.HDF5BaseReader.<init>(HDF5BaseReader.java:147)
	at ch.systemsx.cisd.hdf5.HDF5BaseReader.<init>(HDF5BaseReader.java:126)
	at ch.systemsx.cisd.hdf5.HDF5ReaderConfigurator.reader(HDF5ReaderConfigurator.java:86)
	at ch.systemsx.cisd.hdf5.HDF5FactoryProvider$HDF5Factory.openForReading(HDF5FactoryProvider.java:54)
	at ch.systemsx.cisd.hdf5.HDF5Factory.openForReading(HDF5Factory.java:55)
	at bdv.img.hdf5.Hdf5ImageLoader.open(Hdf5ImageLoader.java:173)
	at bdv.img.hdf5.Hdf5ImageLoader.<init>(Hdf5ImageLoader.java:158)
	at bdv.img.hdf5.Hdf5ImageLoader.<init>(Hdf5ImageLoader.java:144)
	at bdv.img.hdf5.Hdf5ImageLoader.<init>(Hdf5ImageLoader.java:139)
	at bdv.img.hdf5.XmlIoHdf5ImageLoader.fromXml(XmlIoHdf5ImageLoader.java:70)
	at bdv.img.hdf5.XmlIoHdf5ImageLoader.fromXml(XmlIoHdf5ImageLoader.java:49)
	at mpicbg.spim.data.generic.sequence.XmlIoAbstractSequenceDescription.fromXml(XmlIoAbstractSequenceDescription.java:111)
	at mpicbg.spim.data.generic.XmlIoAbstractSpimData.fromXml(XmlIoAbstractSpimData.java:153)
	at mpicbg.spim.data.generic.XmlIoAbstractSpimData.load(XmlIoAbstractSpimData.java:95)
	at sc.fiji.bdvpg.spimdata.importer.SpimDataFromXmlImporter.apply(SpimDataFromXmlImporter.java:67)
	at sc.fiji.bdvpg.spimdata.importer.SpimDataFromXmlImporter.get(SpimDataFromXmlImporter.java:60)
	at sc.fiji.bdvpg.scijava.command.spimdata.MultipleSpimDataImporterCommand.run(MultipleSpimDataImporterCommand.java:59)
	at org.scijava.command.CommandModule.run(CommandModule.java:196)
	at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:124)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:63)
	at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:225)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

I assume it's because you also set the

<BasePath type="relative">.</BasePath>

from being . to the data file.

I think this was fixed, but I don't remember when and the commit (most useless message ever)