Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Gabriel Selzer
    @gselzer
    What's the best way to get an ImageDisplay from a RAI? new DefaultImageDisplay() then display(<my rai>)?
    Is there a Converter to do this? If not, is there a reason why?
    Jan Eglinger
    @imagejan
    hm, DisplayService#createDisplay(RAI)?
    Gabriel Selzer
    @gselzer
    Oh, how did I miss that? Thanks @imagejan.
    Still, I'm surprised there's no Converter for it...
    1 reply
    Edward Evans
    @elevans

    @ctrueden I'm working on some of those low hanger fruit image conversion functions in imagej-common. When I run mvn the ImgLabelingConversionTest test incorrectly grabs the RAIToDatasetConverter.class we wrote instead of ImgLabelingToImgConverter.

    Here's the output:

    [INFO] Results:
    [INFO] 
    [ERROR] Failures: 
    [ERROR]   ImgLabelingConversionTest.testImgLabelingToImgConversion:81 expected:<class net.imagej.convert.ImgLabelingToImgConverter> but was:<class net.imagej.convert.RAIToDatasetConverter>
    [ERROR] Errors: 
    [ERROR]   ImgLabelingConversionTest.testTwoWayConversion:92 » IllegalArgument Only RealT...
    [INFO] 
    [ERROR] Tests run: 293, Failures: 1, Errors: 1, Skipped: 0

    Here is the line that fails in the test

    assertEquals(ImgLabelingToImgConverter.class, convertService.getHandler(labeling, Img.class).getClass());

    I'm guessing convertService.getHandler() is returning the wrong class because the RAIToDatasetConverter is vague enough that ImgLabeling is caught. Its not obvious to me...how do I limit the scope to avoid this?

    Curtis Rueden
    @ctrueden
    @elevans Heh, yeah, that's a funny problem! I guess ImgLabeling implements RandomAccessibleInterval, no?
    Edward Evans
    @elevans
    haha yes it does
    Curtis Rueden
    @ctrueden
    And of course, Dataset implements Img... so if you have an ImgLabeling, to the system, it looks like that converter will be able to turn it into a Dataset, which is an Img, so... it gets selected! :+1:
    But really, the RAIToDatasetConverter doesn't work unless the RAI in question has RealType samples.
    So, we'll need to add some additional constraint to check for that, I think.
    Edward Evans
    @elevans
    Cool! makes sense :)
    Curtis Rueden
    @ctrueden
    Unfortunately, the Converter plugin framework does not support generic typing. And doing so would complexify it a lot.
    For this reason, IIRC, we deprecated the functions that ask "can I convert from Class X to Class Y?" because, just from the class, you might not actually be able to answer the question.
    We need an actual instance of the class in order to check it.
    But... some places deep in the framework might still use the deprecated "Class X to Class Y" methods.
    So, potential for bugs here is higher.
    Edward Evans
    @elevans
    This fruit is starting to seem a little higher on the tree haha
    Curtis Rueden
    @ctrueden
    Nah, fortunately, you can at least try to fix it quickly for this one, because the method you implemented is convert(Object, Class), right, so you can check the object in there whether it has a supported sample type.
    The only tricky bit is that I guess we need to also override some supports or canConvert method.
    Edward Evans
    @elevans
    yeah i saw some of the other converts use canConvert
    I'll use one of them as a guide and override the supports & canConvert method.
    Curtis Rueden
    @ctrueden
    Try adding this:
        @Override
        public boolean canConvert(final Object src, final Type dest) {
            if (!hasCompatibleType(src)) return false;
            return super.canConvert(src, dest);
        }
    
        @Override
        public boolean canConvert(final Object src, final Class<?> dest) {
            if (!hasCompatibleType(src)) return false;
            return super.canConvert(src, dest);
        }
    And then you'll have to implement hasCompatibleType(Object). net.imglib2.util.Util.getTypeFromInterval((RandomAccessibleInterval) src) is your friend here.
    Edward Evans
    @elevans
    :thumbsup:
    Curtis Rueden
    @ctrueden
    Oh, hey, there is one other thing you can do here, which is easy: you can set a priority to Priority.LOW in the @Plugin annotation, for the plugin you want to be less aggressive.
    Gabriel Selzer
    @gselzer
    Heh, maybe we can annotate the converters as Ops in SJ3. Then you could choose whether you want that type reasoning
    Curtis Rueden
    @ctrueden
    • Today I got net.imagej:ij:1.53k through net.imagej:ij:1.53p deployed to OSS Sonatype. Yay!
    • The ImageJ project also has a README on GitHub now, a POM file for building with Maven, unit tests (though some of them do not currently pass), and Ant targets for running those tests. The ImageJ repository on GitHub also now has tags for all the old versions back to v1.20.
    • The GitHub Actions CI now builds ImageJ at version 1.x-SNAPSHOT whenever it changes, which is always accessible from maven.scijava.org and should be equivalent to the latest daily build.
    • Tomorrow, I will finish teaching the CI to deploy release versions of net.imagej:ij to OSS Sonatype automatically, so it doesn't fall behind again.
    Niko Ehrenfeuchter
    @ehrenfeu
    :heart: :clap:
    dfperrault
    @dfperrault
    I am having problems installing Image/Fiji on my raspberry pi. Does anyone have any experience?
    1 reply
    Gabriel Selzer
    @gselzer
    @dfperrault that would be a good question to ask on forum.image.sc (if it hasn't been asked already :sweat_smile:)
    A quick search for 'raspberry pi' shows many different results
    dfperrault
    @dfperrault
    Thanks!
    Gabriel Selzer
    @gselzer
    :+1:
    Mallow24
    @Mallow24
    Hello everyone I am sorry I am really a beginner in using Image but I would have a question about the timestamp in imageJ i would like to plot the %area vs the time in order to analyze cell migration.
    I also created a macro code but I am not able to include the known time interval and starting time. Maybe you have time to help me thank you in andvanced! :)
    Gabriel Selzer
    @gselzer
    @Mallow24 this would be a great question for the image.sc forum
    Sonia Jain
    @soniajain1:matrix.org
    [m]
    Hello all. I need to count nuclei and gamma H2AX foci inside nuclei. I have about 120 images to do so. I would highly appreciate a faster method which can be applied to all the images reliably. Please help. It would save a lot of my time, and analysis can be done in unbiased and timely manner.
    I used analyze particles to count nuclei and find maxima to get foci inside nuclei. But how to apply this to all the images, I need to learn?
    Ellen TA Dobson
    @etadobson
    @soniajain1:matrix.org The best place for you to get this type of image analysis help is on the image.sc forum - post your question there. And include a sample image - as well as the exact steps you've tried thus far... We can help you get started with scripting to batch process your images.
    Curtis Rueden
    @ctrueden
    There is some dormant code on the imagej.net front page for a plugin highlight carousel, lifted from the fiji.sc Bootstrap site. I could get it working, but I'm wondering: do y'all think it would be nice to have a plugin carousel on imagej.net, with a broader community-driven set of highlighted plugins? And if so, should it live on imagej.net front page, or imagej.net/plugins, or imagej.net/list-of-extensions, or...? Or should we not bother? Opinions?
    Curtis Rueden
    @ctrueden
    Maybe I should just ask this question on the Image.sc Forum.
    Matthias Arzt
    @maarzt

    Hello everyone, I'm a member of the tomancak lab now. Since one and a halve weeks now!

    @ctrueden / @hinerm Could you please create a new update site https://sites.imagej.net/TomancakLab/ and give access rights to me "Maarzt" and @xulman "xulman"

    2 replies
    Vladimír Ulman
    @xulman
    (yes, pls... and thanks)
    Jean-Yves Tinevez
    @tinevez
    (Congratulations guys!)
    I think this belongs here? Is the radius in pixels?
    Michael Doube
    @mdoube
    Some users and I have run into a problem calling BoneJ's ImageJ2-style 'wrapper' plugins from ImageJ macros in batch mode setBatchMode(true): the output images are never created or made available to the user in a way they can be readily accessed in macro code. My guess is that the output parameter processing is not occurring, or is occurring but the data are not 'presented' in a macro accessible way. In a batch mode macro images can normally be accessed with selectImage(), but no images are available to be selected. Macros run fine with setBatchMode(false).
    One workaround is to use Python instead:
    Michael Doube
    @mdoube
    wrapper = commandService.run("org.bonej.wrapperPlugins.ThicknessWrapper",False,["inputImage", input_image_ij1, "showMaps", True, "maskArtefacts", True])
    wrapperInstance = wrapper.get()
    trabecular_map = wrapperInstance.getOutput("trabecularMap");
    Is this a known / intended behaviour? Or a side effect of mixing IJ1 and IJ2 worlds that is unlikely to be fixed?