Changeset 2155


Ignore:
Timestamp:
01/23/07 13:23:25 (13 years ago)
Author:
melissa
Message:

Removed Plane2D - the same functionality is provided by BufferedImages.

Location:
trunk/loci/formats/in
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/in/BaseTiffReader.java

    r2142 r2155  
    2525package loci.formats.in; 
    2626 
    27 import java.awt.image.BufferedImage; 
     27import java.awt.image.*; 
    2828import java.io.IOException; 
    2929import java.nio.ByteBuffer; 
     
    8484      numImages 
    8585    }; 
    86   } 
    87  
    88   /** 
    89    * Obtains an object which represents a given plane within the file. 
    90    * @param id The path to the file. 
    91    * @param no The plane or section within the file to obtain. 
    92    * @return an object which represents the plane. 
    93    * @throws FormatException if there is an error parsing the file. 
    94    * @throws IOException if there is an error reading from the file or 
    95    *   acquiring permissions to read the file. 
    96    */ 
    97   public Plane2D openPlane2D(String id, int no) 
    98     throws FormatException, IOException 
    99   { 
    100     return new Plane2D(ByteBuffer.wrap(openBytes(id, no)), 
    101       getPixelType(id), isLittleEndian(id), getSizeX(id), getSizeY(id)); 
    10286  } 
    10387 
     
    884868        for (int z = 0; z < getSizeZ(currentId); z++) { 
    885869          int index = getIndex(currentId, z, c, t); 
    886           Plane2D plane = openPlane2D(currentId, index); 
     870          WritableRaster pixels = openImage(currentId, index).getRaster(); 
    887871          for (int x = 0; x < getSizeX(currentId); x++) { 
    888872            for (int y = 0; y < getSizeY(currentId); y++) { 
    889               double pixelValue = plane.getPixelValue(x, y); 
     873              double pixelValue = pixels.getSampleDouble(x, y, c); 
    890874              if (pixelValue < min) min = pixelValue; 
    891875              if (pixelValue > max) max = pixelValue; 
Note: See TracChangeset for help on using the changeset viewer.