Re: programmatically opening a stack from a list of filenames
Posted by
Albert Cardona on
Apr 03, 2007; 3:59pm
URL: http://imagej.273.s1.nabble.com/programmatically-opening-a-stack-from-a-list-of-filenames-tp3699826p3699831.html
Ben,
Perhaps best is:
public class StackPlus extends ImagePlus {
public StackPlus(String concat_filenames) {
super();
String[] files = concat_filenames.split("\n");
// open all files and place their processors in an ImageStack
// ...
}
}
Then just call, from your plugin:
public class My_Plugin implements PlugIn {
public void run(String arg) {
// obtain filenames from wherever
// ...
ImagePlus imp = new StackPlus(filenames);
imp.show();
}
}
The above assumed absolute paths where concatenated in a single String and
separated by newline characters.
Albert
--------------------------------------------------------------------
This message was sent using Webmail@INI:
https://webmail.ini.ethz.ch