I am using the macro extensions of bioformats, like this:
run("Bio-Formats Macro Extensions"); path = File.openDialog("Click on any image"); Ext.openImagePlus(path); This works fine, but I cannot figure out how to set the various options that I normally have (eg split channels, grayscale. etc). I looked through the various macro extension commands, but I could nto find this. I must be missing something obvious, but I would greatly appreciate any help. Also, a pointer to where I should have found this info would be appreciated. --aryeh -- Aryeh Weiss School of Engineering Bar Ilan University Ramat Gan 52900 Israel Ph: 972-3-5317638 FAX: 972-3-7384051 |
Here's the deal. If you want to stick with Macro language program, then you will just have to settle for missing functionality and occasional bugs.
The plugins that are created for imageJ are created by 3rd party sources. If you can't find documentation on the 3rd party websites, then the functionality that you are looking for probably doesn't exist. Here is bio-formats website: http://www.loci.wisc.edu/bio-formats/imagej SOLUTION: Learn how to create a plugin or find a better plugin.
|
In reply to this post by Aryeh Weiss
Aryeh,
open a file with the LOCI-Bioformats importer while the macro recorder is running. This will show how to use the command in a macro. I got this when selecting grayscale and split channels: run("Bio-Formats Importer", "open=[D:\\science\\slice1.lsm] color_mode=Grayscale split_channels view=Hyperstack stack_order=XYCZT"); Hope that helps, Martin |
On 6/28/11 6:14 PM, Martin Höhne wrote:
> Aryeh, > > open a file with the LOCI-Bioformats importer while the macro recorder is > running. This will show how to use the command in a macro. > > I got this when selecting grayscale and split channels: > > run("Bio-Formats Importer", "open=[D:\\science\\slice1.lsm] > color_mode=Grayscale split_channels view=Hyperstack stack_order=XYCZT"); > Thank you for your reply. This works. When I saw the macro extensions, I assumed that it had to done through them, but I see that I was wrong. I wonder if the macro extensions allow setting of these options. Regards, --aryeh -- Aryeh Weiss School of Engineering Bar Ilan University Ramat Gan 52900 Israel Ph: 972-3-5317638 FAX: 972-3-7384051 |
Hi Aryeh,
I wonder if the macro extensions allow setting of these options. > Fairly recently, we updated the Bio-Formats Importer API to be more powerful. From Java or a Java-based scripting language such as Javascript or Beanshell, you can now write: import loci.plugins.BF; ... ImagePlus[] imps = BF.openImagePlus("/path/to/myfile"); for (ImagePlus imp : imps) imp.show(); This will open the given file using the default options, and display all resultant ImagePlus objects. Or if you want to configure the options yourself, you can write: import loci.plugins.BF; import loci.plugins.in.ImporterOptions; ... ImporterOptions options = new ImporterOptions(); options.setId("/path/to/myfile"); options.setCrop(true); options.setCropRegion(0, new Region(0, 0, 100, 120)); options.setColorMode(ImporterOptions.COLOR_MODE_COMPOSITE); //...etc. ImagePlus[] imps = BF.openImagePlus(options); for (ImagePlus imp : imps) imp.show(); This should work from many of Fiji's scripting languages that utilize the Java API. However, apart from the openImagePlus(String) method with default settings, we have not updated the Bio-Formats macro extensions to support this API in the ImageJ macro language. -Curtis On Tue, Jun 28, 2011 at 11:20 AM, Aryeh Weiss <[hidden email]> wrote: > On 6/28/11 6:14 PM, Martin Höhne wrote: > >> Aryeh, >> >> open a file with the LOCI-Bioformats importer while the macro recorder is >> running. This will show how to use the command in a macro. >> >> I got this when selecting grayscale and split channels: >> >> run("Bio-Formats Importer", "open=[D:\\science\\slice1.**lsm] >> color_mode=Grayscale split_channels view=Hyperstack stack_order=XYCZT"); >> >> > Thank you for your reply. This works. When I saw the macro extensions, I > assumed that it had to done through them, but I see that I was wrong. > > I wonder if the macro extensions allow setting of these options. > > Regards, > > --aryeh > -- > Aryeh Weiss > School of Engineering > Bar Ilan University > Ramat Gan 52900 Israel > > Ph: 972-3-5317638 > FAX: 972-3-7384051 > |
Free forum by Nabble | Edit this page |