- Timestamp:
- 06/13/07 10:20:37 (18 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0-Beta2/components/rendering/src/omeis/providers/re/data/Plane2D.java
r1348 r1636 132 132 */ 133 133 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 { 136 163 if (signed) { 137 164 switch (javaType) { … … 160 187 } 161 188 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 } 162 199 }
