forked from edrosten/threeB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLoadTestData.java
55 lines (44 loc) · 1.2 KB
/
LoadTestData.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
49
50
51
52
53
54
55
import ij.*;
import ij.process.*;
import ij.gui.*;
import java.awt.*;
import ij.plugin.*;
import ij.plugin.frame.*;
import ij.plugin.filter.PlugInFilter;
import ij.*;
import ij.io.*;
import ij.plugin.*;
import ij.plugin.filter.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.util.*;
import java.io.*;
import javax.swing.*;
import javax.swing.event.*;
import java.lang.InterruptedException;
import java.lang.System;
import java.lang.Math.*;
import java.net.*;
///Plugin class to load the standard test data from the JAR file.
///@ingroup gPlugin
public class LoadTestData implements PlugIn {
public void run(String arg)
{
Opener o = new Opener();
InputStream s = getClass().getClassLoader().getResourceAsStream("test_data.tif");
ImagePlus im = o.openTiff(s, "test_data.tiff");
try{
s.close();
}
catch(IOException close_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");
}
};