Package omeis.providers.re.data
Class Plane2D
- java.lang.Object
-
- omeis.providers.re.data.Plane2D
-
public class Plane2D extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected int
bytesPerPixel
How many bytes make up a pixel value.protected omeis.providers.re.data.PlaneDef
planeDef
The type of plane.protected boolean
signed
The sign of the typeprotected 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
Constructors Constructor Description Plane2D(omeis.providers.re.data.PlaneDef pDef, ome.model.core.Pixels pixels, ome.util.PixelData data)
Constructor that sub-classes must call.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ome.util.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()
Returnstrue
if the plane is anXY-plane
,false
otherwise.
-
-
-
Field Detail
-
planeDef
protected omeis.providers.re.data.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.
-
signed
protected boolean signed
The sign of the type
-
slice
protected int slice
The slice we're working with
-
-
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. (Sox1
isx
andx2
isy
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()
Returnstrue
if the plane is anXY-plane
,false
otherwise.- Returns:
- See above.
-
getData
public ome.util.PixelData getData()
Returns the pixel data that is used to back this Plane.- Returns:
- See above.
-
-