Login  Register

Re: programmatically opening a stack from a list of filenames

Posted by Ben.BigHair on Apr 03, 2007; 1:29pm
URL: http://imagej.273.s1.nabble.com/programmatically-opening-a-stack-from-a-list-of-filenames-tp3699826p3699830.html

Albert Cardona wrote:

> Ben
>
> In the FolderOpener run method:
>
>     list = sortFileList(list);
>
> note how above the String[] list pointer is overwritten. Which means that in
> overriding the sortFileList method you are free to resize it. Opening different
> images from different folders would not be allowed. Opening different chunks of
> different sequences existing within the same will, which is what you need as
> far as I understand.
>
> About the constructors:
>
>> ImageStack(java.lang.String[] files)
>>
>> ImagePlus(java.lang.String[] files)
>
>
> Well, don't stop yourself :) Just extend class ImagePlus and give it the
> constructor you need, which is basically the pseudocode from your first email
> with some width/height safety checks.
>
> Albert
>

Hi Albert,

This sounds like a good challenge to me. It would help me to make I sure
how I would access such a plugin. I want to pass the plugin (e.g.
"OpenMyListAsStack") a string, or a concatenation of strings, that lists
the files to open.  I don't want  to present the caller with any
dialogs. Is this where I would call...

IJ.runPlugin("OpenMyListAsStack", stringList)

from my other plugin?


Thanks again,
Ben