-
Notifications
You must be signed in to change notification settings - Fork 20
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
Improve dummy data when opening mastodon project with missing images (Issue 206) #210
Conversation
@maarzt this pull request is in draft mode for now. please test it. |
Good idea. Applied suggested changes in a further commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I very much like how well this works. I think it's a big improvement in terms of user experience.
There are still some things that I would like to improve. The code for opening a mastodon project is already quite complex, and would like to avoid increasing the complexity. Could you do the requested changes. I would afterwards continue, try to refactor some stuff.
src/main/java/org/mastodon/mamut/launcher/MastodonLauncher.java
Outdated
Show resolved
Hide resolved
src/main/java/org/mastodon/views/bdv/SharedBigDataViewerData.java
Outdated
Show resolved
Hide resolved
@stefanhahmann Please write a few sentences, how opening the spim data XML works, if the HDF5 data is missing. |
Hello @stefanhahmann @maarzt I am only catching up now. I think that this PR may be duplicating work already done, by @xulman The beta-26 can deal with missing BDV data but improperly. For instance the number of time-points is not detected correctly and the dummy data implemented with Vlado seems not to work in full (you need to resave the file for the dummy to work). Maybe you want to test Vlado solution? In Fiji, open Mastodon making sure we use the beta-26. We need the Fiji version, because it has the mastodon-tomancak artifact that contains the file path editor of Vlado. Open a Mastodon file that points to a missing XML BDV file. Mastodon will warn that it cannot find the associated bdv file. Please tell us what you think. |
Hello @tinevez, We are well aware of the work done so far be @xulman. This PR continues where this previous work stopped. The goal is to simplify the user interaction. It is no longer required to re-save the Mastodon project and users don't need to enter information like pixel-size etc. I would also like to move the code in mastodon-tomancak over to the main repository. As it would make the mastodon git repository more self contained. The PR might fix the problems with the dataset that starts at frame 400. Could you maybe give this a try? Bests, Matthias |
Yes ok! |
As discussed: No changes on the spim data XML are necessary (initially, I thought, they would be necessary, but in fact it turned out that they weren't). The process works now more or less as described in the acceptance criteria of #206 |
43f5006
to
9f40f74
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made some commits to consider your review comments.
Could you please review again?
src/main/java/org/mastodon/mamut/launcher/MastodonLauncher.java
Outdated
Show resolved
Hide resolved
src/main/java/org/mastodon/views/bdv/SharedBigDataViewerData.java
Outdated
Show resolved
Hide resolved
9d9db64
to
2037903
Compare
…able * In case of no image data available the user may decide, if he wants to load the project anyway to inspect the meta data / cell lineages or if he does not want to open the project at all * When projects are saved, a copy the spim data xml is saved within the project
Windows, Linux & MacOS use different slashes in file paths. Windows uses backward slashes, Linux & MacOS use forward slashes. If a Mastodon project is saved on Windows, the project.xml will have a dataset path with backward slashes like: ..\dataset.xml. On Linux this path is not interpreted correctly. We need to manually replace the backward slashes with forward slashes. This commit moves the code that replaces the slashes into the class MamutProjectIO. This makes a lot of sense, as the backward slashes are introduced when reading the project.xml.
Hi @tinevez, Let me summarize this PR for you, such that you have an easier time reviewing it. The goal of the PR is to streamline opening a Mastodon project, when the image data is missing. The changes will make it a lot easier to open a Mastodon project that one just got send via email, where image data is missing as usual... The current version of Mastodon, can be started if the image data is missing. But it only starts with partly functional dummy data. In this state, only the first ten time-points of the trackscheme are visible and a new BDV window is zoomed suboptimally, since the image size incorrect. The user needs to click "File > Fix Image Path", resave and restart Mastodon in order to conveniently inspect the data. This PR improves this situation very much. The main idea is to save a copy of the spim data XML within the Mastodon project. This backup file is called "dataset.xml.backup". If now a Mastodon project is opened and the primary image data is missing, Mastodon can read the "dataset.xml.backup" file to initialize dummy image data with the correct number of time points, image sizes and even affine image transformations. The TrackScheme and BDV windows work as expected with the now correct dummy image data. The PR also improves the dialog that tells the user about the problem loading the image data. The dialog now tells the user what went wrong. And there is also a convenient "cancel" button. Here is an overview of the changes made in the code:
Bests, |
Hello all. High quality code! |
Resolves #206