Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Bevan Cheeseman
    @cheesema
    Where it matters, whether I compile from scratch or not
    if I use the re-compile, the read intensities step is a alot slower
    Robert Haase
    @haesleinhuepf
    Hey guys, I'm just digging a bit in the LibARP java wrapper. I found code examples for reading an APR-image from disc and showing it in BigDataViewer. However, is there also some code examples on how to save a ShortBuffer as APR file to disc?
    I found the read() method - but there is no write?
    Bevan Cheeseman
    @cheesema
    I'll follow up for you on this tomorrow, KG is away on holiday today.
    But the way we do this the other way round.. is with a copy
    memcpy( buffer, img.mesh.get(), 2 width height * depth );
    For example
    I will actually be playing with the wrappers quite a bit over the next few days/weeks. Looking to integrate the time series stuff.
    So i'll progressively know them better, and be able to help more :)
    Robert Haase
    @haesleinhuepf
    I was just wondering if there might exist a code snippet taking a Java image (of whatever kind) and save it as APR file to disc... You know: while acquisition ;-)
    Bevan Cheeseman
    @cheesema
    Yip, I can do this for you tomorrow.
    Robert Haase
    @haesleinhuepf
    Great :-)
    Bevan Cheeseman
    @cheesema
    @haesleinhuepf i send you some details in a pm, let me know if they make sense.
    Jan Eglinger
    @imagejan
    @cheesema I might also be interested in writing and reading APR files from Java. Any chance you can share code examples on the image.sc forum or here on gitter, instead of in private messages?
    Bevan Cheeseman
    @cheesema
    Of-course :) Just didn’t get round to giving a full code example
    @cheesema
    So I can quickly point you at all the elements required.
    Do you get how to extend the JavaAPR wrapper?, this requires addition to JavaAPR, and then addition of its definition to APR.h
    https://github.com/AdaptiveParticles/LibAPR-java-wrapper/blob/master/src/main/java/mosaic/JavaAPR.java
    https://github.com/AdaptiveParticles/LibAPR-java-wrapper/blob/master/src/main/resources/mosaic/APR.h
    Then on the C++ side:
    https://github.com/AdaptiveParticles/LibAPR/blob/master/examples/Example_get_apr.cpp
    Provides a full fledged example with maybe too much control
    https://github.com/AdaptiveParticles/LibAPR/blob/c13429091a7c2481c27cef9f4f2a92a684ca5998/src/io/APRWriter.hpp#L379
    A more simple interface for the writing/
    @cheesema
    For the Java -> C++ copy
    This can be acheived as: https://github.com/AdaptiveParticles/LibAPR-java-wrapper/blob/8d1c9e8e8492b5989150bea6498bebd92025447e/src/main/resources/mosaic/APR.h#L54
    Otherwise, I will get some code up and running with some tests by next week, and will share them both here and on image.sc
    I’m happy your interested in having a play :)
    Jan Eglinger
    @imagejan
    Great, thanks a ton! :)
    Bevan Cheeseman
    @cheesema

    @cheesema
    JavaAPR get16bitUnsignedAPRInternal(int width, int height, int depth, int bpp, uint16_t buffer) {
    PixelData<uint16_t> p = PixelData<uint16_t>(width, height, depth);
    p.mesh.set(buffer, widthheightdepth);
    apr.get_apr(p);

        return this;
    }
    
    void write(std::string directory,std::string name){
        apr.write_apr(directory,name);
    }

    Add the write function to APR.h
    public native void write(String directory,String name);
    and to JavaAPR.java
    However, there is no exposure of parameters ect. I will do this early next week.

    Bevan Cheeseman
    @cheesema
    Hey guys, for those interested, check out the great work by Krzysztof, its moving, however parameters are still not exposed yet.
    ahh oops wrong link
    First APR’s loaded through Fiji, and created through Fiji :D
    And an example of taking the Java side image, and passing to the wrappers is here:
    Jan Eglinger
    @imagejan
    Thanks, @cheesema, for sharing.
    Do you consider deploying LibAPR-java-wrapper (and the other components inheriting pom-scijava) to maven.imagej.net and building via Travis CI?
    Krzysztof Gonciarz
    @krzysg
    Hi @imagejan , definitely we would like to deploy it as soon as it is finished. Anyway first we need to learn a little bit how to do that properly, well LibAPR-java-wrapper is using native C++ LibAPR. I need to find some info and maybe existing examples what is the best way of deploying such a thing.
    Robert Haase
    @haesleinhuepf
    Hey @krzysg and @cheesema , thanks for sharing! I might tweet about it soonish, when our microscopes start saving images as APR... I'm so much looking forward to this :-)
    Bevan Cheeseman
    @cheesema
    Cool! let me know if you need any guidance re parameters or any details. Woudl be happy to Skype :)
    Robert Haase
    @haesleinhuepf
    Alright! Thanks again!
    Ulrik Günther
    @skalarproduktraum
    @cheesema @krzysg if you need help in setting up the deployment stuff for the native libs from CI, let me know, i’ve done the same thing for some scenery libs in the past
    Krzysztof Gonciarz
    @krzysg
    Little update: now APR-ImageJ can show APR images in BigVolumeViewer Demo. Also when exporting to APR format some of the parameters can be updated by user.
    Ulrik Günther
    @skalarproduktraum
    Awesome!
    Bevan Cheeseman
    @cheesema
    oooh sweet, look forward to checking this out.
    Ulrik Günther
    @skalarproduktraum
    @krzysg did you need to change anything in bvv for that? asking because i use the same code in scenery, so that might also work straight away then
    Krzysztof Gonciarz
    @krzysg
    No, nothing is changed there.
    Krzysztof Gonciarz
    @krzysg

    Hi guys, if you will be @CSBD next Tuesday we will have small hackathon with a goal to deploy APR-ImageJ to maven / update sites:

    CSBD 133 VC
    "APR-ImageJ hackathon"
    Tuesday, 19 March
    10.00 - 15.00

    everybody is welcome!

    Hazen Babcock
    @HazenBabcock
    I'd like to use this library from Python. I see some hints that Python bindings might be available, but I can't find them. Suggestions?
    Joel Jonsson
    @joeljonsson
    the python wrappers are currently in a separate, private repository. I can give you access
    Hazen Babcock
    @HazenBabcock
    Will they be released soon? I'm not in a super rush.
    Joel Jonsson
    @joeljonsson
    oh, okay. yes, it's difficult to say exactly when, but sometime in the next few months
    Jan T
    @moreApi
    Hello, I am trying to build the old java volume render. I got all includes in line but now I get the following error and I am stumped. Maybe someone has an idea how to proceed? (Besides switching to python. That is sadly not possile^^)
    image.png
    I'm on windows with wsl
    ooh just a line before the picture it says in plain text /usr/bin/ld: cannot find -lhdf5 guess thats my error. Sorry for bothering^^
    Jan T
    @moreApi
    ok it compiles now but I dont have a compatible APR file. How can I convert/get one? Do I have to compile the fiji plugin or is there some simpler way?