Posted by
Kyle Harrington on
Oct 20, 2015; 5:08pm
URL: http://imagej.273.s1.nabble.com/kawa-script-using-mpicbg-1-0-2-jar-ERROR-tp5014635p5014688.html
FWIW, although I haven¹t gotten around to wrapping the SIFT alignment code
for concise Clojure access, if you have funimage installed (update site:
http://sites.imagej.net/Funimage/) you can do this in the Clojure
interpreter:
(use Œfunimage.imp)
(let [original (open-imp "
http://imagej.net/images/blobs.gif")]
(show-imp (zconcat-imps (map #(% (copy-imp original)) [smooth dilate
erode invert]))))
This will call the 4 functions that are being mapped over, create 4 new
ImagePlus(es), apply the functions, and concatenate them as a Z-stack.
Note that the functions: smooth, dilate, erode, and invert *are* mutable,
hence the original image is copied prior to the function applications.
If any particular functions should have more natural names, then feel free
to bring it up or send a pull request.
Cheers,
Kyle
--
Kyle I S Harrington, PhD
Postdoctoral Fellow
Bentley Group, Computational Biology Lab
Center for Vascular Biology Research,
Beth Israel Deaconess Medical Center
Harvard Medical School, Boston, MA
web:
http://www.kyleharrington.comOn 10/19/15, 1:28 PM, "Saalfeld, Stephan" <
[hidden email]>
wrote:
>Hi David,
>
>> (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.
>You will have to read about and learn it and then you will realize that
>both (1) and (2) are strange things to ask for ;).
>
>E.g., if you want to keep doing what you propose which is clearly the
>result of not having spent sufficient time with it, you could call
>
>
http://rsb.info.nih.gov/ij/developer/api/ij/IJ.html#run-ij.ImagePlus-java.
>lang.String-java.lang.String-
>
>as making an ImagePlus from an ImageStack is as simple as
>
>
http://rsb.info.nih.gov/ij/developer/api/ij/ImagePlus.html#ImagePlus-java.
>lang.String-ij.ImageStack-
>
>and
>
>> As you understood already, it is extremely important for us, I should
>>say mandatory
>> actually, that absolutely everything happens in memory and no windows
>>is/needs to
>> be opened during the execution of the script.
>>
>
>everything you're talking about happens in memory. If you do not want
>UI, use the API directly instead of plugins whose sole purpose is to
>provide a UI to some functions.
>
>Good luck,
>Stephan
>
>--
>ImageJ mailing list:
http://imagej.nih.gov/ij/list.html________________________________
This message is intended for the use of the person(s) to whom it may be addressed. It may contain information that is privileged, confidential, or otherwise protected from disclosure under applicable law. If you are not the intended recipient, any dissemination, distribution, copying, or use of this information is prohibited. If you have received this message in error, please permanently delete it and immediately notify the sender. Thank you.
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html