omeis.providers.re.data
Class Plane2D

java.lang.Object
  extended by omeis.providers.re.data.Plane2D

public class Plane2D
extends Object

Author:
callan

Field Summary
protected  int bytesPerPixel
          How many bytes make up a pixel value.
protected  int javaType
          The Java type that we're using for pixel value retrieval
protected  PlaneDef planeDef
          The type of plane.
protected  boolean signed
          The sign of the type
protected  int sizeX
          Number of pixels along the X-axis.
protected  int sizeY
          Number of pixels along the Y-axis.
protected  int slice
          The slice we're working with
 
Constructor Summary
Plane2D(PlaneDef pDef, ome.model.core.Pixels pixels, PixelData data)
          Constructor that sub-classes must call.
 
Method Summary
 PixelData getData()
          Returns the pixel data that is used to back this Plane.
 double getPixelValue(int offset)
          Returns the pixel intensity value of the pixel at a given offset within the backing buffer.
 double getPixelValue(int x1, int x2)
          Returns the pixel intensity value of the pixel at (x1, x2).
 boolean isXYPlanar()
          Returns true if the plane is an XY-plane, false otherwise.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

planeDef

protected PlaneDef planeDef
The type of plane.


bytesPerPixel

protected int bytesPerPixel
How many bytes make up a pixel value.


sizeX

protected int sizeX
Number of pixels along the X-axis.


sizeY

protected int sizeY
Number of pixels along the Y-axis.


javaType

protected int javaType
The Java type that we're using for pixel value retrieval


signed

protected boolean signed
The sign of the type


slice

protected int slice
The slice we're working with

Constructor Detail

Plane2D

public Plane2D(PlaneDef pDef,
               ome.model.core.Pixels pixels,
               PixelData data)
Constructor that sub-classes must call.

Parameters:
pDef - The type of plane.
pixels - The pixels set which the Plane2D references.
data - The raw pixels.
Method Detail

getPixelValue

public double getPixelValue(int x1,
                            int x2)
Returns the pixel intensity value of the pixel at (x1, x2). The coordinates are relative to the XY, ZY or XZ reference frame, depending on the plane type. (So x1 is x and x2 is y if the plane type is XY, etc.)

Parameters:
x1 - The first coordinate.
x2 - The second coordinate.
Returns:
The intensity value.

getPixelValue

public double getPixelValue(int offset)
Returns the pixel intensity value of the pixel at a given offset within the backing buffer. This method takes into account bytes per pixel. So the number of offsets is equal to the buffer size / bytesPerPixel.

Parameters:
offset - The relative offset (taking into account the number of bytes per pixel) within the backing buffer.
Returns:
The intensity value.

isXYPlanar

public boolean isXYPlanar()
Returns true if the plane is an XY-plane, false otherwise.

Returns:
See above.

getData

public PixelData getData()
Returns the pixel data that is used to back this Plane.

Returns:
See above.


OmeroJava Api

Version: Beta4.2.1-r8614-Beta4.2-b41

Copyright © 2009 The University of Dundee. All Rights Reserved.