public void showPointList(final Content c, final boolean b) { if (!checkSel(c)) return; c.showPointList(b); }
public void centerSelected(final Content c) { if (!checkSel(c)) return; univ.centerSelected(c); }
public void fitViewToContent(final Content c) { if (!checkSel(c)) return; univ.adjustView(c); }
public void displayAs(final Content c, final int type) { if (!checkSel(c)) return; c.displayAs(type); }
public void showBoundingBox(final Content c, final boolean b) { if (!checkSel(c)) return; c.showBoundingBox(b); }
public void loadPointList(final Content c) { if (!checkSel(c)) return; c.loadPointList(); }
public void savePointList(final Content c) { if (!checkSel(c)) return; c.savePointList(); }
public void showCoordinateSystem(final Content c, final boolean b) { if (!checkSel(c)) return; c.showCoordinateSystem(b); record(SET_CS, Boolean.toString(b)); }
public void exportTransformed(final Content c) { if (!checkSel(c)) return; new Thread() { { setPriority(Thread.NORM_PRIORITY); } @Override public void run() { exportTr(c); } }.start(); }
public void changeSlices(final Content c) { if (!checkSel(c)) return; switch (c.getType()) { case ContentConstants.ORTHO: changeOrthslices(c); break; case ContentConstants.MULTIORTHO: changeMultiOrthslices(c); break; } }
public void delete(final Content c) { if (!checkSel(c)) return; univ.removeContent(c.getName()); record(DELETE); }
public void setLocked(final Content c, final boolean b) { if (!checkSel(c)) return; c.setLocked(b); if (b) record(LOCK); else record(UNLOCK); }
public void fill(final Content c) { if (!checkSel(c)) return; final int type = c.getType(); if (type != ContentConstants.VOLUME && type != ContentConstants.ORTHO) return; new Thread() { { setPriority(Thread.NORM_PRIORITY); } @Override public void run() { final ImageCanvas3D canvas = (ImageCanvas3D) univ.getCanvas(); ((VoltexGroup) c.getContent()).fillRoi(canvas, canvas.getRoi(), (byte) 0); univ.fireContentChanged(c); record(FILL_SELECTION); } }.start(); }
public void showContent(final Content c, final boolean b) { if (!checkSel(c)) return; c.setVisible(b); record( SHOW_CONTENT, c.getName(), ""+b ); if (!b) univ.clearSelection(); }
public void updateVolume(final Content c) { if (!checkSel(c)) return; if (c.getType() != ContentConstants.VOLUME && c.getType() != ContentConstants.ORTHO) return; if (c.getResamplingFactor() != 1) { IJ.error("Object must be loaded " + "with resamplingfactor 1"); return; } ((VoltexGroup) c.getContent()).update(); }
public void resetTransform(final Content c) { if (!checkSel(c)) return; if (c.isLocked()) { IJ.error(c.getName() + " is locked"); return; } univ.fireTransformationStarted(); c.setTransform(new Transform3D()); univ.fireTransformationFinished(); record(RESET_TRANSFORM); }
public void saveTransform(final Content c) { if (!checkSel(c)) return; final Transform3D t1 = new Transform3D(); c.getLocalTranslate().getTransform(t1); final Transform3D t2 = new Transform3D(); c.getLocalRotate().getTransform(t2); t1.mul(t2); final float[] matrix = new float[16]; t1.get(matrix); if (new TransformIO().saveAffineTransform(matrix)) record(SAVE_TRANSFORM, affine2string(matrix)); }
public void setSaturatedVolumeRendering(final Content c, final boolean b) { if (!checkSel(c)) return; final int t = c.getType(); if (t != ContentConstants.VOLUME) return; if (c.getNumberOfInstants() == 1) { c.setSaturatedVolumeRendering(b); return; } final ContentInstant ci = c.getCurrent(); final GenericDialog gd = new GenericDialog("Saturated volume rendering"); gd.addCheckbox("Apply to all timepoints", true); gd.showDialog(); if (gd.wasCanceled()) return; if (gd.getNextBoolean()) c.setSaturatedVolumeRendering(b); else ci.setSaturatedVolumeRendering(b); }
public void setShaded(final Content c, final boolean b) { if (!checkSel(c)) return; final int t = c.getType(); if (t != ContentConstants.SURFACE && t != ContentConstants.SURFACE_PLOT2D && t != ContentConstants.CUSTOM) return; if (c.getNumberOfInstants() == 1) { c.setShaded(b); return; } final ContentInstant ci = c.getCurrent(); final GenericDialog gd = new GenericDialog("Set shaded"); gd.addCheckbox("Apply to all timepoints", true); gd.showDialog(); if (gd.wasCanceled()) return; if (gd.getNextBoolean()) c.setShaded(b); else ci.setShaded(b); }
public void contentProperties(final Content c) { if (!checkSel(c)) return; final Point3d min = new Point3d(); final Point3d max = new Point3d(); final Point3d center = new Point3d(); c.getContent().getMin(min); c.getContent().getMax(max); c.getContent().getCenter(center); final TextWindow tw = new TextWindow(c.getName(), " \tx\ty\tz", "min\t" + (float) min.x + "\t" + (float) min.y + "\t" + (float) min.z + "\n" + "max\t" + (float) max.x + "\t" + (float) max.y + "\t" + (float) max.z + "\n" + "cog\t" + (float) center.x + "\t" + (float) center.y + "\t" + (float) center.z + "\n\n" + "volume\t" + c.getContent().getVolume(), 512, 512); }