Posted by
dscho on
Apr 20, 2014; 10:20pm
URL: http://imagej.273.s1.nabble.com/How-to-use-Stack-Manipulation-package-within-a-plugin-tp5007368p5007373.html
Hi Matt,
On Sun, 20 Apr 2014, Matt Pearson wrote:
> How could i run the Stack_Splitter menu command from within a plugin?
There are a couple of problems with this:
* it is in the default package, so you cannot really import it.
* apart from the run(), all of its methods are protected.
* there seems not to be a method that returns the split stacks, but
instead they are displayed.
See:
http://jenkins.imagej.net/view/Fiji/job/Stack_Manipulation/ws/target/apidocs/Stack_Splitter.html> Its part of the Stack_Manipulation jar file so i can't simply do
> IJ.run().
Just because a plugin is part of a .jar file does *not* mean you cannot
run it using IJ.run().
In your case -- because you probably need to access the individual
ImagePlus instances into which the stack was split -- I think that you'd
need to enhance the original Stack_Splitter class.
Happily, all of it is Open Source, and since I recently split the huge
Fiji source code repository into individual projects, it is pretty easy to
get started.
If you use an IDE such as Eclipse, you basically just have to clone
https://github.com/fiji/Stack_Splitter and import it as a Maven plugin.
Ciao,
Johannes
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html