by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    tpietzsch
    @tpietzsch
    then bilinear interpolation will give you original voxels (0,0,0), (1,0,0), ..., (1,1,1) in equal proportions
    which gives you what you want
    there is also some explicit averaging of voxel blocks somewhere in bigdataviewer-core (for exporting mipmap levels)
    Curtis Rueden
    @ctrueden
    @tischi Why not simply transform.scaleView op? Am I missing something?
    Christian "Tischi" Tischer
    @tischi
    @tpietzsch:
    (i) where shall I add the translation: into the scalingTransform3D?
    (ii) does this also work for other factors than 0.5, e.g. 0.25 where it would have to average over 4 pixels in each dimension? Or does it always only see the nearest neighbors?
    Christian "Tischi" Tischer
    @tischi
    @ctrueden: Thanks for the hint! But I'd really like to learnathon imglib2!
    Christian "Tischi" Tischer
    @tischi
    @ctrueden, @tpietzsch I had a look at the code for the scaleView op and, to me, it looks pretty much like my code: https://github.com/imagej/imagej-ops/blob/master/src/main/java/net/imagej/ops/transform/scaleView/DefaultScaleView.java#L84
    In particular, the shifting away from integer pixel coordinates is also missing. Does that mean that the scaleView op in its current implementation would maybe a also rather do sub-sampling than averaging?
    Curtis Rueden
    @ctrueden
    @tischi Sure. But why not read the source code of transform.scaleView to see how it does it using ImgLib2?
    Oh, right, that's what you just said above. OK, great.
    I defer to @tpietzsch on whether he would recommend changes to the op along the lines of those discussed above.
    @tischi Have you had a chance to try the revamped single instance listener CLI flags yet?
    Vladimír Ulman
    @xulman
    @tischi, regarding iii), you can have a look into ops/geom/geom3d...
    one would need to convert your binary mask into a mesh (with MarchingCubes) and then query its geom. parameters... the folder essentially list available options
    tpietzsch
    @tpietzsch
    @tischi @ctrueden it only works for averaging over 2 pixels in each dimension
    it is simply bilinear interpolation
    shifting by 0.25 in each dim would mix neighbors by factor 0.25 and 0.75 respectively
    Whether the op should change depends on what it is supposed to do
    As it is, it would with scale factor 0.5 and Nlinear interpolator factor just pick every second pixel (i.e., no bilinear interpolation happening really)
    tpietzsch
    @tpietzsch
    However, I would not shift by 0.5 here.
    This only works for factor 0.5, by accident so to say.
    in the op you could pick scale 1.3 etc
    Curtis Rueden
    @ctrueden
    @tpietzsch Thanks, that makes sense. As for what the op is supposed to do: I don't think it is thoroughly formalized (yet). My weak preference is to keep it simple here and not do any translation. But we ought to document what will happen to the min/offset of the input image.
    tpietzsch
    @tpietzsch
    The way to improve the quality of the results would be implementing a better InterpolatorFactory
    Curtis Rueden
    @ctrueden
    *nod*
    Christian "Tischi" Tischer
    @tischi
    @ctrueden Regarding the single instance listeners: should it work after updating Fiji? I have an up-to-date Fiji and it throws: [WARNING] Ignoring invalid argument: --force-single-instance
    Curtis Rueden
    @ctrueden
    @tischi Did you put it to the right of a -- separator argument, as I described?
    The launcher is unfortunately a bit stupid about which arguments belong to the JVM itself vs. main methods.
    Christian "Tischi" Tischer
    @tischi

    ...just to make sure I have the latest Fiji:
    /Applications/Fiji.app/Contents/MacOS/ImageJ-macosx --update update
    ...and I just copy and pasted your code:
    /Applications/Fiji.app/Contents/MacOS/ImageJ-macosx -Dscijava.log.level:net.imagej.legacy=debug --force-single-instance -port2 --ij2 --open /Users/tischer/Desktop/blobs.tif

    [WARNING] Ignoring invalid argument: -Dscijava.log.level:net.imagej.legacy=debug [WARNING] Ignoring invalid argument: --force-single-instance [ERROR] Skipping unsupported option -port2

    btw: what does the port* do?
    Curtis Rueden
    @ctrueden
    Agh, did I leave it off? Shoot.
    Contents/Home/ImageJ-macosx -Dscijava.log.level:net.imagej.legacy=debug -- --force-single-instance -port2 --ij2 --open ~/Desktop/General_EduRes_Heart_BloodVessels_0.jpg
    Note the -- standalone argument after the debug arg.
    Your line above does not have that -- standalone argument, which is what causes your trouble.
    The -- says "everything before this is for the JVM, and everything after it is for the Java main method."
    Think of the "port" as a channel... my understanding is that if you launch ImageJ with, say, port2, then launch another ImageJ also with port2, it will find the running ImageJ on that same "port" and hand off the args.
    Christian "Tischi" Tischer
    @tischi

    /Applications/Fiji.app/Contents/MacOS/ImageJ-macosx -Dscijava.log.level:net.imagej.legacy=debug -- --force-single-instance -port2 --ij2 --open /Users/tischer/Desktop/blobs.tif

    [DEBUG] Found 952 legacy plugins. [WARNING] Ignoring invalid argument: --force-single-instance [ERROR] Skipping unsupported option -port2

    Curtis Rueden
    @ctrueden
    In this way, you can have multiple "single instance" ImageJ instances running simultaneously, and hand to whichever you wish, via the correct "port".
    But they cannot literally be web ports, because 2, 3, 4, 5, 6, 7 are not valid.
    Christian "Tischi" Tischer
    @tischi
    ok. I did not spot the first -- but it still does not seem to work. I also can't see the options when I do ImageJ-macosx --help
    Do I maybe have to download a new Fiji rather than update it?
    Curtis Rueden
    @ctrueden
    OK, you need imagej-legacy-0.32.0.jar
    I released that on Friday, June 15, and did not yet upload it to the core update site.
    It will be uploaded later this week. In the meantime, you can download it directly.
    Curtis Rueden
    @ctrueden
    Sorry for the confusion about the port, BTW—I recommend just leaving it off. The default is 7.
    I was including it for testing, just to verify it works as expected.
    The fact that --help does not show the options is a limitation of the ImageJ launcher. There are a whole lot of options it does not show, because that screen is hardcoded into the native launcher. It has no knowledge of the Java-side options other than what is hardcoded.
    I want to change this to make --help a Java-side option, which spins up an ImageJ and displays the help based on all ConsoleArgument plugins. But this is not yet done.
    Christian "Tischi" Tischer
    @tischi
    Ok! It finds the command now! On my Mac, I started Fiji from 3 terminals and only a single UI appears. However, (i) there are 3 Fiji Icons in my dock, and (ii) it only opened the blobs.tif image once. I will send you a screenshot by e-mail.
    Curtis Rueden
    @ctrueden
    A second Fiji icon will appear in the dock temporarily, until the arguments are handed over. But it should disappear again after a few seconds.
    Christian "Tischi" Tischer
    @tischi
    They are still there (macOS 10.13)...Unfortunately, I have to stop testing now, because I have to go to sleep; teaching ImageJ tomorrow and the day after at: http://www.scopem.ethz.ch/education/schools/ZIDAS1.html
    Curtis Rueden
    @ctrueden
    No worries. Thanks for testing.