Interface PixelImage

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      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.
      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

        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

        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

        long getAllocatedMemory()
        Returns the number of bytes that were dynamically allocated for this image object.
        Returns:
        allocated memory in bytes
      • getBitsPerPixel

        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

        int getHeight()
        Returns the vertical resolution of the image in pixels. Must be one or larger.
        Returns:
        height in pixels
      • getImageType

        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

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

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