• Views
  • Iteration Report
  • My Iteration Report
  •  
OMERO.server
  • Login
  • Help/Guide
  • About Trac
  • Preferences
  • Wiki
  • Timeline
  • Roadmap
  • Browse Source
  • View Tickets
  • Search

Context Navigation

  • ← Previous Change
  • Next Change →

Changeset 1636 for branches/3.0-Beta2/components/rendering/src/omeis/providers/re/data/Plane2D.java

Show
Ignore:
Timestamp:
06/13/07 10:20:37 (18 months ago)
Author:
callan
Message:

Merging trunk I/O fixes into the milestone:3.0-Beta2 branch:

  • r1586:1587
  • r1591:1592
  • r1593:1594
  • Manual merge of GreyScaleStrategy
Files:
1 modified

  • branches/3.0-Beta2/components/rendering/src/omeis/providers/re/data/Plane2D.java (modified) (2 diffs)

Legend:

Unmodified
Added
Removed
  • branches/3.0-Beta2/components/rendering/src/omeis/providers/re/data/Plane2D.java

    r1348 r1636  
    132132     */ 
    133133    public double getPixelValue(int x1, int x2) { 
    134         int offset = calculateOffset(x1, x2); 
    135  
     134        return getPixelValueDirect(calculateOffset(x1, x2)); 
     135    } 
     136     
     137     
     138    /** 
     139     * Returns the pixel intensity value of the pixel at a given offset within 
     140     * the backing buffer. This method takes into account bytes per pixel. So 
     141     * the number of offsets is equal to the buffer size /  
     142     * <code>bytesPerPixel</code>. 
     143     *  
     144     * @param offset The relative offset (taking into account the number of  
     145     * bytes per pixel) within the backing buffer. 
     146     * @return The intensity value. 
     147     */ 
     148    public double getPixelValue(int offset) 
     149    { 
     150        return getPixelValueDirect(offset * bytesPerPixel); 
     151    } 
     152     
     153    /** 
     154     * Returns the pixel intensity value of the pixel at a given offset within 
     155     * the backing buffer. This method does not take into account bytes per 
     156     * pixel. 
     157     *  
     158     * @param offset The absolute offset within the backing buffer. 
     159     * @return The intensity value. 
     160     */ 
     161    private double getPixelValueDirect(int offset) 
     162    { 
    136163        if (signed) { 
    137164            switch (javaType) { 
    … …  
    160187    } 
    161188 
     189    /** 
     190     * Returns <code>true</code> if the plane is an <code>XY-plane</code>, 
     191     * <code>false</code> otherwise. 
     192     *  
     193     * @return See above. 
     194     */ 
     195    public boolean isXYPlanar() 
     196    { 
     197        return (planeDef.getSlice() == PlaneDef.XY); 
     198    } 
    162199} 

Download in other formats:

  • Unified Diff
  • Zip Archive

Trac Powered

Powered by Trac 0.11
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/