/
Sample_Loader.java
74 lines (65 loc) · 2.11 KB
/
Sample_Loader.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
package emblcmci.teach;
/** For opening sample images for teaching via internet
* accessing CMCI server
*
*/
import java.io.IOException;
import ij.IJ;
import ij.plugin.BrowserLauncher;
import ij.plugin.PlugIn;
import ij.plugin.URLOpener;
public class Sample_Loader implements PlugIn{
public String loadURL(String filename){
String fullpath = "http://cmci.embl.de/sampleimages/"+filename;
return fullpath;
}
public void load(String filename){
URLOpener uo = new URLOpener();
uo.run(loadURL(filename));
}
@Override
public void run(String arg) {
// Sample_Loader sl = new Sample_Loader();
// sl.load(arg);
if (arg.equals("about")){
showAbout(); return;
}
if ((arg.endsWith("/")) || (arg.endsWith(".html")) || (arg.endsWith(".htm"))){
try {
BrowserLauncher.openURL(arg);
} catch (IOException e) {
e.printStackTrace();
}
}
load(arg);
}
public void showAbout() {
IJ.showMessage("Sample Images Plugin",
"<html>" +
"<b>EMBL Course Sample Images (2014-03-27) </b><br>" +
"Kota Miura<br>" +
"<a href=\"http://cmci.embl.de\">CMCI, EMBL</a><br>" +
"<br>" +
"A collection of Sample Images for use in practical courses.<br>" +
"<br>" +
"<b>FISH2D.tif</b><br>" +
"... kindly provided by Edouard Bertrand & Florian Mueller<br>" +
"... The original 3D stack could be downloaded from the following site:<br>" +
"... <a href=\"https://code.google.com/p/fish-quant/\">FISH-quant</a><br>" +
"<br>" +
"<b>NPC (Nuclear Pore Complex) images</b><br>" +
"... kindly provided by Andrea Boni<br>" +
"<br>" +
"<b>centrosomes.lsm</b><br>" +
"... kindly provided by Mayumi Isokane<br>" +
"<br>" +
"<b>invitro.tif</b><br>" +
"... kindly provided by Thomas Surray<br>" +
"... For more details, see Bieling P, et al: Nature (2007) 450: 1100-1105<br>" +
"<br>" +
"For more information, visit course section in<br>" +
"<br>" +
"<a href'http://cmci.embl.de'>cmci.embl.de</a>"
);
}
}