net.sourceforge.jiu.data
Class MemoryGray16Image
- Gray16Image, GrayImage, GrayIntegerImage, IntegerImage, PixelImage, ShortChannelImage
public class MemoryGray16Image
An implementation of
Gray16Image
that keeps the complete image in memory.
This class inherits most of its functionality from its parent class
MemoryShortChannelImage
, using one
short
channel.
MemoryGray16Image(int width, int height) - Creates a new MemoryGray16Image object with the specified resolution.
|
PixelImage | createCompatibleImage(int width, int height)
|
Class | getImageType()
|
boolean | isBlack(int x, int y) - Returns if the pixel specified by the location in the arguments is black.
|
boolean | isWhite(int x, int y) - Returns if the pixel specified by the location in the arguments is white.
|
void | putBlack(int x, int y) - Sets a pixel to black (minimum intensity value).
|
void | putWhite(int x, int y) - Sets a pixel to white (maximum intensity value).
|
checkPositionAndNumber , clear , clear , clear , clear , createCompatibleImage , createCopy , getAllocatedMemory , getBitsPerPixel , getHeight , getMaxSample , getNumChannels , getSample , getSample , getSamples , getShortSample , getShortSample , getShortSamples , getWidth , putSample , putSample , putSamples , putShortSample , putShortSample , putShortSamples |
MemoryGray16Image
public MemoryGray16Image(int width,
int height)
Creates a new MemoryGray16Image object with the specified resolution.
Simply gives
1
(for one channel) and the two resolution arguments
to the super constructor (of the parent class
MemoryShortChannelImage
).
width
- the horizontal resolution, must be larger than zeroheight
- the vertical resolution, must be larger than zero
isBlack
public boolean isBlack(int x,
int y)
Returns if the pixel specified by the location in the arguments is black.
- isBlack in interface GrayImage
x
- the horizontal location of the pixely
- the vertical location of the pixel
isWhite
public boolean isWhite(int x,
int y)
Returns if the pixel specified by the location in the arguments is white.
- isWhite in interface GrayImage
x
- the horizontal location of the pixely
- the vertical location of the pixel
putBlack
public void putBlack(int x,
int y)
Sets a pixel to black (minimum intensity value).
- putBlack in interface GrayImage
x
- horizontal position of the pixel's locationy
- vertical position of the pixel's location
putWhite
public void putWhite(int x,
int y)
Sets a pixel to white (maximum intensity value).
- putWhite in interface GrayImage
x
- horizontal position of the pixel's locationy
- vertical position of the pixel's location