Class RookIterFallback

Object
RookIterFallback
All Implemented Interfaces:
RectIter, RookIter
Direct Known Subclasses:
WritableRookIterFallback

public class RookIterFallback extends Object implements RookIter
Since:
EA2
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Sets the iterator to the last band of the image.
    void
    Sets the iterator to the last line of its bounding rectangle.
    void
    Sets the iterator to the rightmost pixel of its bounding rectangle.
    boolean
    Returns true if the max band in the image has been exceeded.
    boolean
    Returns true if the bottom row of the bounding rectangle has been passed.
    boolean
     
    boolean
    Returns true if the right edge of the bounding rectangle has been passed.
    boolean
     
    double[]
    getPixel(double[] dArray)
    Returns the samples of the current pixel from the image in an array of double.
    float[]
    getPixel(float[] fArray)
    Returns the samples of the current pixel from the image in an array of float.
    int[]
    getPixel(int[] iArray)
    Returns the samples of the current pixel from the image in an array of int.
    int
    Returns the current sample as an integer.
    int
    getSample(int b)
    Returns the specified sample of the current pixel as an integer.
    double
    Returns the current sample as a double.
    double
    Returns the specified sample of the current pixel as a double.
    float
    Returns the current sample as a float.
    float
    Returns the specified sample of the current pixel as a float.
    void
    jumpLines(int num)
    Jumps downward num lines from the current position.
    void
    jumpPixels(int num)
    Jumps rightward num pixels from the current position.
    void
    Sets the iterator to the next band in the image.
    boolean
    Sets the iterator to the next band in the image, and returns true if the max band has been exceeded.
    void
    Sets the iterator to the next line of the image.
    boolean
    Sets the iterator to the next line in the image, and returns true if the bottom row of the bounding rectangle has been passed.
    void
    Sets the iterator to the next pixel in image (that is, move rightward).
    boolean
    Sets the iterator to the next pixel in the image (that is, move rightward).
    void
    Sets the iterator to the previous band in the image.
    boolean
    Sets the iterator to the previous band in the image, and returns true if the min band has been exceeded.
    void
    Sets the iterator to the previous line of the image.
    boolean
    Sets the iterator to the previous line in the image, and returns true if the top row of the bounding rectangle has been passed.
    void
    Sets the iterator to the previous pixel in the image (that is, move leftward).
    boolean
    Sets the iterator to the previous pixel in the image (that is, move leftward).
    void
    Sets the iterator to the first band of the image.
    void
    Sets the iterator to the first line of its bounding rectangle.
    void
    Sets the iterator to the leftmost pixel of its bounding rectangle.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • startLines

      public void startLines()
      Description copied from interface: RectIter
      Sets the iterator to the first line of its bounding rectangle. The pixel and band offsets are unchanged.
      Specified by:
      startLines in interface RectIter
    • endLines

      public void endLines()
      Description copied from interface: RookIter
      Sets the iterator to the last line of its bounding rectangle. The pixel and band offsets are unchanged.
      Specified by:
      endLines in interface RookIter
    • nextLine

      public void nextLine()
      Description copied from interface: RectIter
      Sets the iterator to the next line of the image. The pixel and band offsets are unchanged. If the iterator passes the bottom line of the rectangles, calls to get() methods are not valid.
      Specified by:
      nextLine in interface RectIter
    • prevLine

      public void prevLine()
      Description copied from interface: RookIter
      Sets the iterator to the previous line of the image. The pixel and band offsets are unchanged. If the iterator passes the top line of the rectangle, calls to get() methods are not valid.
      Specified by:
      prevLine in interface RookIter
    • jumpLines

      public void jumpLines(int num)
      Description copied from interface: RectIter
      Jumps downward num lines from the current position. Num may be negative. The pixel and band offsets are unchanged. If the position after the jump is outside of the iterator's bounding box, an IndexOutOfBoundsException will be thrown and the position will be unchanged.
      Specified by:
      jumpLines in interface RectIter
    • finishedLines

      public boolean finishedLines()
      Description copied from interface: RectIter
      Returns true if the bottom row of the bounding rectangle has been passed.
      Specified by:
      finishedLines in interface RectIter
    • finishedLinesTop

      public boolean finishedLinesTop()
    • nextLineDone

      public boolean nextLineDone()
      Description copied from interface: RectIter
      Sets the iterator to the next line in the image, and returns true if the bottom row of the bounding rectangle has been passed.
      Specified by:
      nextLineDone in interface RectIter
    • prevLineDone

      public boolean prevLineDone()
      Description copied from interface: RookIter
      Sets the iterator to the previous line in the image, and returns true if the top row of the bounding rectangle has been passed.
      Specified by:
      prevLineDone in interface RookIter
    • startPixels

      public void startPixels()
      Description copied from interface: RectIter
      Sets the iterator to the leftmost pixel of its bounding rectangle. The line and band offsets are unchanged.
      Specified by:
      startPixels in interface RectIter
    • endPixels

      public void endPixels()
      Description copied from interface: RookIter
      Sets the iterator to the rightmost pixel of its bounding rectangle. The line and band offsets are unchanged.
      Specified by:
      endPixels in interface RookIter
    • nextPixel

      public void nextPixel()
      Description copied from interface: RectIter
      Sets the iterator to the next pixel in image (that is, move rightward). The line and band offsets are unchanged.

      This method may be used in conjunction with the method finishedPixels. Or the method nextPixelDone, which sets the iterator to the next pixel and checks the bound, may be used instead of this method.

      Specified by:
      nextPixel in interface RectIter
    • prevPixel

      public void prevPixel()
      Description copied from interface: RookIter
      Sets the iterator to the previous pixel in the image (that is, move leftward). The line and band offsets are unchanged.
      Specified by:
      prevPixel in interface RookIter
    • jumpPixels

      public void jumpPixels(int num)
      Description copied from interface: RectIter
      Jumps rightward num pixels from the current position. Num may be negative. The line and band offsets are unchanged. If the position after the jump is outside of the iterator's bounding box, an IndexOutOfBoundsException will be thrown and the position will be unchanged.
      Specified by:
      jumpPixels in interface RectIter
    • finishedPixels

      public boolean finishedPixels()
      Description copied from interface: RectIter
      Returns true if the right edge of the bounding rectangle has been passed.
      Specified by:
      finishedPixels in interface RectIter
    • finishedPixelsLeft

      public boolean finishedPixelsLeft()
    • nextPixelDone

      public boolean nextPixelDone()
      Description copied from interface: RectIter
      Sets the iterator to the next pixel in the image (that is, move rightward). Returns true if the right edge of the bounding rectangle has been passed. The line and band offsets are unchanged.
      Specified by:
      nextPixelDone in interface RectIter
    • prevPixelDone

      public boolean prevPixelDone()
      Description copied from interface: RookIter
      Sets the iterator to the previous pixel in the image (that is, move leftward). Returns true if the left edge of the bounding rectangle has been passed. The line and band offsets are unchanged.
      Specified by:
      prevPixelDone in interface RookIter
    • startBands

      public void startBands()
      Description copied from interface: RectIter
      Sets the iterator to the first band of the image. The pixel column and line are unchanged.
      Specified by:
      startBands in interface RectIter
    • endBands

      public void endBands()
      Description copied from interface: RookIter
      Sets the iterator to the last band of the image. The pixel column and line are unchanged.
      Specified by:
      endBands in interface RookIter
    • prevBand

      public void prevBand()
      Description copied from interface: RookIter
      Sets the iterator to the previous band in the image. The pixel column and line are unchanged.
      Specified by:
      prevBand in interface RookIter
    • nextBand

      public void nextBand()
      Description copied from interface: RectIter
      Sets the iterator to the next band in the image. The pixel column and line are unchanged.
      Specified by:
      nextBand in interface RectIter
    • prevBandDone

      public boolean prevBandDone()
      Description copied from interface: RookIter
      Sets the iterator to the previous band in the image, and returns true if the min band has been exceeded. The pixel column and line are unchanged.
      Specified by:
      prevBandDone in interface RookIter
    • nextBandDone

      public boolean nextBandDone()
      Description copied from interface: RectIter
      Sets the iterator to the next band in the image, and returns true if the max band has been exceeded. The pixel column and line are unchanged.
      Specified by:
      nextBandDone in interface RectIter
    • finishedBands

      public boolean finishedBands()
      Description copied from interface: RectIter
      Returns true if the max band in the image has been exceeded.
      Specified by:
      finishedBands in interface RectIter
    • getSample

      public int getSample()
      Description copied from interface: RectIter
      Returns the current sample as an integer.
      Specified by:
      getSample in interface RectIter
    • getSample

      public int getSample(int b)
      Description copied from interface: RectIter
      Returns the specified sample of the current pixel as an integer.
      Specified by:
      getSample in interface RectIter
      Parameters:
      b - the band index of the desired sample.
    • getSampleFloat

      public float getSampleFloat()
      Description copied from interface: RectIter
      Returns the current sample as a float.
      Specified by:
      getSampleFloat in interface RectIter
    • getSampleFloat

      public float getSampleFloat(int b)
      Description copied from interface: RectIter
      Returns the specified sample of the current pixel as a float.
      Specified by:
      getSampleFloat in interface RectIter
      Parameters:
      b - the band index of the desired sample.
    • getSampleDouble

      public double getSampleDouble()
      Description copied from interface: RectIter
      Returns the current sample as a double.
      Specified by:
      getSampleDouble in interface RectIter
    • getSampleDouble

      public double getSampleDouble(int b)
      Description copied from interface: RectIter
      Returns the specified sample of the current pixel as a double.
      Specified by:
      getSampleDouble in interface RectIter
      Parameters:
      b - the band index of the desired sample.
    • getPixel

      public int[] getPixel(int[] iArray)
      Description copied from interface: RectIter
      Returns the samples of the current pixel from the image in an array of int.
      Specified by:
      getPixel in interface RectIter
      Parameters:
      iArray - An optionally preallocated int array.
      Returns:
      the contents of the pixel as an int array.
    • getPixel

      public float[] getPixel(float[] fArray)
      Description copied from interface: RectIter
      Returns the samples of the current pixel from the image in an array of float.
      Specified by:
      getPixel in interface RectIter
      Parameters:
      fArray - An optionally preallocated float array.
      Returns:
      the contents of the pixel as a float array.
    • getPixel

      public double[] getPixel(double[] dArray)
      Description copied from interface: RectIter
      Returns the samples of the current pixel from the image in an array of double.
      Specified by:
      getPixel in interface RectIter
      Parameters:
      dArray - An optionally preallocated double array.
      Returns:
      the contents of the pixel as a double array.