Login  Register

Re: kawa script using mpicbg_-1.0.2.jar -> ERROR

Posted by David Pirotte on Nov 11, 2015; 11:25pm
URL: http://imagej.273.s1.nabble.com/kawa-script-using-mpicbg-1-0-2-jar-ERROR-tp5014635p5014923.html

Hi Stephan,

        Sorry for the long delay, but I had to jump on another project. As it has
        been said already, we are not here to fight, neither to judge, but to help
        each other.

        Your library is great, but as it is, I can't use it from scheme, see below
        for further explanation...

        Please reconsider, thanks!

> > (1) "Linear Stack Alignment with SIFT" now works, _but_, iff I display images on
> > the screen, which is required to call "Images to Stack":
> >
> > (a) I want to open images in memory only and built the stack
> > myself, example(s) [preferably kawa/clojure of course since I use kawa]
> > welcome;
> >
> > (b) "Linear Stack Alignment with SIFT" does not expect/accept a
> > stack argument, I would need, if possible, that you implement a version
> > that accept a stack instead of 'magically' grab the one fiji
> > creates when calling "Images to Stack" time:
> >
> > would that be possible?
> >  
>
> No, it is unnecessary because the ImageJ and mpicbg API have lots of
> public methods that allow fine grained access to all its functionality.
No matter how much fine grained API, public methods both imagej and your great
library have, I still miss the 2 I need :)

1] ImagesToStack is the only way we can build a stack out of images of diff
        sizes.  AFAICT, there is no other way: all "add slice" public methods require
        images to be of the same size, and otherwise raise a exception;

        ImagesToStack requires images to be displayed on the screen, which is less
        then optimal for scripting.

Wrt the above, I now have written a scheme ij-images-to-stack procedure which
implements, in scheme, the functionality provided by ImagesToStack except that it
does not ask any image to be displayed on the screen.

        If someone is interested, ping me and I'll post the code

2] From scheme [Kawa in this case], even if I display the manually built stack
        on the screen, which is not what we want anyway, but I did try that in the
        mean time, then run "Linear Stack Alignment with SIFT", I can't get access
        to the result, because that UI 'run' functionality does not return a value
        [the new stack];

        please understand that when I call 'run "Linear Stack Alignment with
        SIFT" ...' from scheme, the new stack, 'Aligned 1 of ...' is not
        displayed on the screen, unlike while using fiji, so I can't get access to
        the aligned images no matter what.

        The above is to explain and because I was trying to find a solution in the
        mean time, but I'm looking for scripting optimal solution, which as I said,
        does not require any display on the screen.

So, Stephan,
I really hope you will accept to reconsider and write a lower level public method

        LinearStackAlignmentWithSIFT
                        stack
                        paramstring

                -> which returns a stack

Many thanks,
David

        #|kawa:12|# (ij-run "Linear Stack Alignment with SIFT"
                    "initial_gaussian_blur=1.60 steps_per_scale_octave=3 minimum_image_size=64 maximum_image_size=1024 feature_descriptor_size=4 feature_descriptor_orientation_bins=8 closest/next_closest_ratio=0.92 maximal_alignment_error=25 inlier_ratio=0.05 expected_transformation=Translation interpolate")
        #|(---:13|# Processing SIFT ...
         took 3216ms.
        2954 features extracted.
        Processing SIFT ...
         took 1562ms.
        2395 features extracted.
        identifying correspondences using brute force ... took 1160ms
        519 potentially corresponding features identified
        Done.
-> #!null
        #|kawa:14|#


^^ Since the UI 'run' functionality does not return a value and since the aligned images
^^ stack is not displayed on the screen, I can't get access and save the result.

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

attachment0 (484 bytes) Download Attachment