options for FolderOpener.open?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

options for FolderOpener.open?

Kai Schleicher
Hi,

I am trying to

  * open an image sequence with a pattern in the filename (e.g. "tile0001")
  * sorted by filename
  * not show the image stack

I thought to use the FolderOpener.open
<https://imagej.nih.gov/ij/developer/api/ij/plugin/FolderOpener.html>
with options:

> public staticImagePlus <https://imagej.nih.gov/ij/developer/api/ij/ImagePlus.html>  open(java.lang.String path,
>                               java.lang.String options)
> Opens the images in the specified directory as a stack. Opens the
> images as a virtual stack if the 'options' string contains "virtual".
> Displays directory chooser and options dialogs if the the 'path'
> argument is null.

 From the options dialogue that is displayed when the path argument is
empty , I was hoping there are other options available, but I do not
know how to specify them (other than "virtual")

If FolderOperner.open is not the way to go, do you know another solution?

Thanks and cheers,
Kai

--
>>Please note my NEW PHONE NUMBERS: +41 61 207 57 31 (direct) +41 61 207 22 50 (central)<<
Kai Schleicher, PhD | Research Associate in Advanced Light Microscopy | Biozentrum, University of Basel | Klingelbergstrasse 50/70 | CH-4056 Basel |
Phone: +41 61 207 57 31 (direct) +41 61 207 22 50 (central) | [hidden email] | www.biozentrum.unibas.ch | www.microscopynetwork.unibas.ch


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: options for FolderOpener.open?

Philippe CARL
Dear Kai,
Why don't you simply use the "File->Import->Image Sequence..." feature?
And if you want the pictures not to be show, use first the "Plugins->Macro->Record..." when opening the first sequence in order to get the macro code corresponding to the  "Image Sequence...".
And later on use a macro to open your stack on which you put a "setBatchMode(true);" on top of the code.
My best regards,
Philippe

Philippe CARL
Laboratoire de Bioimagerie et Pathologies
UMR 7021 CNRS - Université de Strasbourg
Faculté de Pharmacie
74 route du Rhin
67401 ILLKIRCH
Tel : +33(0)3 68 85 41 84


-----Message d'origine-----
De : ImageJ Interest Group [mailto:[hidden email]] De la part de Kai Schleicher
Envoyé : jeudi 28 juin 2018 11:59
À : [hidden email]
Objet : options for FolderOpener.open?

Hi,

I am trying to

  * open an image sequence with a pattern in the filename (e.g. "tile0001")
  * sorted by filename
  * not show the image stack

I thought to use the FolderOpener.open
<https://imagej.nih.gov/ij/developer/api/ij/plugin/FolderOpener.html>
with options:

> public staticImagePlus <https://imagej.nih.gov/ij/developer/api/ij/ImagePlus.html>  open(java.lang.String path,
>                               java.lang.String options)
> Opens the images in the specified directory as a stack. Opens the
> images as a virtual stack if the 'options' string contains "virtual".
> Displays directory chooser and options dialogs if the the 'path'
> argument is null.

 From the options dialogue that is displayed when the path argument is
empty , I was hoping there are other options available, but I do not
know how to specify them (other than "virtual")

If FolderOperner.open is not the way to go, do you know another solution?

Thanks and cheers,
Kai

--
>>Please note my NEW PHONE NUMBERS: +41 61 207 57 31 (direct) +41 61 207 22 50 (central)<<
Kai Schleicher, PhD | Research Associate in Advanced Light Microscopy | Biozentrum, University of Basel | Klingelbergstrasse 50/70 | CH-4056 Basel |
Phone: +41 61 207 57 31 (direct) +41 61 207 22 50 (central) | [hidden email] | www.biozentrum.unibas.ch | www.microscopynetwork.unibas.ch


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

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: options for FolderOpener.open?

Ziqiang Huang-2
In reply to this post by Kai Schleicher
Dear Kai,

If you are scripting other than imagej macro language, then
the openFolder Method should be able to fulfill what you want (
https://imagej.nih.gov/ij/developer/api/ij/plugin/FolderOpener.html#FolderOpener--
)
Here is a sample python script that import image sequence as imagePlus but
not display it:

from ij.plugin import FolderOpener

path = 'C:\Users\ImageSequence'
imp = FolderOpener().openFolder(path)

then if you want to display the image, simple put imp.show()

Hope that answer's your question.

Bests,
Ziqiang

On Thu, 28 Jun 2018 at 11:00, Kai Schleicher <[hidden email]>
wrote:

> Hi,
>
> I am trying to
>
>   * open an image sequence with a pattern in the filename (e.g. "tile0001")
>   * sorted by filename
>   * not show the image stack
>
> I thought to use the FolderOpener.open
> <https://imagej.nih.gov/ij/developer/api/ij/plugin/FolderOpener.html>
> with options:
>
> > public staticImagePlus <
> https://imagej.nih.gov/ij/developer/api/ij/ImagePlus.html>
>  open(java.lang.String path,
> >                               java.lang.String options)
> > Opens the images in the specified directory as a stack. Opens the
> > images as a virtual stack if the 'options' string contains "virtual".
> > Displays directory chooser and options dialogs if the the 'path'
> > argument is null.
>
>  From the options dialogue that is displayed when the path argument is
> empty , I was hoping there are other options available, but I do not
> know how to specify them (other than "virtual")
>
> If FolderOperner.open is not the way to go, do you know another solution?
>
> Thanks and cheers,
> Kai
>
> --
> >>Please note my NEW PHONE NUMBERS: +41 61 207 57 31 (direct) +41 61 207
> 22 50 (central)<<
> Kai Schleicher, PhD | Research Associate in Advanced Light Microscopy |
> Biozentrum, University of Basel | Klingelbergstrasse 50/70 | CH-4056 Basel |
> Phone: +41 61 207 57 31 (direct) +41 61 207 22 50 (central) |
> [hidden email] | www.biozentrum.unibas.ch |
> www.microscopynetwork.unibas.ch
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>


--
Ziqiang Huang

Bioimage Analyst of Light Microscopy Facility
CRUK Cambridge Institute
Li Ka Shing Centre
Robinson Way
Cambridge, UK
CB2 0RE
01223-769538
email: [hidden email] <[hidden email]>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: options for FolderOpener.open?

Jan Eglinger
In reply to this post by Kai Schleicher
Dear Kai,

you've asked this question on the forum already:
http://forum.imagej.net/t/plug-in-for-importing-image-sequence/2933/6?u=imagejan

When cross-posting like this, please disclose (in both places) that
you're doing so, so that others don't waste their time answering things
that have been answered elsewhere already.

Jan


On 28.06.2018 11:59, Kai Schleicher wrote:

> Hi,
>
> I am trying to
>
>   * open an image sequence with a pattern in the filename (e.g. "tile0001")
>   * sorted by filename
>   * not show the image stack
>
> I thought to use the FolderOpener.open
> <https://imagej.nih.gov/ij/developer/api/ij/plugin/FolderOpener.html>
> with options:
>
>> public staticImagePlus
>> <https://imagej.nih.gov/ij/developer/api/ij/ImagePlus.html>
>>  open(java.lang.String path,
>>                               java.lang.String options)
>> Opens the images in the specified directory as a stack. Opens the
>> images as a virtual stack if the 'options' string contains "virtual".
>> Displays directory chooser and options dialogs if the the 'path'
>> argument is null.
>
>  From the options dialogue that is displayed when the path argument is
> empty , I was hoping there are other options available, but I do not
> know how to specify them (other than "virtual")
>
> If FolderOperner.open is not the way to go, do you know another solution?
>
> Thanks and cheers,
> Kai
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: options for FolderOpener.open?

Wayne Rasband-2
In reply to this post by Kai Schleicher
> On Jun 28, 2018, at 5:59 AM, Kai Schleicher <[hidden email]> wrote:
>
> Hi,
>
> I am trying to
>
> * open an image sequence with a pattern in the filename (e.g. "tile0001")
> * sorted by filename
> * not show the image stack

Upgrade to the latest ImageJ daily build (1.52e15) and you will be able to do this using

   img = FolderOpener.open(dir, "file=tile0001");

Sorting by filename is done by default.  Use

   img = FolderOpener.open(dir, "virtual file=tile0001”);

to open the images as a virtual stack.

-wayne


> I thought to use the FolderOpener.open <https://imagej.nih.gov/ij/developer/api/ij/plugin/FolderOpener.html> with options:
>
>> public staticImagePlus <https://imagej.nih.gov/ij/developer/api/ij/ImagePlus.html>  open(java.lang.String path,
>>                              java.lang.String options)
>> Opens the images in the specified directory as a stack. Opens the images as a virtual stack if the 'options' string contains "virtual". Displays directory chooser and options dialogs if the the 'path' argument is null.
>
> From the options dialogue that is displayed when the path argument is empty , I was hoping there are other options available, but I do not know how to specify them (other than "virtual")
>
> If FolderOperner.open is not the way to go, do you know another solution?
>
> Thanks and cheers,
> Kai

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