JIU 0.12.0 Homepage

net.sourceforge.jiu.data
Interface PixelImage

All Known Subinterfaces:
BilevelImage, ByteChannelImage, Gray16Image, Gray8Image, GrayIntegerImage, IntegerImage, Paletted8Image, PalettedIntegerImage, RGB24Image, RGB48Image, RGBImage, RGBIntegerImage, ShortChannelImage
All Known Implementing Classes:
BufferedRGB24Image, MemoryBilevelImage, MemoryByteChannelImage, MemoryGray16Image, MemoryGray8Image, MemoryPaletted8Image, MemoryRGB24Image, MemoryRGB48Image, MemoryShortChannelImage

public interface PixelImage

The base interface for all image data types in JIU. These image data classes and interfaces share the following properties:

Author:
Marco Schmidt

Method Summary
 PixelImage createCompatibleImage(int width, int height)
          Creates an instance of the same class as this one, with width and height given by the arguments.
 PixelImage createCopy()
          Creates an new image object that will be of the same type as this one, with the same image data, using entirely new resources.
 long getAllocatedMemory()
          Returns the number of bytes that were dynamically allocated for this image object.
 int getBitsPerPixel()
          Returns the number of bits per pixel of this image.
 int getHeight()
          Returns the vertical resolution of the image in pixels.
 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).
 int getNumChannels()
          Returns the number of channels in this image.
 int getWidth()
          Returns the horizontal resolution of the image in pixels.
 

Method Detail

createCompatibleImage

public PixelImage createCompatibleImage(int width,
                                        int height)
Creates an instance of the same class as this one, with width and height given by the arguments.

Parameters:
width - the horizontal resolution of the new image
height - the vertical resolution of the new image
Returns:
the new image
Throws:
IllegalArgumentException - if width or height are smaller than one

createCopy

public PixelImage createCopy()
Creates an new image object that will be of the same type as this one, with the same image data, using entirely new resources.

Returns:
the new image object

getAllocatedMemory

public long getAllocatedMemory()
Returns the number of bytes that were dynamically allocated for this image object.

Returns:
allocated memory in bytes

getBitsPerPixel

public int getBitsPerPixel()
Returns the number of bits per pixel of this image. That is the number of bits per sample for all channels of this image. Does not include any transparency channels.


getHeight

public int getHeight()
Returns the vertical resolution of the image in pixels. Must be one or larger.

Returns:
height in pixels

getImageType

public 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). 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.


getNumChannels

public int getNumChannels()
Returns the number of channels in this image. Must be one or larger.

Returns:
the number of channels

getWidth

public int getWidth()
Returns the horizontal resolution of the image in pixels. Must be one or larger.

Returns:
width in pixels

JIU 0.12.0 Homepage

Copyright © 2000, 2001, 2002, 2003, 2004 Marco Schmidt