Class ContrastStretchingContext


  • public class ContrastStretchingContext
    extends CodomainMapContext
    Two points pStart and pEnd define the context of this transformation. We determine the equations of 3 lines (segments to be correct). The first one is a line between the point with coordinates (intervalStart, intervalStart) and (xStart, yStart). The second one between (xStart, yStart) and (xEnd, yEnd). The third one between (xEnd, yEnd) and (intervalEnd, intervalEnd).
    Since:
    OME2.2
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      CodomainMapContext copy()
      Implemented as specified by superclass.
      double getA0()
      Returns the slope of the first line.
      double getA1()
      Returns the slope of the second line.
      double getA2()
      Returns the slope of the third line.
      double getB0()
      Returns the y-intercept of the first line.
      double getB1()
      Returns the y-intercept of the second line.
      double getB2()
      Returns the y-intercept of the third line.
      int getXEnd()
      Returns the x-coordinate of the pEnd point.
      int getXStart()
      Returns the x-coordinate of the pStart point.
      int getYEnd()
      Returns the y-coordinate of the pEnd point.
      int getYStart()
      Returns the y-coordinate of the pStart point.
      void setCoordinates​(int xStart, int yStart, int xEnd, int yEnd)
      Sets the coordinates of the points used to determine the equations of the lines.
      void setXEnd​(int v)
      Sets the x-coodinate of the pEnd point.
      void setXStart​(int v)
      Sets the x-coodinate of the pStart point.
      void setYEnd​(int v)
      Sets the y-coodinate of the pEnd point.
      void setYStart​(int v)
      Sets the y-coodinate of the pStart point.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ContrastStretchingContext

        public ContrastStretchingContext()
    • Method Detail

      • setCoordinates

        public void setCoordinates​(int xStart,
                                   int yStart,
                                   int xEnd,
                                   int yEnd)
        Sets the coordinates of the points used to determine the equations of the lines.
        Parameters:
        xStart - The x-coodinate of the pStart point.
        yStart - The y-coodinate of the pStart point.
        xEnd - The x-coodinate of the pEnd point.
        yEnd - The y-coodinate of the pEnd point.
      • setXStart

        public void setXStart​(int v)
        Sets the x-coodinate of the pStart point.
        Parameters:
        v - The value to set.
      • setXEnd

        public void setXEnd​(int v)
        Sets the x-coodinate of the pEnd point.
        Parameters:
        v - The value to set.
      • setYStart

        public void setYStart​(int v)
        Sets the y-coodinate of the pStart point.
        Parameters:
        v - The value to set.
      • setYEnd

        public void setYEnd​(int v)
        Sets the y-coodinate of the pEnd point.
        Parameters:
        v - The value to set.
      • getXEnd

        public int getXEnd()
        Returns the x-coordinate of the pEnd point.
        Returns:
        See above.
      • getXStart

        public int getXStart()
        Returns the x-coordinate of the pStart point.
        Returns:
        See above.
      • getYEnd

        public int getYEnd()
        Returns the y-coordinate of the pEnd point.
        Returns:
        See above.
      • getYStart

        public int getYStart()
        Returns the y-coordinate of the pStart point.
        Returns:
        See above.
      • getA0

        public double getA0()
        Returns the slope of the first line.
        Returns:
        See above.
      • getA1

        public double getA1()
        Returns the slope of the second line.
        Returns:
        See above.
      • getA2

        public double getA2()
        Returns the slope of the third line.
        Returns:
        See above.
      • getB0

        public double getB0()
        Returns the y-intercept of the first line.
        Returns:
        See above.
      • getB1

        public double getB1()
        Returns the y-intercept of the second line.
        Returns:
        See above.
      • getB2

        public double getB2()
        Returns the y-intercept of the third line.
        Returns:
        See above.