Login  Register

Re: Linear Stack Alignment With SIFT - missing low level API - quote request

Posted by Albert Cardona-2 on Dec 01, 2015; 7:15pm
URL: http://imagej.273.s1.nabble.com/kawa-script-using-mpicbg-1-0-2-jar-ERROR-tp5014635p5015078.html

Don't use the macro way of invoking the plugin, but the direct java way
instead.

According to the plugins.config:
https://github.com/axtimwalde/mpicbg/blob/master/mpicbg_/src/main/resources/plugins.config

... the "Linear Stack Alignment with SIFT" command invokes the "SIFT_Align"
class in SIFT_Align.java, which is here:
https://github.com/axtimwalde/mpicbg/blob/master/mpicbg_/src/main/java/SIFT_Align.java

... and within SIFT_Align.run we see:
https://github.com/axtimwalde/mpicbg/blob/master/mpicbg_/src/main/java/SIFT_Align.java#L130

... that it asks for parameters in a dialog, extracts the features, then
finds the matches (the correspondences across consecutive images) and then
opens the resulting stack.

Refactoring the "run" method is trivial: move everything after the dialog
to a static method invoked with as many parameters as the dialog had.

I am sure a pull request is welcome.

Best,

Albert



2015-12-01 12:11 GMT-05:00 David Pirotte <[hidden email]>:

> Hello,
>
> Can anyone interested, including the original author of course, please
> send me a
> [reasonable] quote to patch the existing mpicbg library so it would have a
> public
> method, _not_ depending on UI, which would receive 2 args and return a new
> stack
> with the aligned images:
>
>         LinearStackAlignmentWithSIFT
>                         stack
>                         paramstring
>
>         ->      which returns a new stack with the aligned images
>
> Many thanks,
> David
>
> (a) The actual implementation of/for "Linear Stack Alignment With SIFT" is
> missing a
> proper separation between the low level functionality and the GUI [it
> requires the
> stack of images to be aligned to be displayed on the screen and otherwise
> fails with
> the exception "No images open"];
>
> (b) It is anyway unusable(*), from scheme I mean, and probably any host
> languages,
> because not only does it not return the new stack as a value, but for some
> mysterious reason(s), it does not display the new stack, so I currently
> have no way
> to 'grab' it.  Here is a session fr the curious...:
>
>
>         #|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 results.
>
>
> (*)     unfortunately because I would use it 'as is' in the mean time,
> despite
>         for scripting but acceptable until solved ...
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--
http://albert.rierol.net
http://www.janelia.org/lab/cardona-lab
http://www.ini.uzh.ch/~acardona/

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