Class image2DInt
java.lang.Object
|
+--image
|
+--image2DInt
- public class image2DInt
- extends image
Image representation consisting of a 2d int array (where (0,0) is
the top-left corner of the image and (1,0) is the adjacent pixel
to the right of (0,0) and (0,1) is the adjacent pixel to the bottom of
(0,0).
Constructor Summary |
image2DInt()
No argument constructor, sets all variables to 0. |
image2DInt(image oldImage)
Constructor that makes an image2DInt image representation by
either making an identical copy of an existing image2DInt or by
converting a different image representation. |
image2DInt(int width,
int height,
int[] values)
Constructor that takes a 1d int array and generates an image2DInt
from it. |
image2DInt(int width,
int height,
int[][] values)
Constructor that takes all the individual data structures and
combines them to form an image representation. |
Method Summary |
int[] |
getValues()
Returns an integer array of grey level values by converting the
internal 2d array. |
int[][] |
getValues2D()
Returns the pixel values in 2d int array form by simply returning
values (the internal 2d array). |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
image2DInt
public image2DInt()
- No argument constructor, sets all variables to 0.
image2DInt
public image2DInt(int width,
int height,
int[][] values)
- Constructor that takes all the individual data structures and
combines them to form an image representation.
- Parameters:
width
- of the imageheight
- of the image
image2DInt
public image2DInt(int width,
int height,
int[] values)
- Constructor that takes a 1d int array and generates an image2DInt
from it.
- Parameters:
width
- of the imageheight
- of the image
image2DInt
public image2DInt(image oldImage)
- Constructor that makes an image2DInt image representation by
either making an identical copy of an existing image2DInt or by
converting a different image representation.
- Parameters:
oldImage
- the existing image
getValues
public int[] getValues()
- Returns an integer array of grey level values by converting the
internal 2d array.
- Returns:
- the integer array of grey level values
- Overrides:
- getValues in class image
getValues2D
public int[][] getValues2D()
- Returns the pixel values in 2d int array form by simply returning
values (the internal 2d array).