forked from jayunruh/Jay_Plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexport_plot_jru_v1.java
More file actions
29 lines (26 loc) · 1023 Bytes
/
Copy pathexport_plot_jru_v1.java
File metadata and controls
29 lines (26 loc) · 1023 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
/*******************************************************************************
* Copyright (c) 2012 Jay Unruh, Stowers Institute for Medical Research.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v2.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
******************************************************************************/
import ij.*;
import ij.process.*;
import ij.gui.*;
import java.awt.*;
import ij.plugin.*;
import jguis.*;
import ij.io.*;
import java.io.*;
public class export_plot_jru_v1 implements PlugIn {
public void run(String arg) {
ImageWindow iw=WindowManager.getCurrentWindow();
String title=iw.getTitle();
if(!title.endsWith(".pw2")) title+=".pw2";
SaveDialog sd=new SaveDialog("Save Plot Object File",arg,title);
String dir=sd.getDirectory();
String name=sd.getFileName();
jutils.savePW4(iw,dir+File.separator+name);
}
}