-
Notifications
You must be signed in to change notification settings - Fork 0
/
MyPlugin_.java
48 lines (41 loc) · 1.74 KB
/
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
48
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 MyPlugin_ extends PlugInFrame {
/**
* Creates a new instance of Cell_Counter
*/
public MyPlugin_() {
super("My Plugin");
//B_Mainplugin A_Mainplugin = new B_Mainplugin();
My_Plugin_ My_Plugin_ = new My_Plugin_();
//NewJFrame NewJFrame = new NewJFrame();
//IJ.showMessage("thanks for using Mitochondria Morphology plugin ");
}
public void run(String arg) {
Class<?> clazz = My_Plugin_.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 My_Plugin_().run("");
new My_Plugin_().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 ");*/
}
}