-
Notifications
You must be signed in to change notification settings - Fork 0
/
A_MyPlugin_.java
47 lines (40 loc) · 1.69 KB
/
A_MyPlugin_.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import ij.IJ;
import ij.plugin.frame.PlugInFrame;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author usuario
*/
public class A_MyPlugin_ extends PlugInFrame {
/**
* Creates a new instance of Cell_Counter
*/
public A_MyPlugin_() {
super("My Plugin");
B_Mainplugin A_Mainplugin = new B_Mainplugin();
//NewJFrame NewJFrame = new NewJFrame();
//IJ.showMessage("thanks for using Mitochondria Morphology plugin ");
}
public void run(String arg) {
Class<?> clazz = B_Mainplugin.class;
String url = clazz.getResourceAsStream("/" + clazz.getName().replace('.', '/') + ".class").toString();
String pluginsDir = url.substring(5, url.length() - clazz.getName().length() - 6);
System.setProperty("plugins.dir", pluginsDir);
IJ.runPlugIn(clazz.getName(), "");
new B_Mainplugin().run("");
new B_Mainplugin().setVisible(true);
IJ.showMessage("thanks for using Mitochondria Morphology plugin ");
/*Class<?> clazz = NewJFrame.class;
String url = clazz.getResource("/" + clazz.getName().replace('.', '/') + ".class").toString();
String pluginsDir = url.substring(5, url.length() - clazz.getName().length() - 6);
System.setProperty("plugins.dir", pluginsDir);
IJ.runPlugIn(clazz.getName(), "");
new NewJFrame().run("");
new NewJFrame().setVisible(true);
IJ.showMessage("thanks for using Mitochondria Morphology plugin ");*/
}
}