Package ij.io

Examples of ij.io.RandomAccessStream


            return;
        }
        ImageIcon tmpIcon = null;
        try {

            RandomAccessStream stream = new RandomAccessStream(
                    new RandomAccessFile(file, "r"));
            if (reader.isLSMfile(stream)) {
                ImagePlus imp[] = reader.open(file.getParent(), file.getName(), false, false, true);
                if (imp != null && imp.length>0)
                    tmpIcon = new ImageIcon(imp[0].getImage());
View Full Code Here


    ImagePlus[] imp = null;
    RandomAccessFile file;
    LsmFileInfo lsm;
    try {
      file = new RandomAccessFile(new File(directory, filename), "r");
      RandomAccessStream stream = new RandomAccessStream(file);
      lsm = new LsmFileInfo(masterModel);
      lsm.fileName = filename;
      lsm.directory = directory;
      if (isLSMfile(stream)) {
        // read first image directory
        ImageDirectory imDir = readImageDirectoy(stream, 8, thumb);
        lsm.imageDirectories.add(imDir);
        while (imDir.OFFSET_NEXT_DIRECTORY != 0) {
          imDir = readImageDirectoy(stream,
              imDir.OFFSET_NEXT_DIRECTORY, thumb);
          lsm.imageDirectories.add(imDir);
        }
        // printImDirData(lsm);
        imp = open(stream, lsm, verbose, thumb);
        stream.close();
        if (showInfoFrames)
          showEventList(lsm);
      } else
        IJ.error("Not a valid lsm file");
    } catch (FileNotFoundException e) {
View Full Code Here

    ImagePlus[] imp = null;
    RandomAccessFile file;
    LsmFileInfo lsm;
    try {
      file = new RandomAccessFile(new File(directory, filename), "r");
      RandomAccessStream stream = new RandomAccessStream(file);
      lsm = new LsmFileInfo();
      lsm.fileName = filename;
      lsm.directory = directory;
      if (isLSMfile(stream)) {
        ImageDirectory imDir = readImageDirectoy(stream, 8, thumb);
        lsm.imageDirectories.add(imDir);
        while (imDir.OFFSET_NEXT_DIRECTORY != 0) {
          imDir = readImageDirectoy(stream,
              imDir.OFFSET_NEXT_DIRECTORY, thumb);
          lsm.imageDirectories.add(imDir);
        }
        imp = open(stream, lsm, verbose, thumb);
        stream.close();
      } else
        IJ.error("Not a valid lsm file");
    } catch (FileNotFoundException e) {
      IJ.error("File not found");
      e.printStackTrace();
View Full Code Here

TOP

Related Classes of ij.io.RandomAccessStream

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.