Пример #1
0
 /** Reads the pixel data from an image described by a FileInfo object. */
 Object readPixels(FileInfo fi) {
   Object pixels = null;
   try {
     InputStream is = createInputStream(fi);
     if (is == null) return null;
     ImageReader reader = new ImageReader(fi);
     pixels = reader.readPixels(is);
     minValue = reader.min;
     maxValue = reader.max;
     is.close();
   } catch (Exception e) {
     if (!Macro.MACRO_CANCELED.equals(e.getMessage())) IJ.handleException(e);
   }
   return pixels;
 }