Class RookIterFallback
Object
RookIterFallback
- Direct Known Subclasses:
WritableRookIterFallback
- Since:
- EA2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidendBands()Sets the iterator to the last band of the image.voidendLines()Sets the iterator to the last line of its bounding rectangle.voidSets the iterator to the rightmost pixel of its bounding rectangle.booleanReturns true if the max band in the image has been exceeded.booleanReturns true if the bottom row of the bounding rectangle has been passed.booleanbooleanReturns true if the right edge of the bounding rectangle has been passed.booleandouble[]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.intReturns the current sample as an integer.intgetSample(int b) Returns the specified sample of the current pixel as an integer.doubleReturns the current sample as a double.doublegetSampleDouble(int b) Returns the specified sample of the current pixel as a double.floatReturns the current sample as a float.floatgetSampleFloat(int b) Returns the specified sample of the current pixel as a float.voidjumpLines(int num) Jumps downward num lines from the current position.voidjumpPixels(int num) Jumps rightward num pixels from the current position.voidnextBand()Sets the iterator to the next band in the image.booleanSets the iterator to the next band in the image, and returns true if the max band has been exceeded.voidnextLine()Sets the iterator to the next line of the image.booleanSets the iterator to the next line in the image, and returns true if the bottom row of the bounding rectangle has been passed.voidSets the iterator to the next pixel in image (that is, move rightward).booleanSets the iterator to the next pixel in the image (that is, move rightward).voidprevBand()Sets the iterator to the previous band in the image.booleanSets the iterator to the previous band in the image, and returns true if the min band has been exceeded.voidprevLine()Sets the iterator to the previous line of the image.booleanSets the iterator to the previous line in the image, and returns true if the top row of the bounding rectangle has been passed.voidSets the iterator to the previous pixel in the image (that is, move leftward).booleanSets the iterator to the previous pixel in the image (that is, move leftward).voidSets the iterator to the first band of the image.voidSets the iterator to the first line of its bounding rectangle.voidSets the iterator to the leftmost pixel of its bounding rectangle.
-
Constructor Details
-
RookIterFallback
-
-
Method Details
-
startLines
public void startLines()Description copied from interface:RectIterSets the iterator to the first line of its bounding rectangle. The pixel and band offsets are unchanged.- Specified by:
startLinesin interfaceRectIter
-
endLines
public void endLines()Description copied from interface:RookIterSets the iterator to the last line of its bounding rectangle. The pixel and band offsets are unchanged. -
nextLine
public void nextLine()Description copied from interface:RectIterSets 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. -
prevLine
public void prevLine()Description copied from interface:RookIterSets 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. -
jumpLines
public void jumpLines(int num) Description copied from interface:RectIterJumps 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, anIndexOutOfBoundsExceptionwill be thrown and the position will be unchanged. -
finishedLines
public boolean finishedLines()Description copied from interface:RectIterReturns true if the bottom row of the bounding rectangle has been passed.- Specified by:
finishedLinesin interfaceRectIter
-
finishedLinesTop
public boolean finishedLinesTop() -
nextLineDone
public boolean nextLineDone()Description copied from interface:RectIterSets 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:
nextLineDonein interfaceRectIter
-
prevLineDone
public boolean prevLineDone()Description copied from interface:RookIterSets 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:
prevLineDonein interfaceRookIter
-
startPixels
public void startPixels()Description copied from interface:RectIterSets the iterator to the leftmost pixel of its bounding rectangle. The line and band offsets are unchanged.- Specified by:
startPixelsin interfaceRectIter
-
endPixels
public void endPixels()Description copied from interface:RookIterSets the iterator to the rightmost pixel of its bounding rectangle. The line and band offsets are unchanged. -
nextPixel
public void nextPixel()Description copied from interface:RectIterSets 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 methodnextPixelDone, which sets the iterator to the next pixel and checks the bound, may be used instead of this method. -
prevPixel
public void prevPixel()Description copied from interface:RookIterSets the iterator to the previous pixel in the image (that is, move leftward). The line and band offsets are unchanged. -
jumpPixels
public void jumpPixels(int num) Description copied from interface:RectIterJumps 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, anIndexOutOfBoundsExceptionwill be thrown and the position will be unchanged.- Specified by:
jumpPixelsin interfaceRectIter
-
finishedPixels
public boolean finishedPixels()Description copied from interface:RectIterReturns true if the right edge of the bounding rectangle has been passed.- Specified by:
finishedPixelsin interfaceRectIter
-
finishedPixelsLeft
public boolean finishedPixelsLeft() -
nextPixelDone
public boolean nextPixelDone()Description copied from interface:RectIterSets 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:
nextPixelDonein interfaceRectIter
-
prevPixelDone
public boolean prevPixelDone()Description copied from interface:RookIterSets 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:
prevPixelDonein interfaceRookIter
-
startBands
public void startBands()Description copied from interface:RectIterSets the iterator to the first band of the image. The pixel column and line are unchanged.- Specified by:
startBandsin interfaceRectIter
-
endBands
public void endBands()Description copied from interface:RookIterSets the iterator to the last band of the image. The pixel column and line are unchanged. -
prevBand
public void prevBand()Description copied from interface:RookIterSets the iterator to the previous band in the image. The pixel column and line are unchanged. -
nextBand
public void nextBand()Description copied from interface:RectIterSets the iterator to the next band in the image. The pixel column and line are unchanged. -
prevBandDone
public boolean prevBandDone()Description copied from interface:RookIterSets 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:
prevBandDonein interfaceRookIter
-
nextBandDone
public boolean nextBandDone()Description copied from interface:RectIterSets 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:
nextBandDonein interfaceRectIter
-
finishedBands
public boolean finishedBands()Description copied from interface:RectIterReturns true if the max band in the image has been exceeded.- Specified by:
finishedBandsin interfaceRectIter
-
getSample
public int getSample()Description copied from interface:RectIterReturns the current sample as an integer. -
getSample
public int getSample(int b) Description copied from interface:RectIterReturns the specified sample of the current pixel as an integer. -
getSampleFloat
public float getSampleFloat()Description copied from interface:RectIterReturns the current sample as a float.- Specified by:
getSampleFloatin interfaceRectIter
-
getSampleFloat
public float getSampleFloat(int b) Description copied from interface:RectIterReturns the specified sample of the current pixel as a float.- Specified by:
getSampleFloatin interfaceRectIter- Parameters:
b- the band index of the desired sample.
-
getSampleDouble
public double getSampleDouble()Description copied from interface:RectIterReturns the current sample as a double.- Specified by:
getSampleDoublein interfaceRectIter
-
getSampleDouble
public double getSampleDouble(int b) Description copied from interface:RectIterReturns the specified sample of the current pixel as a double.- Specified by:
getSampleDoublein interfaceRectIter- Parameters:
b- the band index of the desired sample.
-
getPixel
public int[] getPixel(int[] iArray) Description copied from interface:RectIterReturns the samples of the current pixel from the image in an array of int. -
getPixel
public float[] getPixel(float[] fArray) Description copied from interface:RectIterReturns the samples of the current pixel from the image in an array of float. -
getPixel
public double[] getPixel(double[] dArray) Description copied from interface:RectIterReturns the samples of the current pixel from the image in an array of double.
-