forked from edrosten/threeB
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLoadTestData.java
More file actions
Latest commit
55 lines (44 loc) · 1.2 KB
/
Copy pathLoadTestData.java
File metadata and controls
55 lines (44 loc) · 1.2 KB
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
49
50
51
52
53
54
55
importij.*;
importij.process.*;
importij.gui.*;
importjava.awt.*;
importij.plugin.*;
importij.plugin.frame.*;
importij.plugin.filter.PlugInFilter;
importij.*;
importij.io.*;
importij.plugin.*;
importij.plugin.filter.*;
importjava.awt.event.*;
importjava.awt.geom.*;
importjava.util.*;
importjava.io.*;
importjavax.swing.*;
importjavax.swing.event.*;
importjava.lang.InterruptedException;
importjava.lang.System;
importjava.lang.Math.*;
importjava.net.*;
///Plugin class to load the standard test data from the JAR file.
///@ingroup gPlugin
publicclassLoadTestDataimplementsPlugIn {
publicvoidrun(Stringarg)
{
Openero = newOpener();
InputStreams = getClass().getClassLoader().getResourceAsStream("test_data.tif");
ImagePlusim = o.openTiff(s, "test_data.tiff");
try{
s.close();
}
catch(IOExceptionclose_err){
Toolkit.getDefaultToolkit().beep();
ij.IJ.showStatus("Error reading image.");
return;
}
im.show();
im.updateAndDraw();
System.out.println(getClass().getResource("").toString() + "\n");
System.out.println(getClass().getResource("").getPath().toString() + "\n");
System.out.println(getClass().getResource("").getFile().toString() + "\n");
}
};