Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Hadrien Mary
    @hadim
    Ideally we need a Jupyterlab/Notebook extension that get the image data from the kernel and display them with a nice JS widget.
    Kyle I S Harrington
    @kephale
    ^^^ seconded. that display code includes some dependencies that hopefully will get factored out of SJJK
    Curtis Rueden
    @ctrueden
    Argh mime types. I wrote some code that lets you pass your own LUTs, but it just ends up dumping base64-encoded data as a string. I tried leaving off that step and just returning the BufferedImage directly, but that also doesn't work
    #@ OpService ops
    
    import net.imglib2.converter.RealLUTConverter
    import net.imglib2.display.projector.composite.CompositeXYProjector
    import net.imglib2.display.screenimage.awt.ARGBScreenImage
    import net.imagej.notebook.ImageJNotebookService.ValueScaling
    import org.scijava.notebook.converter.NotebookConverters
    
    display = { source, luts, xAxis, yAxis, cAxis, scaling, pos ->
        image = ops.transform().zeroMinView(source)
    
        w = xAxis >= 0 ? (int) image.dimension(xAxis) : 1
        h = yAxis >= 0 ? (int) image.dimension(yAxis) : 1
        c = cAxis >= 0 ? (int) image.dimension(cAxis) : 1
        target = new ARGBScreenImage(w, h)
        converters = []
    
        full = scaling == ValueScaling.FULL ||
            scaling == ValueScaling.AUTO && isNarrowType(source);
    
        if (full) {
            // scale the intensities based on the full range of the type
            min = image.firstElement().getMinValue()
            max = image.firstElement().getMaxValue()
        } else {
            // scale the intensities based on the sample values
            ii = ops.transform().flatIterableView(source)
            minMax = ops.stats().minMax(ii)
            min = minMax.getA().getRealDouble()
            max = minMax.getB().getRealDouble()
        }
    
        for (int i = 0; i < c; i++) {
            converters.add(new RealLUTConverter(min, max, luts[i]))
        }
        proj = new CompositeXYProjector(image, target, converters, cAxis);
        if (pos != null && pos.length > 0) proj.setPosition(pos)
        proj.setComposite(true)
        proj.map()
    
        // Convert to PNG
        return NotebookConverters.toPNG(target.image())
    }
    
    import net.imglib2.img.array.ArrayImgs
    import net.imagej.display.ColorTables
    
    w = 256; h = 192
    bytes = new byte[w * h]
    for (y=0; y<h; y++) {
        for (x=0; x<w; x++) {
            bytes[y * w + x] = (x + y) & 0xff
        }
    }
    source = ArrayImgs.unsignedBytes(bytes, w, h, 1)
    luts = [ ColorTables.FIRE ]
    
    display(source, luts, 0, 1, 2, ValueScaling.FULL, [] as long[])
    The right thing to do is probably for ImageJNotebookService.display(Dataset) to extract the LUTs and pass those to a new RAIToPNG that accepts the LUTs. But we have to be careful with LUT indices. They correspond to Dataset plane indices which are nontrivial to reason about.
    I really need to work on SJC now, so I'll leave it there.
    Jan Eglinger
    @imagejan
    Thanks a lot, @ctrueden, that’s already of great help!
    matrixbot
    @matrixbot
    superusercode test
    superusercode Does ImageJ have an official IRC channel?
    Niko Ehrenfeuchter
    @ehrenfeu
    @matrixbot you kind of found it (although it's not IRC) - but note that this is primarily intended for developer's discussions, for help with using ImageJ the official ImageJ Forum is a much better location...
    If you're desperate for IRC you could try https://irc.gitter.im/ but note that it's officially beta
    matrixbot
    @matrixbot
    superusercode I'll just continue accessing through matrix then
    Jan Eglinger
    @imagejan
    ImageJ Logo.gif
    How about a new splash screen animation?
    Gabriel Einsdorf
    @gab1one
    oh cool
    Max Leiter
    @MaxLeiter
    ehrenfeu: fitter has an IRC gateway
    gitter*
    I use it and it works quite well
    Max Leiter
    @MaxLeiter
    oh, just saw ehrenfeu mentioned it
    Niko Ehrenfeuchter
    @ehrenfeu
    Never mind, good to hear there's a working solution. Haven't been on IRC any more for probably five years by now...
    Max Leiter
    @MaxLeiter
    huh, funny that matrix bot is matrix <=> gitter <=> IRC
    matrixbot
    @matrixbot
    superusercode That's exactly why I'm using it
    superusercode What client are you using?
    matrixbot
    @matrixbot
    superusercode also, if you want to use gitter through matrix, here the room https://riot.im/app/#/room/#ImageJ:matrix.org
    Hadrien Mary
    @hadim
    @bnorthan : Nice post on the forum. Can I suggest you to delete my branch? Now that build system has been integrated to master, it's not really useful. Also you should gitignore native/lib as it is supposed to be a temporary folder to store generated libraries before integration in platform dependant package.
    Curtis Rueden
    @ctrueden
    @imagejan I'm not sure why, but that animation makes me feel uneasy! Like being squashed in a factory. Maybe I've played too many video games where you are running around on conveyor belts dodging pistons.
    But in general I am all for animated splash screens. Especially once we switch to a Java-based launcher.
    Gabriel Einsdorf
    @gab1one
    Yes the animation looks a bit like a sheet of metal being hammered
    Brian Northan
    @bnorthan
    @hadim I'd like to keep your branch around for a while. It's much simpler, than master, and it does not require installing MKL to build it. I think it would be useful, if someone just wanted to try out the YacuDecu deconvolution, without having to worry about all the other stuff.
    Hadrien Mary
    @hadim
    Ok I get it.
    Curtis Rueden
    @ctrueden
    Maybe we should go multimodule on ops-experiments?
    Then you can have different explorations with different deps.
    Hadrien Mary
    @hadim
    Good idea and once something is stable and "easy to build" (at least on CI services) we can push it to a ops-deconvolution repo.
    Curtis Rueden
    @ctrueden
    :+1:
    Hadrien Mary
    @hadim
    @ctrueden do you know when you gonna release the next version of ops, 0.40.0? Trying to get rid of some RequireReproducibleBuilds errors since I am using SNAPSHOT deps.
    By the way I tried to use <enforcer.skip>true</enforcer.skip> but I still get the error.
    Putting <enforcer.skip>true</enforcer.skip> directly in the pom.xml works for now.
    amirffff
    @amirffff
    Hi everyone
    doese someone here at the momen?
    amirffff
    @amirffff
    does anyone know how can I get parameter from the users when I work one Jython ?
    Curtis Rueden
    @ctrueden
    @hadim Let's release a new version of Ops as soon as @gselzer's remaining PRs are merged. We are getting close. Maybe 1 week?
    Gotta fix the build on master, and then probably we can merge imagej/imagej-ops#542 (invert) and imagej/imagej-ops#535 (ridge detection). We can release 0.40.0 before tackling imagej/imagej-ops#526 (Hough transforms) though, since that one needs more work.
    NOTICE: The ImageJ server infrastructure will be going down within the next few minutes. Downtime should be short (less than 10 minutes).
    Hadrien Mary
    @hadim
    Awesome @ctrueden. Thanks for the information.
    Curtis Rueden
    @ctrueden
    Servers should all be back online; please ping if you notice otherwise.
    Jan Eglinger
    @imagejan
    @amirffff when you work within Fiji, you can use script parameters to get user input
    Stefan Helfrich
    @stelfrich
    @ctrueden It seems that the versioning scheme for Java will be officially fixed to $FEATURE.$INTERIM.$UPDATE.$PATCH starting with Java 10 (see http://openjdk.java.net/jeps/322)..
    Jean-Yves Tinevez
    @tinevez
    I cannot log on to the ImageJ wiki. I get this error message:
    There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Go back to the previous page, reload that page and then try again.
    Is it the same for you?
    Curtis Rueden
    @ctrueden
    @tinevez Are you using https or http?