Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Curtis Rueden
    @ctrueden
    There is no mapping functionality anymore; it's not necessary.
    You just make the Location you want, and then open it (for reading or writing) with the DataHandleService.
    For byte arrays, create a BytesLocation. No need for mapFile or mapId or any of that hacky stuff.
    Deborah Schmidt
    @frauzufall
    Thanks @ctrueden, I'll give it a try
    Jan Eglinger
    @imagejan
    @frauzufall @ctrueden it seems the new scifio served by the latest update is lacking the FormatService.getFormat(String) method in favor of the DataHandle-based methods. I didn't notice so far, but have a script using that method. I can update my script of course, but I guess we should also bring back that method signature (deprecated) for backwards compatibility, no?
    Deborah Schmidt
    @frauzufall
    Agreed. I wanted to also make the FilePatternService backwards compatible, but I didn't do it :(
    Jan Eglinger
    @imagejan
    I can also look at it when I find the time later this week.
    Jon Fuller
    @jfkotw
    Hi there. I'm trying to write a unit test to help get to the bottom of: scifio/scifio#399
    I can reproduce the originally described issue using a publicly available 3.5Mb image. I can also show the 'hanging' issue that Manuel describes at the bottom of the ticket (when using scifio 0.4.0 or 0.4.1). I spent a bit of time trying to use the image generation (fake) images to reproduce the issue, but I'm not familiar with the API yet, so got a bit stuck. So... would it be OK to submit a unit test using the 'real' image, or could someone point me to some documentation or an example for creating a composite channel example image?
    Curtis Rueden
    @ctrueden
    @jfkotw Any test is better than no test. :-)
    If you make a working illustration, we can look into: A) changing it to use a testimg instead if possible; and failing that B) if Manuel is OK with releasing the image into the public domain, adding it to the https://scif.io/images collection, which we use for unit tests already.
    The unit tests download and cache the images locally, so that it's only slow to run them the first time.
    Jon Fuller
    @jfkotw
    Fantastic. Thanks for the quick response. The image in question is already published here under Creative Commons Attribution 4.0 International License, so I guess it is easily possible to add that the scif.io/images (is that something I can do myself?)
    I will prepare a PR with the unit test today.
    Curtis Rueden
    @ctrueden
    @jfkotw You can do most of it yourself: edits need to happen to this index.html file including adding an appropriately sized thumbnail to that images folder. The data itself is served from samples.scif.io which is not hosted on GitHub Pages, because some of the samples are too large for GitHub. I can put the image in place in response to your PR. Coincidentally, I'm working on the SCIFIO samples page today anyway, adding some FLIM image data. I will also look into adding a "License" column to clarify the license of each image, since it will no longer be CC0/PD for everything anymore.
    Jon Fuller
    @jfkotw
    Thanks Curtis. Two PRs now created. New to this, so just let me know if you need any changes or additional information.
    Curtis Rueden
    @ctrueden
    @jfkotw The update to the SCIFIO sample images is merged. I'll work on the other PR tomorrow. Thanks for your patience.
    Deborah Schmidt
    @frauzufall
    Still trying to fix imagej-server - with the new Location API, how does one handle an InputStream? I can't figure out a way to wrap it with a Location, which I would need to call datasetIOService.open(..). Differently formulated - how to use SCIFIO to open an image from an InputStream?
    Deborah Schmidt
    @frauzufall
    correction - how to use SCIFIO to open an image with a filename + InputStream (filename to guess the reader)
    Deborah Schmidt
    @frauzufall
    ok, I can create a BytesHandle from the InputStream and then call datasetIOService.open(bytesHandle.get()). Let's see if that works. It was, for text files, using the IOService though, which does not have a method for open(Location)...
    Jan Eglinger
    @imagejan
    @frauzufall are you saying that SCIFIO's DatasetIOService is falling back to using SciJava's IOService for text files? That's surprising.
    Or is it imagej-server using IOService (that only forwards to DatasetIOService in case of images)?
    Deborah Schmidt
    @frauzufall
    it's using both
    Jan Eglinger
    @imagejan
    ah, ok.
    Jan Eglinger
    @imagejan
    IOService API should be improved to support open(Location) as well, no? (Since Location and DataHandle are in scijava-common anyways...)
    Deborah Schmidt
    @frauzufall
    yes, and the TableIOPlugin also doesn't have it yet
    Jan Eglinger
    @imagejan
    :-/
    it's all too new :slight_smile:
    Deborah Schmidt
    @frauzufall
    it's just an issue because imagej-server won't work until this is all done..
    Jan Eglinger
    @imagejan
    Is it an option to undo all the commits in SCIFIO that removed the API (such as scifio/scifio@487544d), to keep backwards compatibility for a while?
    Or should we rather update everything quickly to use the new API?
    Deborah Schmidt
    @frauzufall
    I'd rather try to move forward, I haven't fully grasped how to utilize the Location but I would like to (e.g. for the deep learning stuff to read models from URL) so I am somewhat motivated to rather work on understanding and using it than having to spend time to readd deprecated stuff. But I'm not sure how much work it is in total.
    image.png
    since the IOPlugin can't implement both HandlerPlugin types, we have to decide for one main one? Does this have more implications? The only difference I see is that boolean supports(final String descriptor) is then an Override method and boolean supports(final Location descriptor) would not be one
    Jan Eglinger
    @imagejan
    Can't we make a FileLocation for each String in IOService.open, and then only ask for HandlerPlugin<Location> at runtime?
    Deborah Schmidt
    @frauzufall
    yes, that sounds better
    Jan Eglinger
    @imagejan
    And probably fall back to using available HandlerPlugin<String>s for backwards compatibility...
    which would (temporarily) result in the open(String) method supporting more data types than the open(Location) method, until all IOPlugins have adapted to the new API.
    Deborah Schmidt
    @frauzufall
    If I create a FileLocation for String in IOService.open, that works, but it will not make use of the locationService.resolve method to support Strings which are not local file paths. In order to use this, the method would have to be able to throw an exception.. I think it would be great to add this and finally get a way to catch if saving or loading fails. This is all not backwards compatible though.
    Ok, that's not true, the exception could also be catched inside of IOService.open, but can someone remind me again why it is not throwing exceptions in general so far?
    Curtis Rueden
    @ctrueden
    @hinerm Was talking with @frauzufall on Friday about SCIFIO overwrite behavior changes. It would be good to have a short conversation between the three of us to settle once and for all how we want to handle SCIFIO writers when the destination already exists.
    @frauzufall Yes, that's why I didn't update IOPlugin to use the location API. I actually did do that work; it's on the sjc3 branch IIRC.
    But it can't be merged to sjc2 mainline without breaking backwards compatibility.
    We might be able to change it to implement HandlerPlugin<Location> instead, but then also leave the old String-based methods. It should be both source and binary backward compatible! But we'd need to test it.
    Deborah Schmidt
    @frauzufall
    @ctrueden ah cool that this already exists! what does sjc2 mainline mean?
    ah got it :sweat_smile:
    Curtis Rueden
    @ctrueden
    More than six years ago now... 🤯
    Deborah Schmidt
    @frauzufall
    wow
    Deborah Schmidt
    @frauzufall
    I tried to work with this commit, in case someone has time let me know what you think: scijava/scijava-common#395