Use ImageJ in protocol?

229 views
Skip to first unread message

c53...@hotmail.com

unread,
Mar 7, 2013, 5:09:22 AM3/7/13
to icy-so...@googlegroups.com

I would like to use an ImageJ macro from within an Icy protocol. I tried to connect the ImageJ blocks into the procedure but I keep hitting dead ends. Would it be possible to provide a basic example protocol for taking an Icy sequence through an ImageJ macro (and/or plugin) and back again?

Thank you very much in advance !

Roxanne


Alexandre Dufour

unread,
Mar 8, 2013, 8:48:00 AM3/8/13
to icy-so...@googlegroups.com
Hi Roxanne,

You raise a very interesting point (we actually had a long discussion about this recently in the lab).

Short answer: you can call any plugin/macro using the "Call IJ plugin" and "Call IJ macro" blocks, however, getting a return value from these plugins/macros back into Icy is more tricky (but not impossible).

(if you don't care about technical details, you may directly skip down to the attached example)

In more details:
All ImageJ plugins/macros run natively via the embedded ImageJ inside Icy (no problem here). However, the return values of plugins/macros can be both multiple and diverse (image(s), numbers, text files, you name it), and accessing those results is not easy (ImageJ itself has the same problem if you don't do a little scripting manually in the editor). Currently, Protocols can call plugins that take an ImagePlus as input (perhaps also some parameters) and modify the given ImagePlus directly (this is the standard behavior of plugins of type 'PlugInFilter'). It can potentially call any other plugin or macro, but whatever comes out of these plugins is not known by the protocol, and therefore cannot be fetched back (without some scripting that is). We are trying to work on this and find other ways to access ImageJ data, and I'll keep this thread updated when things move on.

Example: In the following protocol, I am converting an Icy sequence into an ImagePlus, applying a median filter on the ImagePlus and converting the filtered ImagePlus back into Icy for display. As you can see, the input ImagePlus is overwritten by the plugin (this is a PlugInFilter), therefore I just need to convert the overwritten input back into Icy. This would not have been possible with a plugin that returns the result in a newly created ImagePlus.
This protocol is published on the website here: http://icy.bioimageanalysis.org/protocol/Median_filter_via_ImageJ

In order to go further, could I ask you to describe in more details the plugins you wish to use within your protocol? that could give us a better idea of what is missing and where we should work first.

Thanks,
Alexandre


c53...@hotmail.com

unread,
Mar 8, 2013, 3:04:53 PM3/8/13
to icy-so...@googlegroups.com


Dear Alexandre,

Thank you for that quick response. Your example protocol clearly demonstrates how to use an ImageJ PlugIn. I understand now how it is not (yet) possible to re-access output of a macro for further processing in Icy.

To be more specific about what I am doing: I am analyzing fluorescence signal in zebrafish embryos and I've written an ImageJ macro to orient and align the embryos according to their shape and distribution of fluorescent signal. I was hoping to develop a protocol in Icy to perform batch processing through a set of images in a folder, to do some pre-processing, let the ImageJ macro align and crop, and then return the aligned images to Icy to collect measurements and save processed images.

I will be eagerly awaiting improvements in ImageJ-Icy compatibilities as they come along.

Thanks again,
Roxanne

Fab

unread,
Mar 11, 2013, 9:28:20 AM3/11/13
to icy-so...@googlegroups.com
Hi !

Do you have an image and a sample of what you want to extract from your images ?

I will be pleased to have a look at it and see if we can process it.

Best,

Fabrice

c53...@hotmail.com

unread,
Mar 14, 2013, 10:58:53 AM3/14/13
to icy-so...@googlegroups.com

Dear Fabrice,

Sorry for the delay. I am attaching sample data (at relatively low resolution) -- I really appreciate your following up on this!

Warm regards,

Roxanne






Am Donnerstag, 7. März 2013 11:09:22 UTC+1 schrieb c53...@hotmail.com:
CNS_GFP_ImageIn.tif
CNS_GFP_ImageOut.tif

Fab

unread,
Mar 14, 2013, 12:13:20 PM3/14/13
to icy-so...@googlegroups.com
Ok, so the idea is to put the 'head' on the left and the 'tail' on the right ! Should the tail be horizontal ? Or should the overall fit in the most 'flat' rectangle as possible ? (I mean there is several way to create a criteria for your problem !)

Best,

Fabrice

c53...@hotmail.com

unread,
Mar 15, 2013, 9:27:04 AM3/15/13
to icy-so...@googlegroups.com


I realize I forgot those important details--the idea is head on the left, tail on the right, and overall embryo horizontal (as you say, in as flat a box as possible).  Hope that clarifies it?


Roxanne





Am Donnerstag, 7. März 2013 11:09:22 UTC+1 schrieb c53...@hotmail.com:
Reply all
Reply to author
Forward
Message has been deleted
0 new messages