ByteChannelImage
, Gray8Image
, GrayImage
, GrayIntegerImage
, IntegerImage
, PixelImage
public class MemoryGray8Image extends MemoryByteChannelImage implements Gray8Image
Gray8Image
that keeps the complete image in memory.
This class inherits most of its functionality from its parent class
MemoryByteChannelImage
, using one byte channel.Constructor | Description |
---|---|
MemoryGray8Image(int width,
int height) |
Creates a new MemoryGray8Image object with the specified resolution.
|
Modifier and Type | Method | Description |
---|---|---|
PixelImage |
createCompatibleImage(int width,
int height) |
Creates an instance of the same class as this one, with width and height
given by the arguments.
|
Class |
getImageType() |
If there is a single interface or class that describes the image data type
of this class, the
Class object associated with that
interface (or class) is returned (or null otherwise). |
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).
|
clear, clear, getByteSample, getByteSample, getByteSamples, putByteSample, putByteSample, putByteSamples
clear, clear, getMaxSample, getSample, getSample, getSamples, putSample, putSample, putSamples
checkPositionAndNumber, clear, clear, clear, clear, createCopy, getAllocatedMemory, getBitsPerPixel, getByteSample, getByteSample, getByteSamples, getHeight, getMaxSample, getNumChannels, getSample, getSample, getSamples, getWidth, putByteSample, putByteSample, putByteSamples, putSample, putSample, putSamples
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createCopy, getAllocatedMemory, getBitsPerPixel, getHeight, getNumChannels, getWidth
public MemoryGray8Image(int width, int height)
1
(for one channel) and the two resolution arguments
to the super constructor (of the parent class MemoryByteChannelImage
).width
- the horizontal resolution, must be non-zero and positiveheight
- the vertical resolution, must be non-zero and positivepublic PixelImage createCompatibleImage(int width, int height)
PixelImage
createCompatibleImage
in interface PixelImage
createCompatibleImage
in class MemoryByteChannelImage
width
- the horizontal resolution of the new imageheight
- the vertical resolution of the new imagepublic Class getImageType()
PixelImage
Class
object associated with that
interface (or class) is returned (or null
otherwise).
This Class
object, if available for two image objects,
can be used to find out if they are compatible.
Example: MemoryGray8Image
returns
net.sourceforge.jiu.data.Gray8Image.class
.getImageType
in interface PixelImage
public boolean isBlack(int x, int y)
GrayImage
public boolean isWhite(int x, int y)
GrayImage
public void putBlack(int x, int y)
GrayImage