jjil.core
Class Gray8MaskedImage

java.lang.Object
  extended by jjil.core.Image
      extended by jjil.core.Gray8Image
          extended by jjil.core.Gray8MaskedImage

public class Gray8MaskedImage
extends Gray8Image

Gray8MaskedImage is the image type used to store a signed 8-bit image and its associated mask. Mask value = Byte.MIN_VALUE is considered to be unmasked; all other values are masked.

Author:
webb

Constructor Summary
Gray8MaskedImage(Gray8Image imData, Gray8Image imMask)
          Creates a new instance of Gray8MaskedImage from an existing image and mask.
Gray8MaskedImage(int cWidth, int cHeight)
          Creates a new instance of Gray8MaskedImage
 
Method Summary
 Image clone()
          Copy this image
 Gray8Image getImage()
          Returns the input Gray8Image.
 Gray8Image getMask()
          Get the image mask, a Gray8Image.
 byte[] getMaskData()
          Return a pointer to the mask data.
 java.lang.String toString()
          Return a string describing the image.
 
Methods inherited from class jjil.core.Gray8Image
getData
 
Methods inherited from class jjil.core.Image
getHeight, getWidth
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Gray8MaskedImage

public Gray8MaskedImage(int cWidth,
                        int cHeight)
Creates a new instance of Gray8MaskedImage

Parameters:
cWidth - Width of the image (columns).
cHeight - Height of the image (rows)

Gray8MaskedImage

public Gray8MaskedImage(Gray8Image imData,
                        Gray8Image imMask)
                 throws Error
Creates a new instance of Gray8MaskedImage from an existing image and mask.

Parameters:
imData - the data image.
imMask - the mask
Throws:
Error - If either input is not a Gray8Image or the sizes are not the same.
Method Detail

clone

public Image clone()
Copy this image

Overrides:
clone in class Gray8Image
Returns:
the image copy.

getImage

public Gray8Image getImage()
Returns the input Gray8Image.

Returns:
the input image

getMask

public Gray8Image getMask()
Get the image mask, a Gray8Image.

Returns:
the input mask

getMaskData

public byte[] getMaskData()
Return a pointer to the mask data.

Returns:
the data pointer.

toString

public java.lang.String toString()
Return a string describing the image.

Overrides:
toString in class Gray8Image
Returns:
the string.