Commit 754db751 authored by gonciarz's avatar gonciarz

Stack Overlay fixed

parent a5c3f860
......@@ -5,6 +5,11 @@
......@@ -19,5 +24,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?><pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
......@@ -7,6 +7,8 @@ import;
import ij.IJ;
import ij.ImageJ;
import ij.ImagePlus;
import ij.gui.GenericDialog;
import ij.plugin.PlugIn;
import ij.plugin.PlugInInterpreter;
......@@ -48,7 +50,7 @@ public class JythonLauncher implements PlugIn {
public void run(String arg) {
InputStream stream = getClass().getResourceAsStream(arg);
InputStream stream = getClass().getClassLoader().getResourceAsStream(arg);
String theString = null;
try {
theString = IOUtils.toString(stream);
......@@ -64,4 +66,30 @@ public class JythonLauncher implements PlugIn {
* Main method for debugging.
* For debugging, it is convenient to have a method that starts ImageJ, loads an
* image and calls the plugin, e.g. after setting breakpoints.
* @param args unused
public static void main(String[] args) {
// set the plugins.dir property to make the plugin appear in the Plugins menu
Class<?> clazz = JythonLauncher.class;
String url = clazz.getResource("/" + clazz.getName().replace('.', '/') + ".class").toString();
String pluginsDir = url.substring("file:".length(), url.length() - clazz.getName().length() - ".class".length());
System.setProperty("plugins.dir", pluginsDir);
// start ImageJ
new ImageJ();
// open the Clown sample
ImagePlus image = IJ.openImage("");;
// run the plugin
IJ.runPlugIn(clazz.getName(), "");
......@@ -3,7 +3,7 @@ from java.awt import Color, GridLayout
from javax.swing import JPanel, JComboBox, JLabel, JFrame, JScrollPane, JColorChooser, JButton, JSeparator, SwingConstants, SpinnerNumberModel, JSpinner, BorderFactory, JCheckBox
from net.miginfocom.swing import MigLayout
from ij import IJ, WindowManager, ImagePlus, ImageStack
from ij import IJ, WindowManager, ImagePlus, ImageStack, VirtualStack
from ij.process import Blitter
from script.imglib.math import Multiply, Difference, Subtract, Xor, Add, Or, Min
from script.imglib.color import Red, Green, Blue, RGBA
......@@ -183,4 +183,3 @@ class OverlayVirtualStack(VirtualStack):
stackOverlay = StackOverlay()
print "Done."
......@@ -20,7 +20,7 @@ Plugins>Mosaic>Utility, "Insert Poisson noise", mosaic.plugins.Poisson_Noise("ru
Plugins>Mosaic>Utility, "Convolve with 2D Bessel function", mosaic.plugins.BesselPSF_Convolver("run")
Plugins>Mosaic>Utility, "Region creator", mosaic.plugins.RegionCreator("run")
Plugins>Mosaic>Utility, "Color substitution", mosaic.plugins.ColorSubstitution("run")
Plugins>Mosaic>Utility, "Stack Overlay", mosaic.plugins.JythonLauncher("/src/mosaic/plugins/scripts/")
Plugins>Mosaic>Utility, "Stack Overlay", mosaic.plugins.JythonLauncher("")
Plugins>Mosaic>Utility>Cluster, "Merge jobs", mosaic.plugins.MergeJobs("run")
Plugins>Mosaic>Utility>Cluster, "New cluster profile", mosaic.plugins.NewClusterProfile("run")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment