private static ImageStack filterRGB(ImageStack rgb_in, int filter, float vx, float vy, float vz) { ImageStack[] channels = ChannelSplitter.splitRGB(rgb_in, false); ImageStack red = filter(channels[0], filter, vx, vy, vz); ImageStack green = filter(channels[1], filter, vx, vy, vz); ImageStack blue = filter(channels[2], filter, vx, vy, vz); return RGBStackMerge.mergeStacks(red, green, blue, false); }
public static CompilerTool getDefault() { CompilerTool javax = new JavaxCompilerTool(); if (javax.isSupported()) return javax; CompilerTool legacy = new LegacyCompilerTool(); if (legacy.isSupported()) return legacy; return null; }
/** Concatenates three images, stacks or hyperstacks. */ public static ImagePlus run(ImagePlus img1, ImagePlus img2, ImagePlus img3) { ImagePlus[] images = new ImagePlus[3]; images[0]=img1; images[1]=img2; images[2]=img3; return (new Concatenator()).concatenate(images, false); }
/** Converts the images in 'images' to a stack, using the default settings ("copy center" and "titles as labels"). */ public static ImagePlus run(ImagePlus[] images) { ImagesToStack itos = new ImagesToStack(); int count = itos.findMinMaxSize(images, images.length); return itos.convert(images, count); }
/** Returns the DICOM tags of the specified file as a string. */ public String getInfo(String path) { showErrors = false; gettingInfo = true; run(path); return info; }
/** Read 8-byte int with Intel (little-endian) byte order * (note: RandomAccessFile.readLong has other byte order than AVI) */ final long readLong() throws IOException { long low = readInt() & 0x00000000FFFFFFFFL; long high = readInt() & 0x00000000FFFFFFFFL; long result = high <<32 | low; return (long) result; //(high << 32 | low); } /** Read 4-byte int with Intel (little-endian) byte order
public Program getMacroProgram() { if (installer!=null) return installer.getProgram(); else return null; }
public int getMacroCount() { if (installer!=null) return installer.getMacroCount(); else return 0; }
/** Converts the specified stack into a hyperstack with 'c' channels, 'z' slices and 't' frames using the default ordering ("xyczt") and the specified display mode ("composite", "color" or "grayscale"). */ public static ImagePlus toHyperStack(ImagePlus imp, int c, int z, int t, String mode) { return toHyperStack(imp, c, z, t, null, mode); }
/**Short-hand for the four-argument <code>buildTreePath</code> method. * Calls <code>buildTreePath(source,label,<strong>null</strong>,topNode)</code>. * @see buildTreePath(String,String,String,DefaultMutableTreeNode). * */ private void buildTreePath(String source, String label, DefaultMutableTreeNode topNode) { buildTreePath(source, label, null, topNode); }
boolean isJavac() { if (compilerTool==null) compilerTool=CompilerTool.getDefault(); return compilerTool!=null; }
public boolean isSupported() { try { return null != getJavac(); } catch (Exception e) { return false; } } }
/** * Gets the first (or only) image read. * * @return ImageProcessor containing first frame, or null if none. */ public ImageProcessor getImage() { return getFrame(0); }
/** Deprecated; replaced by ChannelSplitter.splitRGB(). */ public void split(ImageStack rgb, boolean keepSource) { ImageStack[] channels = ChannelSplitter.splitRGB(rgb, keepSource); red = channels[0]; green = channels[1]; blue = channels[2]; }
public void run(String arg) { //long start = System.currentTimeMillis(); deleteDuplicates(); //IJ.log("Time: "+(System.currentTimeMillis()-start)); }
private static ImageStack filterRGB(ImageStack rgb_in, int filter, float vx, float vy, float vz) { ImageStack[] channels = ChannelSplitter.splitRGB(rgb_in, false); ImageStack red = filter(channels[0], filter, vx, vy, vz); ImageStack green = filter(channels[1], filter, vx, vy, vz); ImageStack blue = filter(channels[2], filter, vx, vy, vz); return RGBStackMerge.mergeStacks(red, green, blue, false); }
public static CompilerTool getDefault() { CompilerTool javax = new JavaxCompilerTool(); if (javax.isSupported()) return javax; CompilerTool legacy = new LegacyCompilerTool(); if (legacy.isSupported()) return legacy; return null; }
/** Concatenates two or more images, stacks or hyperstacks. * @param images Array of source images * @return Returns the concatenated images as an ImagePlus */ public static ImagePlus run(ImagePlus[] images) { return (new Concatenator()).concatenate(images, false); }