Class PlaneSlicingContext


  • public class PlaneSlicingContext
    extends CodomainMapContext
    We consider that the image is composed of eight 1-bit planes ranging from bit-plane 0 for the least significant bit to bit-plane 7 for the most significant bit. The BIT_* constants cannot be modified b/c they have a meaning.
    Since:
    OME2.2
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int BIT_EIGHT
      Identifies the bit-plane 8 i.e.
      static int BIT_FIVE
      Identifies the bit-plane 5 i.e.
      static int BIT_FOUR
      Identifies the bit-plane 4 i.e.
      static int BIT_ONE
      Identifies the bit-plane 1 i.e.
      static int BIT_SEVEN
      Identifies the bit-plane 7 i.e.
      static int BIT_SIX
      Identifies the bit-plane 6 i.e.
      static int BIT_THREE
      Identifies the bit-plane 3 i.e.
      static int BIT_TWO
      Identifies the bit-plane 2 i.e.
      static int BIT_ZERO
      Identifies the bit-plane 0 i.e.
    • Constructor Summary

      Constructors 
      Constructor Description
      PlaneSlicingContext​(int planePrevious, int planeSelected, boolean constant)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      CodomainMapContext copy()
      Implemented as specified by superclass.
      int getLowerLimit()
      Returns the constant level for bit-planes < planeSelected w.r.t the higher-order bits.
      int getPlanePrevious()
      Returns the value corresponding to the index of the bit-plane ranged just before the one selected.
      int getPlaneSelected()
      Returns the value corresponding to the index of the selected bit-plane.
      int getUpperLimit()
      Returns the constant level for bit-planes > planeSelected w.r.t the higher-order bits.
      boolean IsConstant()
      Returns the type of bit-planes mapping.
      void setConstant​(boolean b)
      Sets the type of mapping.
      void setLimits​(int lowerLimit, int upperLimit)
      Set the limits.
      void setLowerLimit​(int v)
      Sets the value (in [intervalStart, intervalEnd]) used to set the level of the bit-plane < bit-plane selected.
      void setPlanes​(int planePrevious, int planeSelected)
      Sets the value of the selected planes i.e.
      void setUpperLimit​(int v)
      Sets the value (in [intervalStart, intervalEnd]) used to set the level of the bit-plane > bit-plane selected.
      • Methods inherited from class java.lang.Object

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

      • BIT_ZERO

        public static final int BIT_ZERO
        Identifies the bit-plane 0 i.e. 2^1-1 value.
        See Also:
        Constant Field Values
      • BIT_ONE

        public static final int BIT_ONE
        Identifies the bit-plane 1 i.e. 2^1 value.
        See Also:
        Constant Field Values
      • BIT_TWO

        public static final int BIT_TWO
        Identifies the bit-plane 2 i.e. 2^2 value.
        See Also:
        Constant Field Values
      • BIT_THREE

        public static final int BIT_THREE
        Identifies the bit-plane 3 i.e. 2^3 value.
        See Also:
        Constant Field Values
      • BIT_FOUR

        public static final int BIT_FOUR
        Identifies the bit-plane 4 i.e. 2^4 value.
        See Also:
        Constant Field Values
      • BIT_FIVE

        public static final int BIT_FIVE
        Identifies the bit-plane 5 i.e. 2^5 value.
        See Also:
        Constant Field Values
      • BIT_SIX

        public static final int BIT_SIX
        Identifies the bit-plane 6 i.e. 2^6 value.
        See Also:
        Constant Field Values
      • BIT_SEVEN

        public static final int BIT_SEVEN
        Identifies the bit-plane 7 i.e. 2^7 value.
        See Also:
        Constant Field Values
      • BIT_EIGHT

        public static final int BIT_EIGHT
        Identifies the bit-plane 8 i.e. 2^8-1 value.
        See Also:
        Constant Field Values
    • Constructor Detail

      • PlaneSlicingContext

        public PlaneSlicingContext​(int planePrevious,
                                   int planeSelected,
                                   boolean constant)
        Creates a new instance.
        Parameters:
        planePrevious - The value corresponding to the index of the bit-plane ranged just before the one selected.
        planeSelected - The value corresponding to the index of the selected bit-plane.
        constant - Passed false if the bit-planes aren't mapped to a specified level true otherwise.
    • Method Detail

      • getPlanePrevious

        public int getPlanePrevious()
        Returns the value corresponding to the index of the bit-plane ranged just before the one selected.
        Returns:
        See above.
      • getPlaneSelected

        public int getPlaneSelected()
        Returns the value corresponding to the index of the selected bit-plane.
        Returns:
        See above.
      • IsConstant

        public boolean IsConstant()
        Returns the type of bit-planes mapping. Returns false if the bit-planes aren't mapped to a specified level true otherwise.
        Returns:
        See above.
      • getLowerLimit

        public int getLowerLimit()
        Returns the constant level for bit-planes < planeSelected w.r.t the higher-order bits.
        Returns:
        See above.
      • getUpperLimit

        public int getUpperLimit()
        Returns the constant level for bit-planes > planeSelected w.r.t the higher-order bits.
        Returns:
        See above.
      • setLimits

        public void setLimits​(int lowerLimit,
                              int upperLimit)
        Set the limits.
        Parameters:
        lowerLimit - The value (in [intervalStart, intervalEnd]) used to set the level of the bit-plane < bit-plane selected.
        upperLimit - The value (in [intervalStart, intervalEnd]) used to set the level of the bit-plane > bit-plane selected.
      • setLowerLimit

        public void setLowerLimit​(int v)
        Sets the value (in [intervalStart, intervalEnd]) used to set the level of the bit-plane < bit-plane selected.
        Parameters:
        v - The value to set.
      • setUpperLimit

        public void setUpperLimit​(int v)
        Sets the value (in [intervalStart, intervalEnd]) used to set the level of the bit-plane > bit-plane selected.
        Parameters:
        v - The value to set.
      • setPlanes

        public void setPlanes​(int planePrevious,
                              int planeSelected)
        Sets the value of the selected planes i.e. the previous plane and the selected one.
        Parameters:
        planePrevious - The plane to set.
        planeSelected - The plane to set.
        Throws:
        java.lang.IllegalArgumentException - If the value of the previous is not greater than the value of the selected one.
      • setConstant

        public void setConstant​(boolean b)
        Sets the type of mapping.
        Parameters:
        b - The value to set.