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

Cannot open platy from i2k bucket #654

Closed
tischi opened this issue Mar 23, 2022 · 8 comments
Closed

Cannot open platy from i2k bucket #654

tischi opened this issue Mar 23, 2022 · 8 comments
Labels
bug Something isn't working

Comments

@tischi
Copy link
Contributor

tischi commented Mar 23, 2022

@constantinpape

[ Plugins › BigDataViewer › OME ZARR › Open OME ZARR From S3... ]

https://s3.embl.de/i2k-2020/platy-raw.ome.zarr

Gives me:

Caused by: java.lang.UnsupportedOperationException: Could not find multiscales at service endpoint: https://s3.embl.de; bucket: i2k-2020; container path: platy-raw.ome.zarr ; path: ; attribute: multiscales
	at org.embl.mobie.io.ome.zarr.loaders.N5OMEZarrImageLoader.getMultiscale(N5OMEZarrImageLoader.java:260)
	at org.embl.mobie.io.ome.zarr.loaders.N5OMEZarrImageLoader.initSetups(N5OMEZarrImageLoader.java:171)
	at org.embl.mobie.io.ome.zarr.loaders.N5OMEZarrImageLoader.fetchSequenceDescriptionAndViewRegistrations(N5OMEZarrImageLoader.java:126)

Can you open it?

@tischi tischi added the bug Something isn't working label Mar 23, 2022
@constantinpape
Copy link
Contributor

Yes, I can open it: (Somehow the default brightness is weird but otherwise it looks good)
image
image
This is with the latest MoBIE from the main update site.

@tischi
Copy link
Contributor Author

tischi commented Mar 23, 2022

Hm, weird, this does not work for me within IntelliJ, neither from the main nor the develop branch.

@K-Meech @KateMoreva could you also give this a try?

@K-Meech
Copy link
Contributor

K-Meech commented Mar 23, 2022

@tischi - I can open it on the current develop branch (with the same weird contrast @constantinpape sees)
Have you tried doing a mvn clean install?

@tischi
Copy link
Contributor Author

tischi commented Mar 23, 2022

Wow! I tried everything, also deleted the local maven cache and then I finally found what the issue was!

Can you see it? 😉

image

@tischi
Copy link
Contributor Author

tischi commented Mar 23, 2022

I think I found out why we have the weird contrast. I made another issue: mobie/mobie-io#88
The data is loaded two times
image

@tischi
Copy link
Contributor Author

tischi commented Mar 23, 2022

Hard to see, in fact, I had a white space at the end of the URL.

Google tells me the URL are not allowed to contain spaces, thus what about adding below line of code?

public class OpenOMEZARRFromS3Command implements Command {

    @Parameter(label = "S3 URL")
    public String s3URL = "https://s3.embl.de/i2k-2020/em-raw.ome.zarr";

    @Parameter ( label = "Log chunk loading" )
    public boolean logChunkLoading = false;

    protected static void openAndShow(String s3URL) throws IOException {
        s3URL = s3URL.replaceAll( "\\s", "" ); // HERE
        SpimData spimData = OMEZarrS3Opener.readURL(s3URL);
        final OMEZarrViewer viewer = new OMEZarrViewer(spimData);
        viewer.show();
    }

Or do we want to have this even deeper in the code, e.g. inside OMEZarrS3Opener.readURL or even deeper? Maybe implementing some general cleanUpURL() function that we always call?

@K-Meech
Copy link
Contributor

K-Meech commented Mar 23, 2022

Sounds good! If whitespaces aren't allowed in URL, then it makes sense to put it deeper inside OmeZarrS3Opener.readURL, then we don't have to put it after lots of different dialog boxes. It'd be great if it would get called for opening N5 from the S3 too.

@constantinpape
Copy link
Contributor

I have fixed the issue with the multiple datasets and the contrast is correct now. Note that there is another small issue with this data due to missing translation in the transformations: mobie/mobie-utils-python#48.
I will look into fixing this, but probably don't have time for it this week (and it's not such a major issue for now; once I fixed it I will replace the metadata).

Or do we want to have this even deeper in the code, e.g. inside OMEZarrS3Opener.readURL or even deeper? Maybe implementing some general cleanUpURL() function that we always call?

I think adding a general function to do this is a good idea; but I would not integrate it too deep in the code and rather call it in the classes implementing the UI commands directly.
I don't think that changing the strings deep in the code is a good idea since it might obfuscate different errors.

tischi added a commit that referenced this issue Mar 23, 2022
@tischi tischi closed this as completed Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants