Package net.sourceforge.jiu.data
Class MemoryGray16Image
java.lang.Object
net.sourceforge.jiu.data.MemoryShortChannelImage
net.sourceforge.jiu.data.MemoryGray16Image
- All Implemented Interfaces:
Gray16Image,GrayImage,GrayIntegerImage,IntegerImage,PixelImage,ShortChannelImage
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.- Since:
- 0.11.0
- Author:
- Marco Schmidt
-
Constructor Summary
ConstructorsConstructorDescriptionMemoryGray16Image(int width, int height) Creates a new MemoryGray16Image object with the specified resolution. -
Method Summary
Modifier and TypeMethodDescriptioncreateCompatibleImage(int width, int height) Creates an instance of the same class as this one, with width and height given by the arguments.If there is a single interface or class that describes the image data type of this class, theClassobject associated with that interface (or class) is returned (ornullotherwise).booleanisBlack(int x, int y) Returns if the pixel specified by the location in the arguments is black.booleanisWhite(int x, int y) Returns if the pixel specified by the location in the arguments is white.voidputBlack(int x, int y) Sets a pixel to black (minimum intensity value).voidputWhite(int x, int y) Sets a pixel to white (maximum intensity value).Methods inherited from class net.sourceforge.jiu.data.MemoryShortChannelImage
checkPositionAndNumber, clear, clear, clear, clear, createCopy, getAllocatedMemory, getBitsPerPixel, getHeight, getMaxSample, getNumChannels, getSample, getSample, getSamples, getShortSample, getShortSample, getShortSamples, getWidth, putSample, putSample, putSamples, putShortSample, putShortSample, putShortSamplesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sourceforge.jiu.data.IntegerImage
clear, clear, getMaxSample, getSample, getSample, getSamples, putSample, putSample, putSamplesMethods inherited from interface net.sourceforge.jiu.data.PixelImage
createCopy, getAllocatedMemory, getBitsPerPixel, getHeight, getNumChannels, getWidthMethods inherited from interface net.sourceforge.jiu.data.ShortChannelImage
clear, clear, getShortSample, getShortSample, getShortSamples, putShortSample, putShortSample, putShortSamples
-
Constructor Details
-
MemoryGray16Image
public MemoryGray16Image(int width, int height) Creates a new MemoryGray16Image object with the specified resolution. Simply gives1(for one channel) and the two resolution arguments to the super constructor (of the parent classMemoryShortChannelImage).- Parameters:
width- the horizontal resolution, must be larger than zeroheight- the vertical resolution, must be larger than zero
-
-
Method Details
-
createCompatibleImage
Description copied from interface:PixelImageCreates an instance of the same class as this one, with width and height given by the arguments.- Specified by:
createCompatibleImagein interfacePixelImage- Specified by:
createCompatibleImagein classMemoryShortChannelImage- Parameters:
width- the horizontal resolution of the new imageheight- the vertical resolution of the new image- Returns:
- the new image
-
getImageType
Description copied from interface:PixelImageIf there is a single interface or class that describes the image data type of this class, theClassobject associated with that interface (or class) is returned (ornullotherwise). ThisClassobject, if available for two image objects, can be used to find out if they are compatible. Example:MemoryGray8Imagereturnsnet.sourceforge.jiu.data.Gray8Image.class.- Specified by:
getImageTypein interfacePixelImage
-
isBlack
public boolean isBlack(int x, int y) Description copied from interface:GrayImageReturns if the pixel specified by the location in the arguments is black. -
isWhite
public boolean isWhite(int x, int y) Description copied from interface:GrayImageReturns if the pixel specified by the location in the arguments is white. -
putBlack
public void putBlack(int x, int y) Description copied from interface:GrayImageSets a pixel to black (minimum intensity value). -
putWhite
public void putWhite(int x, int y) Description copied from interface:GrayImageSets a pixel to white (maximum intensity value).
-