public void addContentFromImage(final ImagePlus image) { addContent(image, null); }
public void addTimelapseFromFile() { addContentFromFile(); }
public void addTimelapseFromHyperstack(final ImagePlus image) { addContentFromImage(image); }
if (src == color) executer.changeColor(getSelected()); else if (src == bgColor) executer.changeBackgroundColor(); else if (src == scalebar) executer.editScalebar(); else if (src == luts) executer.adjustLUTs(getSelected()); else if (src == channels) executer.changeChannels(getSelected()); else if (src == transparency) executer.changeTransparency(getSelected()); else if (src == open) executer.addContentFromFile(); else if (src == addContentFromImage) executer.addContentFromImage(null); else if (src == regist) executer.register(); else if (src == delete) executer.delete(getSelected()); else if (src == resetView) executer.resetView(); else if (src == centerSelected) executer.centerSelected(getSelected()); else if (src == centerOrigin) executer.centerOrigin(); else if (src == centerUniverse) executer.centerUniverse(); else if (src == fitViewToUniverse) executer.fitViewToUniverse(); else if (src == fitViewToContent) executer.fitViewToContent(getSelected()); else if (src == snapshot) executer.snapshot(); else if (src == record360) executer.record360(); else if (src == startRecord) executer.startFreehandRecording(); else if (src == stopRecord) executer.stopFreehandRecording(); else if (src == startAnimation) executer.startAnimation(); else if (src == stopAnimation) executer.stopAnimation(); else if (src == animationOptions) executer.changeAnimationOptions(); else if (src == threshold) executer.changeThreshold(getSelected()); else if (src == displayAsVolume) { executer.displayAs(getSelected(), ContentConstants.VOLUME); updateMenus(); executer.displayAs(getSelected(), ContentConstants.ORTHO);
ExecuteWatchdog watchdog = new ExecuteWatchdog(30000); Executer exec = new Executer(myloghandler, watchdog); exec.setCommandLine(mycmdline); int exitvalue = exec.execute(); if (Execute.isFailure(exitvalue) && watchdog.killedProcess()) { // it was killed on purpose by the watchdog }
super(width, height); canvas = (ImageCanvas3D) getCanvas(); executer = new Executer(this); this.timeline = new Timeline(this); this.timelineGUI = new TimelineGUI(timeline);
public void addContentFromFile() { final JFileChooser chooser = new JFileChooser(OpenDialog.getLastDirectory()); chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES); chooser.setMultiSelectionEnabled(false); final int returnVal = chooser.showOpenDialog(null); if (returnVal != JFileChooser.APPROVE_OPTION) return; final File f = chooser.getSelectedFile(); OpenDialog.setLastDirectory(f.getParentFile().getAbsolutePath()); addContent(null, f); }
public void addTimelapseFromFolder() { final DirectoryChooser dc = new DirectoryChooser("Open from folder"); final String dir = dc.getDirectory(); if (dir == null) return; final File d = new File(dir); if (d.exists()) addContent(null, d); else IJ.error("Cannot load " + d.getAbsolutePath()); }
@Override public void run(final String arg) { final ImagePlus image = WindowManager.getCurrentImage(); try { final Image3DUniverse univ = new Image3DUniverse(); univ.show(); GUI.center(univ.getWindow()); if (arg != null && !arg.equals("")) importContent(arg); // only when there is an image and we are not called // from a macro else if (image != null && !IJ.isMacro()) univ.getExecuter().addContent( image, null); } catch (final Exception e) { final StringBuffer buf = new StringBuffer(); final StackTraceElement[] st = e.getStackTrace(); buf.append("An unexpected exception occurred. \n" + "Please mail me the following lines if you \n" + "need help.\n" + "bene.schmid@gmail.com\n \n"); buf.append(e.getClass().getName() + ":" + e.getMessage() + "\n"); for (int i = 0; i < st.length; i++) { buf.append(" at " + st[i].getClassName() + "." + st[i].getMethodName() + "(" + st[i].getFileName() + ":" + st[i].getLineNumber() + ")\n"); } new ij.text.TextWindow("Error", buf.toString(), 500, 400); } }