Class 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 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

      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()
      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 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
    • Constructor Detail

      • Plane2D

        public Plane2D​(omeis.providers.re.data.PlaneDef pDef,
                       ome.model.core.Pixels pixels,
                       ome.util.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 ome.util.PixelData getData()
        Returns the pixel data that is used to back this Plane.
        Returns:
        See above.