Package ij.io

Examples of ij.io.FileInfo


    int width = image[0].getWidth();
    int height = image[0].getHeight();
    double min = Double.MAX_VALUE;
    double max = -Double.MAX_VALUE;
    ImageStack stack = new ImageStack(width, height);
    FileInfo fi = image[0].getOriginalFileInfo();
    if (fi!=null && fi.directory==null) fi = null;
    for (int i=0; i<count; i++) {
      ImageProcessor ip = image[i].getProcessor();
      if (ip.getMin()<min) min = ip.getMin();
      if (ip.getMax()>max) max = ip.getMax();
            String label = image[i].getTitle();
            String info = (String)image[i].getProperty("Info");
            if (info!=null) label += "\n" + info;
            if (fi!=null) {
        FileInfo fi2 = image[i].getOriginalFileInfo();
        if (fi2!=null && !fi.directory.equals(fi2.directory))
          fi = null;
            }
            stack.addSlice(label, ip);
      image[i].changes = false;
View Full Code Here


    fileInfos = new Vector();
    if (imagesIDs == null)
      return;
    for (int i = 0; i < imagesIDs.length; i++) {
      if (WindowManager.getImage(imagesIDs[i]) != null){
        FileInfo fi = WindowManager.getImage(imagesIDs[i]).getOriginalFileInfo();
        boolean add = false;
        if (fi != null
            && fi instanceof LsmFileInfo) {
          LsmFileInfo lsm = (LsmFileInfo)fi;
          CZ_LSMInfo cz = (CZ_LSMInfo) ((ImageDirectory) lsm.imageDirectories.get(0)).TIF_CZ_LSMINFO;
View Full Code Here

     * method : Apply_colors, applies color gradient; function taken out from *
     * my Lut_Panel plugin *
     **************************************************************************/

    public static void apply_colors(ImagePlus imp, Color[] gc, int i) {
        FileInfo fi = new FileInfo();
        fi.reds = new byte[256];
        fi.greens = new byte[256];
        fi.blues = new byte[256];
        fi.lutSize = 256;
        float nColorsfl = 256;
View Full Code Here

   * method : Apply_colors, applies color gradient; function taken out from *
   * Lut_Panel plugin *
   **************************************************************************/

  private void apply_colors(ImagePlus imp, Color[] gc, int i) {
    FileInfo fi = new FileInfo();
    fi.reds = new byte[256];
    fi.greens = new byte[256];
    fi.blues = new byte[256];
    fi.lutSize = 256;
    float nColorsfl = 256;
View Full Code Here

    }
   
    double min = Double.MAX_VALUE;
    double max = -Double.MAX_VALUE;
    ImageStack stack = new ImageStack(width, height);
    FileInfo fi = image[0].getOriginalFileInfo();
    if (fi!=null && fi.directory==null) fi = null;
    for (int i=0; i<count; i++) {
      ImageProcessor ip = image[i].getProcessor();
      if (ip==null) break;
      if (ip.getMin()<min) min = ip.getMin();
      if (ip.getMax()>max) max = ip.getMax();
            String label = titlesAsLabels?image[i].getTitle():null;
            if (label!=null) {
              String info = (String)image[i].getProperty("Info");
        if (info!=null) label += "\n" + info;
      }
            if (fi!=null) {
        FileInfo fi2 = image[i].getOriginalFileInfo();
        if (fi2!=null && !fi.directory.equals(fi2.directory))
          fi = null;
            }
            switch (stackType) {
              case 16: ip = ip.convertToShort(false); break;
View Full Code Here

      setDimensions(channels, stackSize/channels, 1);
    else
      setDimensions(channels, z, t);
    setStack(imp.getTitle(), stack2);
    setCalibration(imp.getCalibration());
    FileInfo fi = imp.getOriginalFileInfo();
    if (fi!=null) {
      displayRanges = fi.displayRanges;
      channelLuts = fi.channelLuts;
    }
    setFileInfo(fi);
View Full Code Here

      setDimensions(channels, stackSize/channels, 1);
    else
      setDimensions(channels, z, t);
    setStack(imp.getTitle(), stack2);
    setCalibration(imp.getCalibration());
    FileInfo fi = imp.getOriginalFileInfo();
    if (fi!=null) {
      displayRanges = fi.displayRanges;
      channelLuts = fi.channelLuts;
      fi.displayRanges = null;
    }
View Full Code Here

    int width = image[0].getWidth();
    int height = image[0].getHeight();
    double min = Double.MAX_VALUE;
    double max = -Double.MAX_VALUE;
    ImageStack stack = new ImageStack(width, height);
    FileInfo fi = image[0].getOriginalFileInfo();
    if (fi!=null && fi.directory==null) fi = null;
    for (int i=0; i<count; i++) {
      ImageProcessor ip = image[i].getProcessor();
      if (ip.getMin()<min) min = ip.getMin();
      if (ip.getMax()>max) max = ip.getMax();
            String label = image[i].getTitle();
            String info = (String)image[i].getProperty("Info");
            if (info!=null) label += "\n" + info;
            if (fi!=null) {
        FileInfo fi2 = image[i].getOriginalFileInfo();
        if (fi2!=null && !fi.directory.equals(fi2.directory))
          fi = null;
            }
            stack.addSlice(label, ip);
      image[i].changes = false;
View Full Code Here

            MedianCut mc =
                    new MedianCut((int[]) ip.getPixels(), ip.getWidth(), ip
                            .getHeight());
            ip = mc.convertToByte(256);
            ImagePlus imp = new ImagePlus("temp", ip);
            FileInfo fi = imp.getFileInfo();
            byte pixels[] = (byte[]) imp.getProcessor().getPixels();
            GifEncoder ge =
                    new GifEncoder(fi.width,
                                   fi.height,
                                   pixels,
View Full Code Here

TOP

Related Classes of ij.io.FileInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.