Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support BigDataViwer .xml file #8

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

hkmoon
Copy link

@hkmoon hkmoon commented Apr 13, 2016

This PR requires bdv.ij.BigDataViewerPlugIn's path handling that I made PR in bigdataviewer_fiji (bigdataviewer/bigdataviewer_fiji#4).

@StephanPreibisch
Copy link
Member

Hi @hkmoon Would it be possible to also support the MultiViewReconstruction Application if the version the XML is made for it?

@hkmoon
Copy link
Author

hkmoon commented Apr 13, 2016

Hi @StephanPreibisch,
Could you provide me an example xml of MultiViewReconstruction?
Then I will propose a way to distinguish opening plugins based on it.
Because I simply check <spimdata version in the xml content.
This is one of my test example file:

<?xml version="1.0" encoding="UTF-8"?>
<SpimData version="0.2">
  <BasePath type="relative">.</BasePath>
  <SequenceDescription>
    <ImageLoader format="bdv.hdf5">
      <hdf5 type="relative">spim_dataset.h5</hdf5>
      <partition>
        <path type="relative">spim_dataset-00-00.h5</path>
        <timepoints>0</timepoints>
        <setups>0</setups>
      </partition>
      <partition>
        <path type="relative">spim_dataset-01-00.h5</path>
        <timepoints>1</timepoints>
        <setups>0</setups>
      </partition>
      <partition>
        <path type="relative">spim_dataset-02-00.h5</path>
        <timepoints>2</timepoints>
        <setups>0</setups>
      </partition>
    </ImageLoader>
...

@StephanPreibisch
Copy link
Member

Hi @hkmoon

I would say if it also contains the following Strings

<Attributes name="illumination">
<Attributes name="channel">
<Attributes name="angle">

@tpietzsch what do you think?

Thanks a lot,
Stephan

@tpietzsch
Copy link
Member

@StephanPreibisch @hkmoon I would rather have that all BDV files open in BDV by default. We could have a Fiji setting where you can chose "Open BDV XML with ..."? There you could select "BigDataViewer", "MultiViewReconstruction", or "Ask me every time".

@hkmoon
You should also add to the comment
https://github.com/hkmoon/IO/blob/master/src/main/java/HandleExtraFileTypes.java#L241
to reflect the change

@tpietzsch
Copy link
Member

Or we could do it per file and have an explicit tag in the file itself and some UI to handle changing it.
If you open a file tagged for SpimReconstruction in BDV explicitly, it would then ask you "This file is tagged to open in SpimReconstruction by default. Do you want to always open this file with BDV? Yes; No; Don't ask me again" or something like that. Similar if you open a file without the tag in SpimReconstruction.

@StephanPreibisch
Copy link
Member

I agree, a specific tag would be good, I can add this to the XML if it is created with the Multiview Reconstruction. The rest we can manage from within our plugins then ...

So how about

<Application name="Multiview Reconstruction">

If it is not desired anymore, we can easily resave the XML without it

@ctrueden
Copy link
Member

If you open a file tagged for SpimReconstruction in BDV explicitly, it would then ask you "This file is tagged to open in SpimReconstruction by default. Do you want to always open this file with BDV? Yes; No; Don't ask me again" or something like that.

This is something that I really want to add to the SciJava Display framework: if multiple Display plugins are present for a module output, of the same priority, then the user is prompted which to use, with a "remember my choice" sort of checkbox, similar to how Android does it when multiple handlers are present. And an options screen somewhere to rejigger it as needed. It should really, really not be the responsibility of individual handlers to ever worry about this.

Along those lines, one of these days I will rewrite this here IO repository to use only SciJava I/O plugins, purging the ImageJ1 dependency, so that it becomes truly extensible, and benefits from the logic described above, once it exists...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants