public static Content createContent(final String name, final ImagePlus image, final int type, final int resf) { return createContent(name, image, type, resf, 0); }
public static Content createContent(final String name, final File file, final int type, final int resf, final int tp, final Color3f color, final int thresh, final boolean[] channels) { return createContent(name, getImages(file), type, resf, tp, color, thresh, channels); }
private Content createContent() { final ImagePlus[] imps = file != null ? ContentCreator.getImages(file) : ContentCreator .getImages(image); if (imps == null || imps.length == 0) return null; // check image type final int imaget = imps[0].getType(); if (imaget != ImagePlus.GRAY8 && imaget != ImagePlus.COLOR_256 && imaget != ImagePlus.COLOR_RGB) { // TODO correct message if (IJ.showMessageWithCancel("Convert...", "8-bit or RGB image required. Convert?")) { for (final ImagePlus ip : imps) ContentCreator.convert(ip); } else { return null; } } final Content c = ContentCreator.createContent(name, imps, type, resamplingFactor, timepoint, color, threshold, channels); return c; }
public static Content createContent(final CustomMultiMesh node, final String name) { return createContent(node, name, 0); }
public static Content createContent(final CustomMesh mesh, final String name) { return createContent(mesh, name, 0); }
/** * Create a Content object from the mesh. Does not add the Content to the * view; it merely creates it with all the appropriate default parameters. * Does not check if the view already contains a Content object with the same * name, which is not allowed. * * @param mesh the CustomMesh to display * @param name the name for the added Content * @return the created Content */ public Content createContent(final CustomMesh mesh, final String name) { return ContentCreator.createContent(mesh, name); }
public Content createContent(final CustomMultiMesh node, final String name) { return ContentCreator.createContent(node, name); }
public static Content createContent(final String name, final ImagePlus image, final int type) { final int resf = Content.getDefaultResamplingFactor(image, type); return createContent(name, image, type, resf, 0); }
public static Content createContent(final String name, final ImagePlus image, final int type, final int resf, final int tp) { final int thr = Content.getDefaultThreshold(image, type); return createContent(name, image, type, resf, tp, null, thr, new boolean[] { true, true, true }); }
/** * Add the specified image as a new Content to the universe. The specified * type is one of the constants defined in Content, e.g. VOLUME, SURFACE etc. * For meaning about color, threshold, channels, ... see the documentation for * Content. * * @param image the image to display * @param color the color in which the Content is displayed * @param name a name for the Content to be added * @param thresh a threshold * @param channels the color channels to display. * @param resf a resampling factor. * @param type the type which determines how the image is displayed. * @return The Content which is added, null if any error occurred. */ public Content addContent(final ImagePlus image, final Color3f color, final String name, final int thresh, final boolean[] channels, final int resf, final int type) { if (contents.containsKey(name)) { IJ.error("Content named '" + name + "' exists already"); return null; } final Content c = ContentCreator.createContent(name, image, type, resf, 0, color, thresh, channels); return addContent(c); }
final Content cimp = ContentCreator.createContent( imp.getShortTitle(), imp, 0, 1, 0, new Color3f( Color.WHITE ), 0, new boolean[] { true, true, true } ); universe.addContentLater( cimp ); final Content cimp = ContentCreator.createContent( imp.getShortTitle(), duplicate, 0, 1, 0, new Color3f( Color.WHITE ), 0, new boolean[] { true, true, true } ); universe.addContentLater( cimp );
final Content cimp = ContentCreator.createContent( imp.getShortTitle(), imp, 0, 1, 0, new Color3f( Color.WHITE ), 0, new boolean[] { true, true, true } ); universe.addContentLater( cimp ); final Content cimp = ContentCreator.createContent( imp.getShortTitle(), duplicate, 0, 1, 0, new Color3f( Color.WHITE ), 0, new boolean[] { true, true, true } ); universe.addContentLater( cimp );