Refine search
/** * Displays a complex type as power spectrum, phase spectrum, real values or imaginary values depending on the converter */ public static <T extends ComplexType<T>> ImagePlus show( final RandomAccessibleInterval<T> img, final Converter< T, FloatType > converter, final String title ) { final ImageJVirtualStackFloat< T > stack = new ImageJVirtualStackFloat< T >( img, converter ); final ImagePlus imp = new ImagePlus( title, stack ); imp.show(); return imp; }
public CrossCorrelation2D(ImageProcessor ip1, ImageProcessor ip2, boolean showImages) { if (showImages) { ImagePlus img1 = new ImagePlus("Image 1", ip1); ImagePlus img2 = new ImagePlus("Image 2", ip2); img1.show(); img2.show(); } this.img1 = ImageToFloatArray2D(ip1); this.img2 = ImageToFloatArray2D(ip2); this.showImages = showImages; //computeCrossCorrelation(ImageToFloatArray2D(ip1), ImageToFloatArray2D(ip2), showImages); }
private void apply() { ImageStack stack = new ImageStack(w, h); byte[][] b = new byte[d][w*h]; for(int z = 0; z < d; z++) { for(int y = 0; y < h; y++) { for(int x = 0; x < w; x++) { b[z][y*w+x] = (byte)B(x, y, z); } } stack.addSlice("", new ByteProcessor(w, h, b[z], null)); } new ImagePlus("result", stack).show(); df.show(0); df.show(1); df.show(2); }
@SuppressWarnings("unused") static private final void view( final long[] hist, final int w1, final int h1, final int nBins) { final float[] pixels = new float[w1 * h1 * nBins]; for (int i=0; i<hist.length; ++i) { pixels[i] = hist[i]; } new ImagePlus("Integral Histogram", new FloatProcessor(w1 * nBins, h1, pixels)).show(); }
/** Starts ImageJ if it's not already running. */ public void init() { ImageJ ij = IJ.getInstance(); if (ij==null || (ij!=null && !ij.isShowing())) new ImageJ(this); for (int i=1; i<=9; i++) { String url = getParameter("url"+i); if (url==null) break; ImagePlus imp = new ImagePlus(url); if (imp!=null) imp.show(); } }
@SuppressWarnings("unused") static public final void main(String[] args) { final ShortProcessor sp = (ShortProcessor) IJ.openImage("/home/albert/Desktop/t2/bridge-16bit.tif").getProcessor(); final ShortProcessor filtered = median(sp, 64, 0, 65535, 100); new ImageJ(); new ImagePlus("median", filtered).show(); } }
/** Starts ImageJ if it's not already running. */ public void init() { ImageJ ij = IJ.getInstance(); if (ij==null || (ij!=null && !ij.isShowing())) new ImageJ(this); for (int i=1; i<=9; i++) { String url = getParameter("url"+i); if (url==null) break; ImagePlus imp = new ImagePlus(url); if (imp!=null) imp.show(); } }