Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    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
    Ulrik Günther
    @skalarproduktraum
    hey everyone! we currently have a strange issue with scifio
    [ERROR] Module threw exception
    java.lang.NullPointerException
        at io.scif.services.DefaultInitializeService.initializeReader(DefaultInitializeService.java:87)
        at io.scif.img.ImgOpener.createReader(ImgOpener.java:483)
        at io.scif.img.ImgOpener.openImgs(ImgOpener.java:242)
        at io.scif.services.DefaultDatasetIOService.open(DefaultDatasetIOService.java:152)
        at io.scif.services.DefaultDatasetIOService.open(DefaultDatasetIOService.java:133)
        at io.scif.services.DefaultDatasetIOService.open(DefaultDatasetIOService.java:138)
        at io.scif.convert.FileToDatasetConverter.convert(FileToDatasetConverter.java:66)
        at org.scijava.convert.AbstractConvertService.convert(AbstractConvertService.java:125)
        at org.scijava.convert.AbstractDelegateConverter.convert(AbstractDelegateConverter.java:53)
        at org.scijava.convert.AbstractConvertService.convert(AbstractConvertService.java:125)
        at org.scijava.module.DefaultModuleService.load(DefaultModuleService.java:316)
        at org.scijava.module.DefaultModuleService.loadInput(DefaultModuleService.java:544)
        at org.scijava.module.DefaultModuleService.lambda$loadInputs$1(DefaultModuleService.java:346)
        at java.util.ArrayList.forEach(ArrayList.java:1257)
        at java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1080)
        at org.scijava.module.DefaultModuleService.loadInputs(DefaultModuleService.java:346)
        at org.scijava.module.process.LoadInputsPreprocessor.process(LoadInputsPreprocessor.java:58)
        at org.scijava.module.ModuleRunner.preProcess(ModuleRunner.java:102)
        at org.scijava.module.ModuleRunner.run(ModuleRunner.java:154)
        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)
    this is triggered by using sciview's Isosurface command, https://github.com/scenerygraphics/sciview/blob/5a09273513df003b53457f99bb3b2a60d08b72c1/src/main/java/sc/iview/commands/process/Isosurface.java, with quite a large selection of TIFF files -- any ideas what could be the root cause there?
    Jan Eglinger
    @imagejan
    @skalarproduktraum it could be that SCIFIO/SciJava is too eagerly trying to convert a String into a Dataset with the new StringToDatasetConverter in SCIFIO. Can you try whether scifio/scifio#443 fixes your issue?
    (or FileToDatasetConverter actually, just read the stack trace in more detail)
    you might need to combine scifio/scifio#443 with scifio/scifio#444 and build yourself though...
    Deborah Schmidt
    @frauzufall
    @skalarproduktraum temporary workaround is to mark image parameters as persist = false in the command, then the preprocessor will skip them:
        @Parameter(persist = false)
        private IterableInterval<T> image;
    Ulrik Günther
    @skalarproduktraum
    @frauzufall sweet, i will try that right away, thank you!
    Ulrik Günther
    @skalarproduktraum
    okay that seems to work for me, time to let the users test :-D
    Jan Eglinger
    @imagejan
    @ctrueden @hinerm I’m stuck with a strange SCIFIO issue: scifio/scifio#453
    If you find a minute to give me pointers how to solve it, that would be great : )
    Curtis Rueden
    @ctrueden
    @imagejan I'll try to reproduce now.
    Curtis Rueden
    @ctrueden
    @imagejan Update so far: I was able to reproduce by running your Groovy script via --ij2 --headless --run. I was not yet able to reproduce using jgo to run the SCIFIO command line tool, not at the most recent release, nor the latest SCIFIO snapshot version. I think I'll start digging a bit in Eclipse. Once I have an idea what might be wrong, I'll update here again.
    Curtis Rueden
    @ctrueden
    Update 2: Problem happens when running with fiji 2.1.0 tag in Eclipse. This will make using the debugger simpler (no need for remote debugging).
    Curtis Rueden
    @ctrueden
    Update 3: In my local fiji/fiji working copy, I checked out tag fiji-2.1.0. Imported into Eclipse. Launched in debug mode. Loaded the MCVE script into the script editor. Back in Eclipse, navigated to FormatService, getFormat(Location) method. It's an interface, used ctrl+T to bring up implementations, navigated into DefaultFormatService, same method. Saw it delegates to another method, hit F3 to jump there, which led me to this code in scifio 0.41.0 (the version associated with fiji 2.1.0). Put a breakpoint there, ran the script in Fiji, and then back in Eclipse, I see that getFormatList returns null. Hit F8 to continue, then go back to Fiji and run the script again to trigger the breakpoint again. Rinse and repeat while stepping through the code with F5/F6/F7 to learn more about what's going wrong. I know this is a lot of detail, and that @imagejan probably doesn't need it, but I write it here for anyone wondering how we debug this stuff. The Script Editor + IDE combination is very powerful.
    It does help to have some prior knowledge—in this case I know that BioFormatsFormat is supposed to be the format handling STK files, so in the formats for loop, I'm digging in to that one first. Fortunately, it's the first one on the list right now. (If it weren't, you could use a conditional breakpoint to step straight to it by pressing F8.)