Package ij.plugin

Examples of ij.plugin.DICOM


    String name = entry.getName();
    //double fileSize = entry.getSize(); //returns -1
    if (!(name.endsWith(".tif")||name.endsWith(".dcm")))
      throw new IOException("This ZIP archive does not appear to contain a .tif or .dcm file");
    if (name.endsWith(".dcm")) {
      DICOM dcm = new DICOM(zin);
      dcm.run(name);
      return dcm;
    } else
      return openTiff(zin, name);
  }
View Full Code Here


        return null;
      }
      if (name.endsWith(".tif")) {
        imp = openTiff(in, name);
      } else if (name.endsWith(".dcm")) {
        DICOM dcm = new DICOM(in);
        dcm.run(name);
        imp = dcm;
      } else {
        in.close();
        IJ.error("This ZIP archive does not appear to contain a \nTIFF (\".tif\") or DICOM (\".dcm\") file, or ROIs (\".roi\").");
        return null;
View Full Code Here

  private static String getSliceLabel(ImageStack stack, int n) {
    String info = stack.getSliceLabel(n);
    if ((info==null || info.length()<100) && stack.isVirtual()) {
      String dir = ((VirtualStack)stack).getDirectory();
      String name = ((VirtualStack)stack).getFileName(n);
      DICOM reader = new DICOM();
      info = reader.getInfo(dir+name);
      if (info!=null)
        info = name + "\n" + info;
    }
    return info;
  }
View Full Code Here

          byteCount += len;
          //IJ.showProgress((double)(byteCount%fileSize)/fileSize);
        }
        byte[] bytes = out.toByteArray();
        out.close();
        DICOM dcm = new DICOM(new ByteArrayInputStream(bytes));
        dcm.run(name);
        imp2 = dcm;
      }
      zis.closeEntry();
      if (imp2==null) continue;
      count++;
View Full Code Here

        return null;
      }
      if (name.endsWith(".tif")) {
        imp = openTiff(zis, name);
      } else if (name.endsWith(".dcm")) {
        DICOM dcm = new DICOM(zis);
        dcm.run(name);
        imp = dcm;
      } else {
        zis.close();
        IJ.error("This ZIP archive does not appear to contain a \nTIFF (\".tif\") or DICOM (\".dcm\") file, or ROIs (\".roi\").");
        return null;
View Full Code Here

    String name = entry.getName();
    //double fileSize = entry.getSize(); //returns -1
    if (!(name.endsWith(".tif")||name.endsWith(".dcm")))
      throw new IOException("This ZIP archive does not appear to contain a .tif or .dcm file");
    if (name.endsWith(".dcm")) {
      DICOM dcm = new DICOM(zin);
      dcm.run(name);
      return dcm;
    } else
      return openTiff(zin, name);
  }
View Full Code Here

        return null;
      }
      if (name.endsWith(".tif")) {
        imp = openTiff(in, name);
      } else if (name.endsWith(".dcm")) {
        DICOM dcm = new DICOM(in);
        dcm.run(name);
        imp = dcm;
      } else {
        in.close();
        IJ.error("This ZIP archive does not appear to contain a \nTIFF (\".tif\") or DICOM (\".dcm\") file, or ROIs (\".roi\").");
        return null;
View Full Code Here

TOP

Related Classes of ij.plugin.DICOM

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.