/** Displays a histogram using the specified title, number of bins, histogram range and yMax. */ public HistogramWindow(String title, ImagePlus imp, int bins, double histMin, double histMax, int yMax) { super(NewImage.createRGBImage(title, WIN_WIDTH, WIN_HEIGHT, 1, NewImage.FILL_WHITE)); this.yMax = yMax; showHistogram(imp, bins, histMin, histMax); }
/** * Displays a histogram using the specified title, number of bins and * histogram range. Currently, the number of bins must be 256 and the * histogram range range must be the same as the image range expect for 32 * bit images. */ public IJHistogramWindow(String title, ImagePlus imp, int bins, double histMin, double histMax) { super(NewImage.createRGBImage(title, WIN_WIDTH, WIN_HEIGHT, 1, NewImage.FILL_WHITE)); showHistogram(imp, bins, histMin, histMax); }
/** Displays a histogram using the specified title and ImageStatistics. */ public HistogramWindow(String title, ImagePlus imp, ImageStatistics stats) { super(NewImage.createRGBImage(title, WIN_WIDTH, WIN_HEIGHT, 1, NewImage.FILL_WHITE)); //IJ.log("HistogramWindow: "+stats.histMin+" "+stats.histMax+" "+stats.nBins); this.yMax = stats.histYMax; showHistogram(imp, stats); }
/** Displays a histogram using the specified title and number of bins. Currently, the number of bins must be 256 expect for 32 bit images. */ public HistogramWindow(String title, ImagePlus imp, int bins) { super(NewImage.createRGBImage(title, WIN_WIDTH, WIN_HEIGHT, 1, NewImage.FILL_WHITE)); showHistogram(imp, bins, 0.0, 0.0); }
/** Displays a histogram using the specified title, number of bins and histogram range. Currently, the number of bins must be 256 and the histogram range range must be the same as the image range expect for 32 bit images. */ public HistogramWindow(String title, ImagePlus imp, int bins, double histMin, double histMax) { super(NewImage.createRGBImage(title, WIN_WIDTH, WIN_HEIGHT, 1, NewImage.FILL_WHITE)); showHistogram(imp, bins, histMin, histMax); }
/** Displays a histogram using the specified title and number of bins. Currently, the number of bins must be 256 expect for 32 bit images. */ public HistogramWindow(String title, ImagePlus imp, int bins) { super(NewImage.createRGBImage(title, WIN_WIDTH, WIN_HEIGHT, 1, NewImage.FILL_WHITE)); showHistogram(imp, bins, 0.0, 0.0); }
/** Displays a histogram using the specified title, number of bins and histogram range. Currently, the number of bins must be 256 and the histogram range range must be the same as the image range expect for 32 bit images. */ public HistogramWindow(String title, ImagePlus imp, int bins, double histMin, double histMax) { super(NewImage.createRGBImage(title, WIN_WIDTH, WIN_HEIGHT, 1, NewImage.FILL_WHITE)); showHistogram(imp, bins, histMin, histMax); }
/** Displays a histogram using the specified title, number of bins, histogram range and yMax. */ public HistogramWindow(String title, ImagePlus imp, int bins, double histMin, double histMax, int yMax) { super(NewImage.createRGBImage(title, WIN_WIDTH, WIN_HEIGHT, 1, NewImage.FILL_WHITE)); this.yMax = yMax; showHistogram(imp, bins, histMin, histMax); }
/** Displays a histogram using the specified title and ImageStatistics. */ public HistogramWindow(String title, ImagePlus imp, ImageStatistics stats) { super(NewImage.createRGBImage(title, WIN_WIDTH, WIN_HEIGHT, 1, NewImage.FILL_WHITE)); //IJ.log("HistogramWindow: "+stats.histMin+" "+stats.histMax+" "+stats.nBins); this.yMax = stats.histYMax; showHistogram(imp, stats); }
/** * Displays a histogram using the specified title, number of bins, histogram * range and yMax. */ public IJHistogramWindow(String title, ImagePlus imp, int bins, double histMin, double histMax, int yMax) { super(NewImage.createRGBImage(title, WIN_WIDTH, WIN_HEIGHT, 1, NewImage.FILL_WHITE)); this.yMax = yMax; showHistogram(imp, bins, histMin, histMax); }
/** * Displays a histogram using the specified parameter name, title and ImageStatistics. */ public IJHistogramWindow(String paramName, String title, ImagePlus imp, ImageStatistics stats) { super(NewImage.createRGBImage(title, WIN_WIDTH, WIN_HEIGHT, 1, NewImage.FILL_WHITE)); //IJ.log("HistogramWindow: "+stats.histMin+" "+stats.histMax+" "+stats.nBins); this.paramName = paramName; this.yMax = stats.histYMax; showHistogram(imp, stats); }
/** Displays a histogram using the title "Histogram of ImageName". */ public HistogramWindow(ImagePlus imp) { super(NewImage.createRGBImage("Histogram of "+imp.getShortTitle(), WIN_WIDTH, WIN_HEIGHT, 1, NewImage.FILL_WHITE)); showHistogram(imp, 256, 0.0, 0.0); }
/** Displays a histogram using the title "Histogram of ImageName". */ public HistogramWindow(ImagePlus imp) { super(NewImage.createRGBImage("Histogram of "+imp.getShortTitle(), WIN_WIDTH, WIN_HEIGHT, 1, NewImage.FILL_WHITE)); showHistogram(imp, 256, 0.0, 0.0); }
/** * Displays a histogram using the title "Histogram of ImageName". */ public IJHistogramWindow(ImagePlus imp) { super(NewImage.createRGBImage("Histogram of " + imp.getShortTitle(), WIN_WIDTH, WIN_HEIGHT, 1, NewImage.FILL_WHITE)); showHistogram(imp, 256, 0.0, 0.0); }
public static ImagePlus createImage(String title, int width, int height, int nSlices, int bitDepth, int options) { ImagePlus imp = null; switch (bitDepth) { case 8: imp = createByteImage(title, width, height, nSlices, options); break; case 16: imp = createShortImage(title, width, height, nSlices, options); break; case 32: imp = createFloatImage(title, width, height, nSlices, options); break; case 24: imp = createRGBImage(title, width, height, nSlices, options); break; default: throw new IllegalArgumentException("Invalid bitDepth: "+bitDepth); } return imp; }
public static ImagePlus createImage(String title, int width, int height, int nSlices, int bitDepth, int options) { ImagePlus imp = null; switch (bitDepth) { case 8: imp = createByteImage(title, width, height, nSlices, options); break; case 16: imp = createShortImage(title, width, height, nSlices, options); break; case 32: imp = createFloatImage(title, width, height, nSlices, options); break; case 24: imp = createRGBImage(title, width, height, nSlices, options); break; default: throw new IllegalArgumentException("Invalid bitDepth: "+bitDepth); } return imp; }
synchronized void saveToImageJImage(String name) { BufferedImage bufferedImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); paint(bufferedImage.createGraphics()); String str = "Surface_Plot_of_" + name; ImagePlus plotImage = NewImage.createRGBImage (str, width, height, 1, NewImage.FILL_BLACK); ImageProcessor ip = plotImage.getProcessor(); int[] pixels = (int[]) ip.getPixels(); bufferedImage.getRGB(0, 0, width, height, pixels, 0, width); plotImage.show(); plotImage.updateAndDraw(); }
private ImagePlus generateLabeledImageFromBlobs(ManyBlobs blobs){ ImagePlus labImg = NewImage.createRGBImage("Labeled Image", labeledImage.getWidth() , labeledImage.getHeight(), 1, NewImage.FILL_WHITE); ColorProcessor labledImageProc = (ColorProcessor)labImg.getProcessor(); for(int i = 0; i < blobs.size(); i++){ int helpcol = (int)(((double)i)/blobs.size() * (255*255*255)); blobs.get(i).drawLabels(labledImageProc,new Color(helpcol)); } return labImg; }
public static void main(String[] args) { new ij.ImageJ(); ImagePlus imp = NewImage.createRGBImage( "Edit volume", 250, 233, 57, NewImage.FILL_BLACK); imp.show(); Volume_Editor vol = (Volume_Editor)IJ. runPlugIn("textureByRef.Volume_Editor", ""); VoltexVolume volume = vol.getVolume(); drawSpiral(volume, 128, 128); }
/** Displays a histogram using the title "Histogram of ImageName". */ public ColorHistogramWindow(ImagePlus imp) { super(NewImage.createRGBImage("Histogram of "+imp.getShortTitle(), WIN_WIDTH, WIN_HEIGHT, 1, NewImage.FILL_WHITE)); ImageProcessor ipmask = imp.getMask(); boolean isnull=(ipmask==null); mask=(!isnull)?(byte[])ipmask.getPixels():null; width=imp.getWidth(); height=imp.getHeight(); showHistogram(imp, nBins, 0.0, 0.0); printResults(); }