private String getOriginalDataSwapfile() { if (originalDataSwapfile != null) return originalDataSwapfile; File tmp = new File(System.getProperty("java.io.tmpdir"), "3D_Viewer"); if (!tmp.exists()) tmp.mkdirs(); tmp = new File(tmp, "original"); if (!tmp.exists()) tmp.mkdirs(); originalDataSwapfile = new File(tmp, getName()).getAbsolutePath(); return originalDataSwapfile; }
private String getDisplayedDataSwapfile() { if (displayedDataSwapfile != null) return displayedDataSwapfile; File tmp = new File(System.getProperty("java.io.tmpdir"), "3D_Viewer"); if (!tmp.exists()) tmp.mkdirs(); tmp = new File(tmp, "displayed"); if (!tmp.exists()) tmp.mkdirs(); displayedDataSwapfile = new File(tmp, getName()).getAbsolutePath(); return displayedDataSwapfile; }
private static final String getMeshString(final ContentInstant c) { final ArrayList<CustomMesh> meshes = getMeshes((CustomMeshNode) c.getContent()); String ret = ""; for (final CustomMesh cm : meshes) { String name = cm.getName(); if (name == null) name = c.getName(); name.replaceAll(" ", "_").replaceAll("#", "--"); ret += "%%%" + cm.getFile() + "%%%" + name; } return ret.substring(3, ret.length()); }
public void swapDisplayedData() { if (!available) return; contentNode.swapDisplayedData(getDisplayedDataSwapfile(), getName()); available = false; }
public void showPointList(final boolean b) { if (plShape == null) return; setSwitch(PL, b); showPL = b; if (b && plDialog != null) plDialog.addPointList(getName(), plPanel); else if (!b && plDialog != null) plDialog.removePointList(plPanel); }
public void savePointList() { String dir = OpenDialog.getDefaultDirectory(); String n = this.getName(); if (image != null) { final FileInfo fi = image.getFileInfo(); dir = fi.directory; n = fi.fileName; } points.save(dir, n); }
new ArrayList<CMesh>()); String name = cm.getName(); if (name == null) name = c.getName(); if (meshes.size() > 1) // it's a multimesh; make sure the name is
out.println("name = " + c.getName()); if (col != null) out.println("color = " + col); out.println("timepoint = " + c.timepoint);
public ImagePlus exportTransformed() { final ImagePlus orig = getImage(); if (orig == null) throw new RuntimeException( "No greyscale image exists for " + getName());