-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDisplay_4D.java
More file actions
48 lines (34 loc) · 848 Bytes
/
Copy pathDisplay_4D.java
File metadata and controls
48 lines (34 loc) · 848 Bytes
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
package examples;
import view4d.Timeline;
import ij.plugin.PlugIn;
import ij.ImagePlus;
import ij.IJ;
import ij.Prefs;
import ij3d.Content;
import ij3d.Image3DUniverse;
public class Display_4D implements PlugIn {
public static void main(String[] args) {
new ij.ImageJ();
IJ.runPlugIn("ij3d.examples.Display_4D", "");
}
public void run(String arg) {
// Open a hyperstack
ImagePlus imp = IJ.openImage(
Prefs.getImagesURL() + "Spindly-GFP.zip");
// Create a universe and show it
Image3DUniverse univ = new Image3DUniverse();
univ.show();
// load the stack in the viewer
univ.addVoltex(imp);
// get the Timeline object
Timeline tl = univ.getTimeline();
// start playback
tl.play();
// wait a bit
try {
Thread.sleep(5000);
} catch(InterruptedException e) {}
// Stop animation
tl.pause();
}
}